@@ -102,41 +102,200 @@ gnokey maketx addpkg -pkgdir ../../contract/r/gnoswap/launchpad -pkgpath gno.lan
102
102
### deploy referral
103
103
gnokey maketx addpkg -pkgdir ../../contract/r/gnoswap/referral -pkgpath gno.land/r/gnoswap/v1/referral -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
104
104
105
+
105
106
# create pool
106
107
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func Approve -args g148tjamj80yyrm309z7rk690an22thd2l3z8ank -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
107
108
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func CreatePool -args "gno.land/r/demo/wugnot" -args "gno.land/r/gnoswap/v1/gns" -args 3000 -args 79228162514264337593543950337 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
108
109
stdout '{"key":"poolPath","value":"gno.land/r/demo/wugnot:gno.land/r/gnoswap/v1/gns:3000"}'
109
110
111
+ # check created pool
112
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func DoesPoolPathExist -args "gno.land/r/demo/wugnot:gno.land/r/gnoswap/v1/gns:3000" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
113
+ stdout true
114
+
115
+ # create another pool
116
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func Approve -args g148tjamj80yyrm309z7rk690an22thd2l3z8ank -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
117
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func CreatePool -args "gno.land/r/gnoswap/v1/test_token/bar" -args "gno.land/r/gnoswap/v1/test_token/baz" -args 3000 -args 79228162514264337593543950337 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
118
+ stdout '{"key":"poolPath","value":"gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000"}'
119
+
120
+
121
+ # pool creation fee getter & setter
122
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func GetPoolCreationFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
123
+ stdout 100000000
124
+
125
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func SetPoolCreationFeeByAdmin -args 0 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
126
+ stdout OK
127
+
128
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func GetPoolCreationFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
129
+ stdout 0
130
+
131
+
132
+ # withdrawal fee getter & setter
133
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func GetWithdrawalFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
134
+ stdout 100
135
+
136
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func SetWithdrawalFeeByAdmin -args 0 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
137
+ stdout OK
138
+
139
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/pool -func GetWithdrawalFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
140
+ stdout 0
141
+
110
142
111
143
# mint new position
112
144
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func ApiGetPositions -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
113
145
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func Approve -args g148tjamj80yyrm309z7rk690an22thd2l3z8ank -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
114
146
gnokey maketx call -pkgpath gno.land/r/demo/wugnot -func Approve -args g148tjamj80yyrm309z7rk690an22thd2l3z8ank -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
115
147
gnokey maketx call -pkgpath gno.land/r/demo/wugnot -func Approve -args g1q646ctzhvn60v492x8ucvyqnrj2w30cwh6efk5 -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
116
148
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func Mint -send "20000000ugnot" -args "gno.land/r/gnoswap/v1/gns" -args "gnot" -args 3000 -args "-49980" -args "49980" -args 20000000 -args 20000000 -args 1 -args 1 -args 9999999999 -args g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 -args g1jg8mtutu9khhfwc4nxmuhcpftf0pajdhfvsqf5 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
149
+ stdout '(1 uint64)'
150
+
151
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func PositionGetPositionLiquidityStr -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
152
+ stdout '("21790703" string)'
153
+
117
154
118
- # increase liquidity
155
+ # increase liquditiy
119
156
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func IncreaseLiquidity -send "20000000ugnot" -args 1 -args 20000000 -args 20000000 -args 1 -args 1 -args 9999999999 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
157
+ stdout OK
158
+
159
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func PositionGetPositionLiquidityStr -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
160
+ stdout '("43581406" string')
161
+
162
+
163
+ # decrease rliquditiy
164
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func DecreaseLiquidity -args 1 -args 81406 -args 0 -args 0 -args 9999999999 -args "false" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
165
+ stdout OK
166
+
167
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func PositionGetPositionLiquidityStr -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
168
+ stdout '("43500000" string')
120
169
121
- # decrease liquditiy
122
- gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func DecreaseLiquidity -args 1 -args 12345678 -args 0 -args 0 -args 9999999999 -args "false" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
123
170
124
171
# swap exact in
125
172
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func Approve -args g148tjamj80yyrm309z7rk690an22thd2l3z8ank -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
126
173
gnokey maketx call -pkgpath gno.land/r/demo/wugnot -func Approve -args g1lm2l7tf49h3mykesct7rhfml30yx8dw5xrval7 -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
127
174
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/router -func ExactInSwapRoute -args "gno.land/r/gnoswap/v1/gns" -args "gno.land/r/demo/wugnot" -args 50000 -args "gno.land/r/gnoswap/v1/gns:gno.land/r/demo/wugnot:3000" -args "100" -args "0" -args 9999999999 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
175
+ stdout OK
176
+
128
177
129
178
# swap exact out
130
179
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func Approve -args g148tjamj80yyrm309z7rk690an22thd2l3z8ank -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
131
180
gnokey maketx call -pkgpath gno.land/r/demo/wugnot -func Approve -args g1lm2l7tf49h3mykesct7rhfml30yx8dw5xrval7 -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
132
181
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/router -func ExactOutSwapRoute -args "gno.land/r/gnoswap/v1/gns" -args "gno.land/r/demo/wugnot" -args 50000 -args "gno.land/r/gnoswap/v1/gns:gno.land/r/demo/wugnot:3000" -args "100" -args "60000" -args 9999999999 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
182
+ stdout OK
183
+
184
+
185
+ # collect swap fee
186
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/position -func CollectFee -args 1 -args false -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
187
+ stdout '("300" string)'
188
+
189
+
190
+ # swap fee getter & setter
191
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/router -func GetSwapFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
192
+ stdout 15
193
+
194
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/router -func SetSwapFeeByAdmin -args 0 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
195
+ stdout OK
196
+
197
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/router -func GetSwapFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
198
+ stdout 0
199
+
133
200
134
201
# stake position
202
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func IsStaked -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
203
+ stdout false
204
+
135
205
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gnft -func Approve -args g1cceshmzzlmrh7rr3z30j2t5mrvsq9yccysw9nu -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
136
206
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func StakeToken -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
207
+ stdout OK
208
+
209
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func IsStaked -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
210
+ stdout true
137
211
138
212
# collect staking reward
139
213
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func CollectReward -args 1 -args false -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
140
214
215
+
141
216
# unstake token
142
217
gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func UnStakeToken -args 1 -args true -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
218
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func IsStaked -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
219
+ stdout false
220
+
221
+
222
+ # deposit gns amount getter & setter
223
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetDepositGnsAmount -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
224
+ stdout 100000000
225
+
226
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func SetDepositGnsAmountByAdmin -args 0 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
227
+ stdout OK
228
+
229
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetDepositGnsAmount -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
230
+ stdout 0
231
+
232
+
233
+ ## unstaking fee getter & setter
234
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetUnstakingFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
235
+ stdout 100
236
+
237
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func SetUnStakingFeeByAdmin -args 0 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
238
+ stdout OK
239
+
240
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetUnstakingFee -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
241
+ stdout 0
242
+
243
+
244
+ ## staker pool tier
245
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetPoolTier -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
246
+ stdout '(0 uint64)'
247
+
248
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func SetPoolTierByAdmin -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -args 2 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
249
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetPoolTier -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
250
+ stdout '(2 uint64)'
251
+
252
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func ChangePoolTierByAdmin -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -args 3 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
253
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetPoolTier -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
254
+ stdout '(3 uint64)'
255
+
256
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func RemovePoolTierByAdmin -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
257
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/staker -func GetPoolTier -args "gno.land/r/gnoswap/v1/test_token/bar:gno.land/r/gnoswap/v1/test_token/baz:3000" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
258
+ stdout '(0 uint64)'
259
+
260
+
261
+ # avg blocktime getter & setter
262
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func GetAvgBlockTimeInMs -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
263
+ stdout 2000
264
+
265
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func SetAvgBlockTimeInMsByAdmin -args 4000 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
266
+ stdout OK
267
+
268
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func GetAvgBlockTimeInMs -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
269
+ stdout 4000
270
+
271
+
272
+ ## change emission reward distribution pct
273
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/emission -func GetDistributionBpsPct -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
274
+ stdout '(7500 uint64)'
275
+
276
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/emission -func ChangeDistributionPctByAdmin -args 1 -args 10000 -args 2 -args 0 -args 3 -args 0 -args 4 -args 0 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
277
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/emission -func GetDistributionBpsPct -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
278
+ stdout '(10000 uint64)'
279
+
280
+
281
+ ## delegate to user2
282
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gns -func Approve -args g17e3ykyqk9jmqe2y9wxe9zhep3p7cw56davjqwa -args 18446744073709551615 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
283
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/staker -func Delegate -args ${user2_user_addr} -args 5000000000 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
284
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/staker -func GetDelegationAmountFromTo -args ${test1_user_addr} -args ${user2_user_addr} -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
285
+ stdout '(5000000000 uint64)'
286
+
287
+
288
+ ## redelegate partial from user2 to user3
289
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/staker -func Redelegate -args ${user2_user_addr} -args ${user3_user_addr} -args 200000000 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
290
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/staker -func GetDelegationAmountFromTo -args ${test1_user_addr} -args ${user3_user_addr} -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
291
+ stdout '(200000000 uint64)'
292
+
293
+
294
+ # propose proposal
295
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/governance -func ProposeText -args "title01" -args "description01" -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
296
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/governance -func GetProposalById -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
297
+ stdout 'title01'
298
+
299
+ # cancel proposal
300
+ gnokey maketx call -pkgpath gno.land/r/gnoswap/v1/gov/governance -func Cancel -args 1 -gas-fee 1ugnot -gas-wanted 3000000000 -broadcast -chainid=tendermint_test test1
301
+ stdout OK
0 commit comments