Skip to content

Commit

Permalink
first
Browse files Browse the repository at this point in the history
  • Loading branch information
aterga committed Mar 12, 2024
1 parent 50dc6ee commit 7a84697
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion download_release_candidate_wasms.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,6 @@ ICRC1_ARCHIVE_FILENAME="$PWD/ic-icrc1-archive.wasm.gz"
TMP=$(execute_nns_tools_func get_sns_canister_wasm_gz_for_type archive "$RC_ICRC1_ARCHIVE_GIT_HASH")
mv "$TMP" "$ICRC1_ARCHIVE_FILENAME"

ICRC1_INDEX_FILENAME="$PWD/ic-icrc1-index.wasm.gz"
ICRC1_INDEX_FILENAME="$PWD/ic-icrc1-index-ng.wasm.gz"
TMP=$(execute_nns_tools_func get_sns_canister_wasm_gz_for_type index "$RC_ICRC1_INDEX_GIT_HASH")
mv "$TMP" "$ICRC1_INDEX_FILENAME"
12 changes: 8 additions & 4 deletions run_basic_scenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@ set -euo pipefail

cd -- "$(dirname -- "${BASH_SOURCE[0]}")"

# Set the ICP/XDR conversion rate (needed for the NNS Governance and the Neurons' Fund).
./set-icp-xdr-rate.sh 200000

# Deploy test canister
./deploy_test_canister.sh

Expand All @@ -30,12 +33,13 @@ jq -r '.swap_canister_id' -e sns_canister_ids.json
[ "$(./get_sns_canisters.sh | ./bin/idl2json | jq -r '.dapps[0]')" == "$(./bin/dfx canister id test)" ] && echo "OK" || exit 1

# Upgrade test canister (I)
./upgrade_test_canister.sh Hello
./wait_for_last_sns_proposal.sh
./wait_for_canister_running.sh "$(./bin/dfx canister id test)"
# TODO: Make sure the following commands work. Currently, we get "The replica returned a replica error: Replica Error: reject code CanisterError, reject message Canister be2us-64aaa-aaaaa-qaabq-cai violated contract: Error getting performance counter type 1, error code None"
# ./upgrade_test_canister.sh Hello
# ./wait_for_last_sns_proposal.sh
# ./wait_for_canister_running.sh "$(./bin/dfx canister id test)"

# assert the new greeting text
[ "$(./bin/dfx canister call test greet "M")" == '("Hello, M!")' ] && echo "OK" || exit 1
# [ "$(./bin/dfx canister call test greet "M")" == '("Hello, M!")' ] && echo "OK" || exit 1

# Participate in SNS swap
./participate_sns_swap.sh
Expand Down
2 changes: 1 addition & 1 deletion settings.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ export NNS_DAPP_RELEASE="nightly-2023-10-30"
# $ ./gitlab-ci/src/artifacts/newest_sha_with_disk_image.sh origin/master
# from the IC monorepo: https://github.com/dfinity/ic
# if you change IC_COMMIT, then you need to rerun `source install.sh`
export IC_COMMIT="d1315a1b9b002f177526faa5ee6d7e1e1aa3a22a"
export IC_COMMIT="d9e4d6e91c3675903d7b74b6e097d8f12f41ace3"

export TESTNET="local"
6 changes: 5 additions & 1 deletion setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,18 @@ then
. ./download_release_candidate_wasms.sh "${CANDIDATE}"
else
echo "Downloading WASMs at specified IC_COMMIT."
for canister in sns-root-canister "sns-governance-canister${CANISTER_TEST}" sns-swap-canister ic-icrc1-ledger ic-icrc1-archive ic-icrc1-index
for canister in sns-root-canister "sns-governance-canister${CANISTER_TEST}" sns-swap-canister ic-icrc1-ledger ic-icrc1-archive ic-icrc1-index-ng
do
curl -L "https://download.dfinity.systems/ic/${IC_COMMIT}/canisters/${canister}.wasm.gz" -o "${canister}.wasm.gz"
done

mv "./ic-icrc1-index-ng.wasm.gz" "ic-icrc1-index.wasm.gz"

if [ ! -z "${CANISTER_TEST}" ]
then
mv "./sns-governance-canister${CANISTER_TEST}.wasm.gz" ./sns-governance-canister.wasm.gz
fi

SNS_ROOT_CANISTER_FILENAME="./sns-root-canister.wasm.gz"
SNS_GOVERNANCE_CANISTER_FILENAME="./sns-governance-canister.wasm.gz"
SNS_SWAP_CANISTER_FILENAME="./sns-swap-canister.wasm.gz"
Expand Down
5 changes: 4 additions & 1 deletion setup_locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,14 @@ cd -- "$(dirname -- "${BASH_SOURCE[0]}")"

. ./constants.sh normal

for canister in cycles-minting-canister genesis-token-canister governance-canister governance-canister_test ic-ckbtc-minter identity-canister ledger-canister_notify-method lifeline_canister nns-ui-canister registry-canister root-canister sns-wasm-canister sns-root-canister "sns-governance-canister${CANISTER_TEST}" sns-swap-canister ic-icrc1-ledger ic-icrc1-archive ic-icrc1-index
for canister in cycles-minting-canister genesis-token-canister governance-canister governance-canister_test ic-ckbtc-minter identity-canister ledger-canister_notify-method lifeline_canister nns-ui-canister registry-canister root-canister sns-wasm-canister sns-root-canister "sns-governance-canister${CANISTER_TEST}" sns-swap-canister ic-icrc1-ledger ic-icrc1-archive ic-icrc1-index-ng
do
curl -L "https://download.dfinity.systems/ic/${IC_COMMIT}/canisters/${canister}.wasm.gz" -o "${canister}.wasm.gz"
gzip -d "${canister}.wasm.gz"
done

mv "./ic-icrc1-index-ng.wasm" "ic-icrc1-index.wasm"

if [ ! -z "${CANISTER_TEST}" ]
then
mv "./sns-governance-canister${CANISTER_TEST}.wasm" ./sns-governance-canister.wasm
Expand Down

0 comments on commit 7a84697

Please sign in to comment.