Skip to content

Commit

Permalink
add manifest_testing script
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Mar 2, 2024
1 parent f3038b9 commit bece673
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions scripts/manifest_testing.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash
#
# Manually testing the manifest module against the test_node.sh script
#

export CHAIN_ID=${CHAIN_ID:-"local-1"}
export KEYRING=${KEYRING:-"test"}

export KEY="user1" # PoA Admin
export KEY2="user2"

manifestd config set client chain-id $CHAIN_ID
manifestd config set client keyring-backend $KEYRING

# When automatic inflation is on, this address (by default) should get 100% of the coins
manifestd q manifest params
manifestd q bank balances manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct

# toggle inflation to be off. Stakeholders should not get auto payments
manifestd tx manifest update-params manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct:100_000_000 false 500000000umfx --yes --from $KEY
manifestd q manifest params
manifestd q bank balances manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct

# Perform a 1 off manual mint with inflation off
manifestd tx manifest stakeholder-payout 777umfx --yes --from $KEY
manifestd q bank balances manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct # should go up 777 tokens

# re-enable auto inflation
manifestd tx manifest update-params manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct:100_000_000 true 500000000umfx --yes --from $KEY
manifestd q manifest params
manifestd q bank balances manifest1hj5fveer5cjtn4wd6wstzugjfdxzl0xp8ws9ct

# try to manual mint (fails due to auto inflation being on)
manifestd tx manifest stakeholder-payout 777umfx --yes --from $KEY
# query the Tx, raw log == failed to execute message; message index: 0: manual minting is disabled due to automatic inflation being on

0 comments on commit bece673

Please sign in to comment.