Skip to content

Commit

Permalink
done
Browse files Browse the repository at this point in the history
  • Loading branch information
BrandonWeng committed Jun 30, 2023
1 parent c0e9f4b commit 9fe9a8c
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions integration_test/bank_module/simulation_tx.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
- name: Test simulation sending funds
inputs:
# Create test account
- cmd: seid keys add bank-test --keyring-backend test
- cmd: seid keys add simulation-test --keyring-backend test
- cmd: printf "12345678\n" | seid keys show -a admin
env: ADMIN_ACC
- cmd: seid keys show -a bank-test --keyring-backend test
env: BANK_TEST_ACC
- cmd: seid keys show -a simulation-test --keyring-backend test
env: SIMULATION_TEST_ACC

# Send funds
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ACC $BANK_TEST_ACC 1sei -b block --fees 2000usei --chain-id sei -y
- cmd: printf "12345678\n" | seid tx bank send $ADMIN_ACC $SIMULATION_TEST_ACC 1sei -b block --fees 2000usei --chain-id sei -y

- cmd: seid tx bank send $ADMIN_ACC $BANK_TEST_ACC 1000sei --from $ADMIN_ACC --chain-id sei -b block -y --dry-run --keyring-backend test
- cmd: seid tx bank send $ADMIN_ACC $SIMULATION_TEST_ACC 1000sei --from $ADMIN_ACC --chain-id sei -b block -y --dry-run --keyring-backend test
env: GAS_ESIMATE

# Validate that only the 1sei is sent
- cmd: seid q bank balances $BANK_TEST_ACC --output json | jq -r .balances[0].amount
env: BANK_TEST_BAL
- cmd: seid q bank balances $SIMULATION_TEST_ACC --output json | jq -r .balances[0].amount
env: SIMULATION_TEST_ACC_BALANCE

verifiers:
# Bank balance should be 1sei
# - type: eval
# expr: BANK_TEST_BAL == 1000000
- type: eval
expr: SIMULATION_TEST_ACC_BALANCE == 1000000
- type: regex
expr: "gas_estimate: [0-9]+"
expr: "^gas estimate.*[0-9]+"
result: GAS_ESIMATE

0 comments on commit 9fe9a8c

Please sign in to comment.