-
Notifications
You must be signed in to change notification settings - Fork 102
/
tx.proto
168 lines (139 loc) · 6.13 KB
/
tx.proto
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
syntax = "proto3";
package osmosis.tokenfactory.v1beta1;
import "amino/amino.proto";
import "cosmos/bank/v1beta1/bank.proto";
import "cosmos/base/v1beta1/coin.proto";
import "cosmos/msg/v1/msg.proto";
import "cosmos_proto/cosmos.proto";
import "gogoproto/gogo.proto";
import "osmosis/tokenfactory/params.proto";
option go_package = "github.com/neutron-org/neutron/v4/x/tokenfactory/types";
// Msg defines the tokefactory module's gRPC message service.
service Msg {
option (cosmos.msg.v1.service) = true;
rpc CreateDenom(MsgCreateDenom) returns (MsgCreateDenomResponse);
rpc Mint(MsgMint) returns (MsgMintResponse);
rpc Burn(MsgBurn) returns (MsgBurnResponse);
rpc ChangeAdmin(MsgChangeAdmin) returns (MsgChangeAdminResponse);
rpc SetDenomMetadata(MsgSetDenomMetadata) returns (MsgSetDenomMetadataResponse);
rpc SetBeforeSendHook(MsgSetBeforeSendHook) returns (MsgSetBeforeSendHookResponse);
rpc ForceTransfer(MsgForceTransfer) returns (MsgForceTransferResponse);
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
}
// MsgCreateDenom defines the message structure for the CreateDenom gRPC service
// method. It allows an account to create a new denom. It requires a sender
// address and a sub denomination. The (sender_address, sub_denomination) tuple
// must be unique and cannot be re-used.
//
// The resulting denom created is defined as
// <factory/{creatorAddress}/{subdenom}>. The resulting denom's admin is
// originally set to be the creator, but this can be changed later. The token
// denom does not indicate the current admin.
message MsgCreateDenom {
option (amino.name) = "osmosis/tokenfactory/create-denom";
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
// subdenom can be up to 44 "alphanumeric" characters long.
string subdenom = 2 [(gogoproto.moretags) = "yaml:\"subdenom\""];
}
// MsgCreateDenomResponse is the return value of MsgCreateDenom
// It returns the full string of the newly created denom
message MsgCreateDenomResponse {
string new_token_denom = 1 [(gogoproto.moretags) = "yaml:\"new_token_denom\""];
}
// MsgMint is the sdk.Msg type for allowing an admin account to mint
// more of a token. For now, we only support minting to the sender account
message MsgMint {
option (amino.name) = "osmosis/tokenfactory/mint";
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
cosmos.base.v1beta1.Coin amount = 2 [
(gogoproto.moretags) = "yaml:\"amount\"",
(gogoproto.nullable) = false
];
string mintToAddress = 3 [(gogoproto.moretags) = "yaml:\"mint_to_address\""];
}
message MsgMintResponse {}
// MsgBurn is the sdk.Msg type for allowing an admin account to burn
// a token. For now, we only support burning from the sender account.
message MsgBurn {
option (amino.name) = "osmosis/tokenfactory/burn";
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
cosmos.base.v1beta1.Coin amount = 2 [
(gogoproto.moretags) = "yaml:\"amount\"",
(gogoproto.nullable) = false
];
string burnFromAddress = 3 [(gogoproto.moretags) = "yaml:\"burn_from_address\""];
}
message MsgBurnResponse {}
// MsgChangeAdmin is the sdk.Msg type for allowing an admin account to reassign
// adminship of a denom to a new account
message MsgChangeAdmin {
option (amino.name) = "osmosis/tokenfactory/change-admin";
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
string denom = 2 [(gogoproto.moretags) = "yaml:\"denom\""];
string new_admin = 3 [(gogoproto.moretags) = "yaml:\"new_admin\""];
}
// MsgChangeAdminResponse defines the response structure for an executed
// MsgChangeAdmin message.
message MsgChangeAdminResponse {}
// MsgSetBeforeSendHook is the sdk.Msg type for allowing an admin account to
// assign a CosmWasm contract to call with a BeforeSend hook
message MsgSetBeforeSendHook {
option (amino.name) = "osmosis/tokenfactory/set-beforesend-hook";
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
string denom = 2 [(gogoproto.moretags) = "yaml:\"denom\""];
string contract_addr = 3 [(gogoproto.moretags) = "yaml:\"contract_addr\""];
}
// MsgSetBeforeSendHookResponse defines the response structure for an executed
// MsgSetBeforeSendHook message.
message MsgSetBeforeSendHookResponse {}
// MsgSetDenomMetadata is the sdk.Msg type for allowing an admin account to set
// the denom's bank metadata
message MsgSetDenomMetadata {
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
cosmos.bank.v1beta1.Metadata metadata = 2 [
(gogoproto.moretags) = "yaml:\"metadata\"",
(gogoproto.nullable) = false
];
}
// MsgSetDenomMetadataResponse defines the response structure for an executed
// MsgSetDenomMetadata message.
message MsgSetDenomMetadataResponse {}
message MsgForceTransfer {
option (amino.name) = "osmosis/tokenfactory/force-transfer";
option (cosmos.msg.v1.signer) = "sender";
string sender = 1 [(gogoproto.moretags) = "yaml:\"sender\""];
cosmos.base.v1beta1.Coin amount = 2 [
(gogoproto.moretags) = "yaml:\"amount\"",
(gogoproto.nullable) = false
];
string transferFromAddress = 3 [(gogoproto.moretags) = "yaml:\"transfer_from_address\""];
string transferToAddress = 4 [(gogoproto.moretags) = "yaml:\"transfer_to_address\""];
}
message MsgForceTransferResponse {}
// MsgUpdateParams is the MsgUpdateParams request type.
//
// Since: 0.47
message MsgUpdateParams {
option (amino.name) = "interchainqueries/MsgUpdateParams";
option (cosmos.msg.v1.signer) = "authority";
// Authority is the address of the governance account.
string authority = 1 [(cosmos_proto.scalar) = "cosmos.AddressString"];
// params defines the x/tokenfactory parameters to update.
//
// NOTE: All parameters must be supplied.
Params params = 2 [
(gogoproto.nullable) = false,
(amino.dont_omitempty) = true
];
}
// MsgUpdateParamsResponse defines the response structure for executing a
// MsgUpdateParams message.
//
// Since: 0.47
message MsgUpdateParamsResponse {}