Skip to content

Commit 59cffca

Browse files
committed
readme usage
1 parent 3da5489 commit 59cffca

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

cmd/siftest/main.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,12 @@ func VerifyAdd(clientCtx client.Context, from string, height uint64, nativeAmoun
331331
LpAddress: from,
332332
})
333333
if err != nil {
334-
return err
334+
// Use empty LP if this is the first add
335+
lpBefore = &clptypes.LiquidityProviderRes{
336+
LiquidityProvider: &clptypes.LiquidityProvider{
337+
LiquidityProviderUnits: sdk.ZeroUint(),
338+
},
339+
}
335340
}
336341

337342
// Lookup pool balances before remove

cmd/siftest/readme.md

+27
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Siftest User Guide
22

3+
## About
4+
5+
This can be used after running transactions to verify expected vs real changes.
6+
37
## Installation
48

59
```shell
@@ -10,6 +14,14 @@ make install
1014

1115
## Verify Add Liquidity
1216

17+
1. Execute add liquidity transaction
18+
2. Verify by passing in the following arguments
19+
1. --height [height of transaction]
20+
2. --from [address of transactor]
21+
3. --external-asset [external asset of pool]
22+
4. --nativeAmount [native amount requested to add]
23+
5. --externalAmount [external amount requested to add]
24+
6. --node [node to connect to]
1325
```shell
1426
siftest verify add --from sif1syavy2npfyt9tcncdtsdzf7kny9lh777yqc2nd --height=43516 --external-asset=ceth --nativeAmount=96176925423929435353999282 --externalAmount=488436982990 --node tcp://localhost:26657
1527
```
@@ -37,6 +49,13 @@ Pool share after 1.000000000000000000
3749

3850
## Verify Remove Liquidity
3951

52+
1. Execute remove liquidity transaction
53+
2. Verify by passing in the following parameters:
54+
1. --height [height of transaction]
55+
2. --from [address of transactor]
56+
3. --external-asset [external asset of pool]
57+
4. --units [units requested for removal]
58+
5. --node [node to connect to]
4059
Command
4160
```shell
4261
siftest verify remove --from sif1syavy2npfyt9tcncdtsdzf7kny9lh777yqc2nd --units 1000000000000000000 --height=33068 --external-asset=ceth --node tcp://localhost:26657
@@ -65,6 +84,14 @@ Pool share after 1.000000000000000000
6584
```
6685

6786
## Verify Close Position
87+
88+
1. Execute close margin position
89+
2. Verify by passing in the following params:
90+
1. --height [height of transaction]
91+
2. --id [mtp id]
92+
3. --from [owner of mtp]
93+
4. --node [node to connect to]
94+
6895
Run command using height of close transaction and MTP id.
6996
```shell
7097
siftest verify close --from sif1syavy2npfyt9tcncdtsdzf7kny9lh777yqc2nd --height=72990 --id=4 --node tcp://localhost:26657

0 commit comments

Comments
 (0)