-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# deploy.sh <CHAIN> | ||
CHAIN=$1 | ||
|
||
THE_COMPACT_ADDRESS=0x00000000000018DF021Ff2467dF97ff846E09f48 | ||
MAILBOX_ADDRESS=$(cat ~/.hyperlane/chains/$CHAIN/addresses.yaml | yq '.mailbox') | ||
RPC_URL=$(cat ~/.hyperlane/chains/$CHAIN/metadata.yaml | yq '.rpcUrls[0].http') | ||
HYP_KEY=$(gcloud secrets versions access latest --secret "hyperlane-mainnet3-key-deployer" | jq ".privateKey" -c -r) | ||
ARBITER_ADDRESS=$(forge create HyperlaneArbiter --json \ | ||
--rpc-url $RPC_URL \ | ||
--private-key $HYP_KEY \ | ||
--constructor-args $MAILBOX_ADDRESS $THE_COMPACT_ADDRESS \ | ||
| jq -r '.deployedTo') | ||
echo "$CHAIN: $ARBITER_ADDRESS" >> hyperlane-arbiters.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# enroll.sh <CHAIN> <CHAINS> | ||
CHAIN=$1 | ||
CHAINS=$2 | ||
|
||
RPC_URL=$(cat ~/.hyperlane/chains/$CHAIN/metadata.yaml | yq '.rpcUrls[0].http') | ||
HYP_KEY=$(gcloud secrets versions access latest --secret "hyperlane-mainnet3-key-deployer" | jq ".privateKey" -c -r) | ||
ARBITER_ADDRESS=$(cat hyperlane-arbiters.yaml | yq ".$CHAIN") | ||
|
||
# loop over each chain in chains | ||
for DESTINATION in $CHAINS; do | ||
DESTINATION_DOMAIN=$(cat ~/.hyperlane/chains/$DESTINATION/metadata.yaml | yq '.domainId') | ||
ROUTER_ADDRESS=$(cat hyperlane-arbiters.yaml | yq ".$DESTINATION") | ||
echo "Enrolling $DESTINATION on $CHAIN" | ||
cast send $ARBITER_ADDRESS \ | ||
--rpc-url $RPC_URL \ | ||
--private-key $HYP_KEY \ | ||
"enrollRemoteRouter(uint32,bytes32)" $DESTINATION_DOMAIN $(yarn leftpad $ROUTER_ADDRESS) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
optimism: 0x57F0638d4fba79DB978c4eE1B73d469ea21014b2 | ||
ethereum: 0x088470910056221862d18fF2e65ffaeC96ec6dA4 | ||
base: 0x43b60b47764B6460c96349A1B414214BBa7F22c9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# verify.sh <CHAIN> | ||
CHAIN=$1 | ||
|
||
set -x | ||
|
||
THE_COMPACT_ADDRESS=0x00000000000018DF021Ff2467dF97ff846E09f48 | ||
MAILBOX_ADDRESS=$(cat ~/.hyperlane/chains/$CHAIN/addresses.yaml | yq '.mailbox') | ||
ARBITER_ADDRESS=$(cat hyperlane-arbiters.yaml | yq ".$CHAIN") | ||
RPC_URL=$(cat ~/.hyperlane/chains/$CHAIN/metadata.yaml | yq '.rpcUrls[0].http') | ||
ETHERSCAN_API_KEY=$(gcloud secrets versions access latest --secret "explorer-api-keys" | jq -r ".$CHAIN") | ||
|
||
CONSTRUCTOR_ARGS=$(cast abi-encode "constructor(address,address)" $MAILBOX_ADDRESS $THE_COMPACT_ADDRESS) | ||
|
||
forge verify-contract $ARBITER_ADDRESS \ | ||
--rpc-url $RPC_URL \ | ||
--verifier-api-key $ETHERSCAN_API_KEY \ | ||
--constructor-args $CONSTRUCTOR_ARGS \ | ||
--watch |