From d9c190517d4cec8e3eced8e5142f75d686fb6319 Mon Sep 17 00:00:00 2001 From: Reece Williams Date: Tue, 5 Mar 2024 11:24:08 -0600 Subject: [PATCH] add bash command to get amounts --- network/obvious-1/README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/network/obvious-1/README.md b/network/obvious-1/README.md index 3b1bbe4..9a0670c 100644 --- a/network/obvious-1/README.md +++ b/network/obvious-1/README.md @@ -123,4 +123,27 @@ cat ${PROJECT_HOME}/config/gentx/gentx-*.json # get your peer echo $(manifestd tendermint show-node-id)@$(curl -s ifconfig.me):26656 +``` + + +maintainer only: +```bash + +cd networks/obvious-1 + +cp genesis.json $HOME/.manifest/config + +# iterate through the gentx directory, print the files +# https://github.com/strangelove-ventures/bech32cli +for filename in gentx/*.json; do + addr=`cat $filename | jq -r .body.messages[0].validator_address | xargs -I {} bech32 transform {} manifest` + raw_coin=`cat $filename | jq -r .body.messages[0].value` # { "denom": "poastake", "amount": "1000000" } + coin=$(echo $raw_coin | jq -r '.amount + .denom') # make coin = 1000000poastake + manifestd genesis add-genesis-account $addr $coin --append +done + +manifestd genesis collect-gentxs --gentx-dir gentx --home $HOME/.manifest + +cp $HOME/.manifest/config/genesis.json live_genesis.json + ``` \ No newline at end of file