Skip to content
This repository has been archived by the owner on Oct 31, 2024. It is now read-only.

Commit

Permalink
chore: quiet fail if contract already predeployed (#11)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastiendan authored and atanmarko committed Sep 15, 2023
1 parent 4b666d1 commit f5da198
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions docker/local-topos/polygon-edge.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ case "$1" in
BOOTNODE_ADDRESS=$(echo $secrets | jq -r '.[0] | .address')

echo "Generating IBFT Genesis file..."
ls -la "$POLYGON_EDGE_BIN"
"$POLYGON_EDGE_BIN" genesis $CHAIN_CUSTOM_OPTIONS \
--dir "$GENESIS_PATH" \
--consensus ibft \
Expand Down Expand Up @@ -80,12 +79,12 @@ case "$1" in

echo "Predeploying ConstAddressDeployer contract..."
CONST_ADDRESS_DEPLOYER_ADDRESS=0x0000000000000000000000000000000000001110
ls -la "$POLYGON_EDGE_BIN"
"$POLYGON_EDGE_BIN" genesis predeploy \
--chain "$GENESIS_PATH" \
--artifacts-path "$CONTRACTS_PATH"/ConstAddressDeployer.json \
--predeploy-address "$CONST_ADDRESS_DEPLOYER_ADDRESS"
echo "ConstAddressDeployer has been successfully predeployed!"
--chain "$GENESIS_PATH" \
--artifacts-path "$CONTRACTS_PATH"/ConstAddressDeployer.json \
--predeploy-address "$CONST_ADDRESS_DEPLOYER_ADDRESS" \
2>&1 >/dev/null && echo "ConstAddressDeployer has been successfully predeployed!" \
|| echo "Predeployment of ConstAddressDeployer failed with error code $?"
;;

*)
Expand Down

0 comments on commit f5da198

Please sign in to comment.