Update nitro-rpc-client usage in genesis generation script #4

Merged
nabarun merged 1 commits from pm-update-script into main 2024-07-16 14:40:11 +00:00

View File

@ -4,7 +4,7 @@
set -e set -e
# Prerequisite: nitro-rpc-client package installed globally # Prerequisite: nitro-rpc-client package installed globally
# https://github.com/cerc-io/go-nitro/blob/main/packages/nitro-rpc-client/readme.md # https://github.com/cerc-io/go-nitro/blob/main/packages/nitro-rpc-client/readme.md#global-install
# Check args # Check args
if [ "$#" -ne 1 ]; then if [ "$#" -ne 1 ]; then
@ -26,7 +26,7 @@ mkdir -p $STAGE1_GENESIS_DIR
export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem" export NODE_EXTRA_CA_CERTS="$(mkcert -CAROOT)/rootCA.pem"
# Run the nitro-rpc-client command and process the output with jq # Run the nitro-rpc-client command and process the output with jq
eth_account_holdings=$(nitro-rpc-client get-all-ledger-channels -p 4006 | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]') eth_account_holdings=$(nitro-rpc-client get-all-l2-channels -p 4006 | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]')
echo "Fetched Ethereum account holdings" echo "Fetched Ethereum account holdings"