-
Notifications
You must be signed in to change notification settings - Fork 1
/
tx.proto
129 lines (109 loc) · 4.23 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
syntax = "proto3";
package canto.coinswap.v1;
import "canto/coinswap/v1/coinswap.proto";
import "cosmos/base/v1beta1/coin.proto";
import "gogoproto/gogo.proto";
import "cosmos_proto/cosmos.proto";
import "cosmos/msg/v1/msg.proto";
import "amino/amino.proto";
option go_package = "github.com/Canto-Network/Canto/v7/x/coinswap/types";
option (gogoproto.goproto_getters_all) = false;
// Msg defines the coinswap Msg service
service Msg {
option (cosmos.msg.v1.service) = true;
// AddLiquidity defines a method for depositing some tokens to the liquidity
// pool
rpc AddLiquidity(MsgAddLiquidity) returns (MsgAddLiquidityResponse);
// RemoveLiquidity defines a method for withdraw some tokens from the
// liquidity pool
rpc RemoveLiquidity(MsgRemoveLiquidity) returns (MsgRemoveLiquidityResponse);
// SwapCoin defines a method for swapping a token with the other token from
// the liquidity pool
rpc SwapCoin(MsgSwapOrder) returns (MsgSwapCoinResponse);
// UpdateParams defines a governance operation for updating the x/coinswap
// module parameters. The authority is defined in the keeper.
//
// Since: cosmos-sdk 0.47
rpc UpdateParams(MsgUpdateParams) returns (MsgUpdateParamsResponse);
}
// MsgAddLiquidity defines a msg for adding liquidity to a reserve pool
message MsgAddLiquidity {
option (cosmos.msg.v1.signer) = "sender";
option (amino.name) = "canto/MsgAddLiquidity";
cosmos.base.v1beta1.Coin max_token = 1 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"max_token\""
];
string exact_standard_amt = 2 [
(gogoproto.moretags) = "yaml:\"exact_standard_amt\"",
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string min_liquidity = 3 [
(gogoproto.moretags) = "yaml:\"min_liquidity\"",
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
int64 deadline = 4;
string sender = 5;
}
// MsgAddLiquidityResponse defines the Msg/AddLiquidity response type
message MsgAddLiquidityResponse { cosmos.base.v1beta1.Coin mint_token = 1; }
// MsgRemoveLiquidity defines a msg for removing liquidity from a reserve pool
message MsgRemoveLiquidity {
option (cosmos.msg.v1.signer) = "sender";
option (amino.name) = "canto/MsgRemoveLiquidity";
cosmos.base.v1beta1.Coin withdraw_liquidity = 1 [
(gogoproto.nullable) = false,
(gogoproto.moretags) = "yaml:\"withdraw_liquidity\""
];
string min_token = 2 [
(gogoproto.moretags) = "yaml:\"min_token\"",
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
string min_standard_amt = 3 [
(gogoproto.moretags) = "yaml:\"min_standard_amt\"",
(cosmos_proto.scalar) = "cosmos.Int",
(gogoproto.customtype) = "cosmossdk.io/math.Int",
(gogoproto.nullable) = false
];
int64 deadline = 4;
string sender = 5;
}
// MsgRemoveLiquidityResponse defines the Msg/RemoveLiquidity response type
message MsgRemoveLiquidityResponse {
repeated cosmos.base.v1beta1.Coin withdraw_coins = 1;
}
// MsgSwapOrder defines a msg for swap order
message MsgSwapOrder {
option (cosmos.msg.v1.signer) = "input";
option (amino.name) = "canto/MsgSwapOrder";
Input input = 1 [ (gogoproto.nullable) = false ];
Output output = 2 [ (gogoproto.nullable) = false ];
int64 deadline = 3;
bool is_buy_order = 4 [ (gogoproto.moretags) = "yaml:\"is_buy_order\"" ];
}
// MsgSwapCoinResponse defines the Msg/SwapCoin response type
message MsgSwapCoinResponse {}
// Since: cosmos-sdk 0.47
message MsgUpdateParams {
option (cosmos.msg.v1.signer) = "authority";
// authority is the address that controls the module (defaults to x/gov unless
// overwritten).
string authority = 1 [ (cosmos_proto.scalar) = "cosmos.AddressString" ];
option (amino.name) = "canto/MsgUpdateParams";
// params defines the x/coinswap 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: cosmos-sdk 0.47
message MsgUpdateParamsResponse {}