/
transaction.go
49 lines (40 loc) · 1.22 KB
/
transaction.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
// Copyright [2021] - [2022], AssetMantle Pte. Ltd. and the code contributors
// SPDX-License-Identifier: Apache-2.0
package make
import (
"context"
"github.com/cosmos/cosmos-sdk/client"
"github.com/gogo/protobuf/grpc"
"github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/AssetMantle/modules/helpers"
baseHelpers "github.com/AssetMantle/modules/helpers/base"
"github.com/AssetMantle/modules/helpers/constants"
"github.com/AssetMantle/modules/utilities/name"
)
type dummy struct{}
var Transaction = baseHelpers.NewTransaction(
name.GetPackageName(dummy{}),
"",
"",
requestPrototype,
messagePrototype,
keeperPrototype,
func(server grpc.Server, keeper helpers.TransactionKeeper) {
RegisterMsgServer(server, keeper.(transactionKeeper))
},
func(clientCtx client.Context, mux *runtime.ServeMux) error {
return RegisterMsgHandlerClient(context.Background(), mux, NewMsgClient(clientCtx))
},
constants.ClassificationID,
constants.ExpiresIn,
constants.FromIdentityID,
constants.MakerAssetID,
constants.MakerSplit,
constants.MutableMetaProperties,
constants.MutableProperties,
constants.TakerID,
constants.TakerSplit,
constants.TakerAssetID,
constants.ImmutableMetaProperties,
constants.ImmutableProperties,
)