@@ -47,9 +47,9 @@ fetch_wasm() {
4747
4848 if [[ " $source " == release ]]; then
4949 if [[ -f " $wasm " ]]; then
50- echo " ==> Reusing ${wasm} " >&2
50+ step " ==> Reusing ${wasm} " >&2
5151 else
52- echo " ==> Downloading contract WASM from release ${version} ..." >&2
52+ step " ==> Downloading contract WASM from release ${version} ..." >&2
5353 require_cmds gh tar
5454 run_cmd gh release download " $version " --repo near/mpc \
5555 --pattern " mpc-contract-v${version} .tar.gz" --dir " $dir " --clobber >&2
@@ -60,7 +60,7 @@ fetch_wasm() {
6060 require_cmds cargo git
6161 local root built
6262 root=$( git -C " $SCRIPT_DIR " rev-parse --show-toplevel)
63- echo " ==> Building the contract from ${root} (local build — not a released artifact)..." >&2
63+ step " ==> Building the contract from ${root} (local build — not a released artifact)..." >&2
6464 ( cd " $root " && run_cmd cargo near build non-reproducible-wasm --features abi \
6565 --profile=release-contract --manifest-path crates/contract/Cargo.toml --locked >&2 )
6666 built=$( find " ${root} /target/near" -maxdepth 1 -name ' *.wasm' -newermt ' -10 minutes' \
@@ -94,24 +94,22 @@ WASM_SIZE=$(wc -c < "$WASM")
9494} > " $SERIALIZED "
9595[[ " $( wc -c < " $SERIALIZED " ) " -eq $(( WASM_SIZE + 6 )) ]] \
9696 || die " serialized.bin has an unexpected length."
97- echo " ==> ${SERIALIZED} ready ($( wc -c < " $SERIALIZED " ) bytes)"
97+ step " ==> ${SERIALIZED} ready ($( wc -c < " $SERIALIZED " ) bytes)"
9898
9999PROPOSER=${MEMBER_ACCOUNTS%% * }
100100PROPOSE_CMD=(near contract call-function as-transaction " $CONTRACT " propose_update
101101 file-args " $SERIALIZED " prepaid-gas ' 100.0 Tgas' attached-deposit " $PROPOSE_DEPOSIT "
102102 sign-as " $PROPOSER " network-config " $NEAR_NET " " $SIGN_WITH " send)
103103
104- echo
105- echo " About to propose the ${VERSION} contract on ${CONTRACT} (${NEAR_NET} )"
104+ step " About to propose the ${VERSION} contract on ${CONTRACT} (${NEAR_NET} )"
106105echo " proposer: ${PROPOSER} , deposit ${PROPOSE_DEPOSIT} "
107106show_cmd " ${PROPOSE_CMD[@]} "
108107confirm " Send propose_update?" || { echo " Aborted before proposing." ; exit 0; }
109108
110109" ${PROPOSE_CMD[@]} " \
111110 || die " propose_update failed (an account low on NEAR is the usual cause — top it up)."
112111
113- echo
114- echo " ==> Pending proposals:"
112+ step " ==> Pending proposals:"
115113run_cmd near contract call-function as-read-only " $CONTRACT " proposed_updates \
116114 json-args ' {}' network-config " $NEAR_NET " now || true
117115
@@ -122,7 +120,6 @@ read -rp "UpdateId to vote on: " UPDATE_ID
122120
123121# The vote that reaches threshold deploys + migrates inline, hence 300 Tgas.
124122for account in $MEMBER_ACCOUNTS ; do
125- echo
126123 vote_cmd=(near contract call-function as-transaction " $CONTRACT " vote_update
127124 json-args " {\" id\" : ${UPDATE_ID} }" prepaid-gas ' 300.0 Tgas' attached-deposit ' 0 NEAR'
128125 sign-as " $account " network-config " $NEAR_NET " " $SIGN_WITH " send)
@@ -131,7 +128,6 @@ for account in $MEMBER_ACCOUNTS; do
131128 " ${vote_cmd[@]} " || echo " vote failed for ${account} ."
132129done
133130
134- echo
135- echo " ==> Contract version (expect ${VERSION} once threshold was reached):"
131+ step " ==> Contract version (expect ${VERSION} once threshold was reached):"
136132run_cmd near contract call-function as-read-only " $CONTRACT " version \
137133 json-args ' {}' network-config " $NEAR_NET " now || true
0 commit comments