Replace laconic2 with laconic and update genesis generation script #5
@ -2,17 +2,16 @@
|
|||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
set -u
|
||||||
# Prerequisite: nitro-rpc-client package installed globally
|
|
||||||
# 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 2 ]; then
|
||||||
echo "Usage: $0 <stage0-deployment-dir-absolute>"
|
echo "Usage: $0 <bridge-deployment-dir-absolute> <stage0-deployment-dir-absolute>"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
STAGE0_DEPLOYMENT_DIR="$1"
|
BRIDGE_DEPLOYMENT_DIR="$1"
|
||||||
|
STAGE0_DEPLOYMENT_DIR="$2"
|
||||||
STAGE1_GENESIS_DIR=stage1-genesis
|
STAGE1_GENESIS_DIR=stage1-genesis
|
||||||
|
|
||||||
# Create a temporary target directory
|
# Create a temporary target directory
|
||||||
@ -22,11 +21,13 @@ mkdir -p $STAGE1_GENESIS_DIR
|
|||||||
|
|
||||||
# Fetch ETH account holdings from the bridge node
|
# Fetch ETH account holdings from the bridge node
|
||||||
|
|
||||||
# Trust locally-trusted development certificates created by mkcert
|
|
||||||
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-l2-channels -p 4006 | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]')
|
cd $BRIDGE_DEPLOYMENT_DIR
|
||||||
|
|
||||||
|
eth_account_holdings=$(laconic-so deployment --dir bridge-deployment exec nitro-rpc-client "nitro-rpc-client get-all-l2-channels -p 4006 -h nitro-bridge" | jq -s '[.[] | {nitro_address: .Balance.Them, balance: .Balance.TheirBalance}]')
|
||||||
|
|
||||||
|
# Change back to the original directory
|
||||||
|
cd -
|
||||||
|
|
||||||
echo "Fetched Ethereum account holdings"
|
echo "Fetched Ethereum account holdings"
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
set -u
|
||||||
|
|
||||||
# Note: Needs to be run in a docker container with image cerc/laconicd:local
|
# Note: Needs to be run in a docker container with image cerc/laconicd:local
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user