From 1003ab163e28bc78e8bd6c419976aec590f88f49 Mon Sep 17 00:00:00 2001 From: Josh Siegel Date: Mon, 12 Sep 2022 15:23:35 -0500 Subject: [PATCH] near/governance: add in support for near --- scripts/contract-upgrade-governance.sh | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/scripts/contract-upgrade-governance.sh b/scripts/contract-upgrade-governance.sh index 20c82e18a..3570f17ad 100755 --- a/scripts/contract-upgrade-governance.sh +++ b/scripts/contract-upgrade-governance.sh @@ -166,6 +166,10 @@ case "$chain_name" in explorer="https://celoscan.xyz/address/" evm=true ;; + near) + chain=15 + explorer="https://explorer.near.org/accounts/" + ;; *) echo "Unknown chain: $chain_name" >&2 exit 1 @@ -243,6 +247,20 @@ function solana_artifact() { esac } +function near_artifact() { + case "$module" in + bridge|core) + echo "artifacts/near_wormhole.wasm" + ;; + token_bridge) + echo "artifacts/near_token_bridge.wasm" + ;; + *) echo "unknown module $module" >&2 + usage + ;; + esac +} + function terra_artifact() { case "$module" in bridge|core) @@ -367,6 +385,22 @@ elif [ "$chain_name" = "solana" ]; then wormhole/solana$ ./verify -n mainnet $(solana_artifact) $address \`\`\` EOF +elif [ "$chain_name" = "near" ]; then + cat <<-EOF >> "$instructions_file" + ## Build + \`\`\`shell + wormhole/near $ make artifacts + \`\`\` + + This command will compile all the contracts into the \`artifacts\` directory using Docker to ensure that the build artifacts are deterministic. + + Next, you can look at the checksums of the built .wasm files + + \`\`\`shell + # $module + wormhole/near$ sha256sum $(near_artifact) + \`\`\` +EOF elif [ "$chain_name" = "terra" ]; then cat <<-EOF >> "$instructions_file" ## Build