From e95067f96680ad4c0910b492b65ae17c9eea523f Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Wed, 26 Apr 2023 16:09:14 +0200 Subject: [PATCH 1/6] Fix lifeline_canister.wasm URL and enable demo_latest. --- .github/workflows/run.yml | 2 +- bin/dfx-nns-wasm-download | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/run.yml b/.github/workflows/run.yml index cf1d036c..95358ba5 100644 --- a/.github/workflows/run.yml +++ b/.github/workflows/run.yml @@ -74,7 +74,7 @@ jobs: path: state.tar.xz retention-days: 3 demo_latest: - if: false # Claim that snsdemo works with the latest IC repo commit (true) or acknowledge that it doesn't (false). + if: true # Claim that snsdemo works with the latest IC repo commit (true) or acknowledge that it doesn't (false). runs-on: ${{ matrix.os }} strategy: fail-fast: false diff --git a/bin/dfx-nns-wasm-download b/bin/dfx-nns-wasm-download index 5999f871..16d9e1af 100755 --- a/bin/dfx-nns-wasm-download +++ b/bin/dfx-nns-wasm-download @@ -137,7 +137,7 @@ get_wasm governance-canister_test.wasm nns-governance.wasm governance-canister.w get_wasm ledger-canister_notify-method.wasm nns-ledger.wasm get_wasm root-canister.wasm nns-root.wasm get_wasm cycles-minting-canister.wasm nns-cmc.wasm -get_wasm lifeline.wasm nns-lifeline.wasm +get_wasm lifeline_canister.wasm nns-lifeline.wasm get_wasm sns-wasm-canister.wasm nns-sns-wasm.wasm get_wasm genesis-token-canister.wasm get_wasm identity-canister.wasm From 85a7251f142fb472e57926b973bba7e3de63b064 Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Wed, 26 Apr 2023 16:19:28 +0200 Subject: [PATCH 2/6] set -x in dfx-network-deploy --- bin/dfx-network-deploy | 2 +- bin/dfx-nns-wasm-download | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/dfx-network-deploy b/bin/dfx-network-deploy index e3578fa1..b17f45c7 100755 --- a/bin/dfx-network-deploy +++ b/bin/dfx-network-deploy @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -euo pipefail +set -xeuo pipefail SOURCE_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" PATH="$SOURCE_DIR:$PATH" diff --git a/bin/dfx-nns-wasm-download b/bin/dfx-nns-wasm-download index 16d9e1af..5999f871 100755 --- a/bin/dfx-nns-wasm-download +++ b/bin/dfx-nns-wasm-download @@ -137,7 +137,7 @@ get_wasm governance-canister_test.wasm nns-governance.wasm governance-canister.w get_wasm ledger-canister_notify-method.wasm nns-ledger.wasm get_wasm root-canister.wasm nns-root.wasm get_wasm cycles-minting-canister.wasm nns-cmc.wasm -get_wasm lifeline_canister.wasm nns-lifeline.wasm +get_wasm lifeline.wasm nns-lifeline.wasm get_wasm sns-wasm-canister.wasm nns-sns-wasm.wasm get_wasm genesis-token-canister.wasm get_wasm identity-canister.wasm From b7ce0da1e1fd5b9306dc8ab67a1b4b6d69729053 Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Wed, 26 Apr 2023 16:33:23 +0200 Subject: [PATCH 3/6] Add an extra alias for lifeline.wasm --- bin/dfx-network-deploy | 2 +- bin/dfx-nns-wasm-download | 2 +- dfx.json | 189 +++++++++++++++++++++++++++++++++++++- 3 files changed, 188 insertions(+), 5 deletions(-) diff --git a/bin/dfx-network-deploy b/bin/dfx-network-deploy index b17f45c7..e3578fa1 100755 --- a/bin/dfx-network-deploy +++ b/bin/dfx-network-deploy @@ -1,5 +1,5 @@ #!/usr/bin/env bash -set -xeuo pipefail +set -euo pipefail SOURCE_DIR="$(dirname "$(realpath "${BASH_SOURCE[0]}")")" PATH="$SOURCE_DIR:$PATH" diff --git a/bin/dfx-nns-wasm-download b/bin/dfx-nns-wasm-download index 5999f871..56660eff 100755 --- a/bin/dfx-nns-wasm-download +++ b/bin/dfx-nns-wasm-download @@ -137,7 +137,7 @@ get_wasm governance-canister_test.wasm nns-governance.wasm governance-canister.w get_wasm ledger-canister_notify-method.wasm nns-ledger.wasm get_wasm root-canister.wasm nns-root.wasm get_wasm cycles-minting-canister.wasm nns-cmc.wasm -get_wasm lifeline.wasm nns-lifeline.wasm +get_wasm lifeline_canister.wasm nns-lifeline.wasm lifeline.wasm get_wasm sns-wasm-canister.wasm nns-sns-wasm.wasm get_wasm genesis-token-canister.wasm get_wasm identity-canister.wasm diff --git a/dfx.json b/dfx.json index d4ba0f98..68213a05 100644 --- a/dfx.json +++ b/dfx.json @@ -1,5 +1,131 @@ { "canisters": { + "internet_identity": { + "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did", + "remote": { + "candid": "internet_identity.did", + "id": { + "__default": "qhbym-qaaaa-aaaaa-aaafq-cai", + "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai" + } + }, + "shrink": false, + "type": "custom", + "wasm": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm" + }, + "nns-cycles-minting": { + "build": "", + "candid": "candid/nns-cycles-minting.did", + "remote": { + "id": { + "ic": "rkp4c-7iaaa-aaaaa-aaaca-cai", + "local": "rkp4c-7iaaa-aaaaa-aaaca-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-dapp": { + "candid": "https://raw.githubusercontent.com/dfinity/nns-dapp/proposal-86037/rs/nns-dapp.did", + "remote": { + "id": { + "__default": "qsgjb-riaaa-aaaaa-aaaga-cai", + "ic": "qoctq-giaaa-aaaaa-aaaea-cai", + "local": "qsgjb-riaaa-aaaaa-aaaga-cai", + "mainnet": "qoctq-giaaa-aaaaa-aaaea-cai" + } + }, + "type": "custom", + "wasm": "https://github.com/dfinity/nns-dapp/releases/download/tip/nns-dapp_t2.wasm" + }, + "nns-genesis-token": { + "build": "", + "candid": "candid/nns-genesis-token.did", + "remote": { + "id": { + "ic": "renrk-eyaaa-aaaaa-aaada-cai", + "local": "renrk-eyaaa-aaaaa-aaada-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-governance": { + "build": "", + "candid": "candid/nns-governance.did", + "remote": { + "id": { + "ic": "rrkah-fqaaa-aaaaa-aaaaq-cai", + "local": "rrkah-fqaaa-aaaaa-aaaaq-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-ledger": { + "build": "", + "candid": "candid/nns-ledger.did", + "remote": { + "id": { + "ic": "ryjl3-tyaaa-aaaaa-aaaba-cai", + "local": "ryjl3-tyaaa-aaaaa-aaaba-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-lifeline": { + "build": "", + "candid": "candid/nns-lifeline.did", + "remote": { + "id": { + "ic": "rno2w-sqaaa-aaaaa-aaacq-cai", + "local": "rno2w-sqaaa-aaaaa-aaacq-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-registry": { + "build": "", + "candid": "candid/nns-registry.did", + "remote": { + "id": { + "ic": "rwlgt-iiaaa-aaaaa-aaaaa-cai", + "local": "rwlgt-iiaaa-aaaaa-aaaaa-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-root": { + "build": "", + "candid": "candid/nns-root.did", + "remote": { + "id": { + "ic": "r7inp-6aaaa-aaaaa-aaabq-cai", + "local": "r7inp-6aaaa-aaaaa-aaabq-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "nns-sns-wasm": { + "build": "", + "candid": "candid/nns-sns-wasm.did", + "remote": { + "id": { + "ic": "qaa6y-5yaaa-aaaaa-aaafa-cai", + "local": "qaa6y-5yaaa-aaaaa-aaafa-cai" + } + }, + "type": "custom", + "wasm": "" + }, + "smiley_dapp": { + "main": "src/smiley_dapp/main.mo", + "type": "motoko" + }, "smiley_dapp_assets": { "dependencies": [ "smiley_dapp" @@ -13,9 +139,66 @@ ], "type": "assets" }, - "smiley_dapp": { - "main": "src/smiley_dapp/main.mo", - "type": "motoko" + "sns_aggregator": { + "build": "true", + "candid": "placeholder", + "type": "custom", + "wasm": "placeholder" + }, + "sns_governance": { + "build": "", + "candid": "candid/sns_governance.did", + "type": "custom", + "wasm": "", + "remote": { + "id": { + "local": "sgymv-uiaaa-aaaaa-aaaia-cai" + } + } + }, + "sns_index": { + "build": "", + "candid": "candid/sns_index.did", + "type": "custom", + "wasm": "", + "remote": { + "id": { + "local": "sp3hj-caaaa-aaaaa-aaajq-cai" + } + } + }, + "sns_ledger": { + "build": "", + "candid": "candid/sns_ledger.did", + "type": "custom", + "wasm": "", + "remote": { + "id": { + "local": "sbzkb-zqaaa-aaaaa-aaaiq-cai" + } + } + }, + "sns_root": { + "build": "", + "candid": "candid/sns_root.did", + "type": "custom", + "wasm": "", + "remote": { + "id": { + "local": "q3fc5-haaaa-aaaaa-aaahq-cai" + } + } + }, + "sns_swap": { + "build": "", + "candid": "candid/sns_swap.did", + "type": "custom", + "wasm": "", + "remote": { + "id": { + "local": "si2b5-pyaaa-aaaaa-aaaja-cai" + } + } } }, "defaults": { From 4af4a8fcec54bc4d8ef40be7886bea2e7b7a8442 Mon Sep 17 00:00:00 2001 From: Formatting Committer Date: Wed, 26 Apr 2023 14:34:00 +0000 Subject: [PATCH 4/6] Updating frontend formatting --- dfx.json | 189 +------------------------------------------------------ 1 file changed, 3 insertions(+), 186 deletions(-) diff --git a/dfx.json b/dfx.json index 68213a05..d4ba0f98 100644 --- a/dfx.json +++ b/dfx.json @@ -1,131 +1,5 @@ { "canisters": { - "internet_identity": { - "candid": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity.did", - "remote": { - "candid": "internet_identity.did", - "id": { - "__default": "qhbym-qaaaa-aaaaa-aaafq-cai", - "ic": "rdmx6-jaaaa-aaaaa-aaadq-cai" - } - }, - "shrink": false, - "type": "custom", - "wasm": "https://github.com/dfinity/internet-identity/releases/latest/download/internet_identity_dev.wasm" - }, - "nns-cycles-minting": { - "build": "", - "candid": "candid/nns-cycles-minting.did", - "remote": { - "id": { - "ic": "rkp4c-7iaaa-aaaaa-aaaca-cai", - "local": "rkp4c-7iaaa-aaaaa-aaaca-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-dapp": { - "candid": "https://raw.githubusercontent.com/dfinity/nns-dapp/proposal-86037/rs/nns-dapp.did", - "remote": { - "id": { - "__default": "qsgjb-riaaa-aaaaa-aaaga-cai", - "ic": "qoctq-giaaa-aaaaa-aaaea-cai", - "local": "qsgjb-riaaa-aaaaa-aaaga-cai", - "mainnet": "qoctq-giaaa-aaaaa-aaaea-cai" - } - }, - "type": "custom", - "wasm": "https://github.com/dfinity/nns-dapp/releases/download/tip/nns-dapp_t2.wasm" - }, - "nns-genesis-token": { - "build": "", - "candid": "candid/nns-genesis-token.did", - "remote": { - "id": { - "ic": "renrk-eyaaa-aaaaa-aaada-cai", - "local": "renrk-eyaaa-aaaaa-aaada-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-governance": { - "build": "", - "candid": "candid/nns-governance.did", - "remote": { - "id": { - "ic": "rrkah-fqaaa-aaaaa-aaaaq-cai", - "local": "rrkah-fqaaa-aaaaa-aaaaq-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-ledger": { - "build": "", - "candid": "candid/nns-ledger.did", - "remote": { - "id": { - "ic": "ryjl3-tyaaa-aaaaa-aaaba-cai", - "local": "ryjl3-tyaaa-aaaaa-aaaba-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-lifeline": { - "build": "", - "candid": "candid/nns-lifeline.did", - "remote": { - "id": { - "ic": "rno2w-sqaaa-aaaaa-aaacq-cai", - "local": "rno2w-sqaaa-aaaaa-aaacq-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-registry": { - "build": "", - "candid": "candid/nns-registry.did", - "remote": { - "id": { - "ic": "rwlgt-iiaaa-aaaaa-aaaaa-cai", - "local": "rwlgt-iiaaa-aaaaa-aaaaa-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-root": { - "build": "", - "candid": "candid/nns-root.did", - "remote": { - "id": { - "ic": "r7inp-6aaaa-aaaaa-aaabq-cai", - "local": "r7inp-6aaaa-aaaaa-aaabq-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "nns-sns-wasm": { - "build": "", - "candid": "candid/nns-sns-wasm.did", - "remote": { - "id": { - "ic": "qaa6y-5yaaa-aaaaa-aaafa-cai", - "local": "qaa6y-5yaaa-aaaaa-aaafa-cai" - } - }, - "type": "custom", - "wasm": "" - }, - "smiley_dapp": { - "main": "src/smiley_dapp/main.mo", - "type": "motoko" - }, "smiley_dapp_assets": { "dependencies": [ "smiley_dapp" @@ -139,66 +13,9 @@ ], "type": "assets" }, - "sns_aggregator": { - "build": "true", - "candid": "placeholder", - "type": "custom", - "wasm": "placeholder" - }, - "sns_governance": { - "build": "", - "candid": "candid/sns_governance.did", - "type": "custom", - "wasm": "", - "remote": { - "id": { - "local": "sgymv-uiaaa-aaaaa-aaaia-cai" - } - } - }, - "sns_index": { - "build": "", - "candid": "candid/sns_index.did", - "type": "custom", - "wasm": "", - "remote": { - "id": { - "local": "sp3hj-caaaa-aaaaa-aaajq-cai" - } - } - }, - "sns_ledger": { - "build": "", - "candid": "candid/sns_ledger.did", - "type": "custom", - "wasm": "", - "remote": { - "id": { - "local": "sbzkb-zqaaa-aaaaa-aaaiq-cai" - } - } - }, - "sns_root": { - "build": "", - "candid": "candid/sns_root.did", - "type": "custom", - "wasm": "", - "remote": { - "id": { - "local": "q3fc5-haaaa-aaaaa-aaahq-cai" - } - } - }, - "sns_swap": { - "build": "", - "candid": "candid/sns_swap.did", - "type": "custom", - "wasm": "", - "remote": { - "id": { - "local": "si2b5-pyaaa-aaaaa-aaaja-cai" - } - } + "smiley_dapp": { + "main": "src/smiley_dapp/main.mo", + "type": "motoko" } }, "defaults": { From 37e58f953cf1bb8a057f3eb0e85c81dce0022a2f Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Wed, 26 Apr 2023 16:50:20 +0200 Subject: [PATCH 5/6] Use dfx-nns-wasm-download --- bin/dfx-network-deploy | 1 + bin/dfx-nns-wasm-download | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/bin/dfx-network-deploy b/bin/dfx-network-deploy index e3578fa1..8897f3b7 100755 --- a/bin/dfx-network-deploy +++ b/bin/dfx-network-deploy @@ -56,6 +56,7 @@ if [[ "$DFX_NETWORK" == "local" ]]; then curl "https://download.dfinity.systems/ic/${DFX_IC_COMMIT}/canisters/sns-wasm-canister.wasm.gz" | gunzip >"${WASM_DIR}/sns-wasm-canister.wasm" dfx start --clean --background + dfx-nns-wasm-download --ic_commit "$DFX_IC_COMMIT" dfx nns install dfx-nns-import diff --git a/bin/dfx-nns-wasm-download b/bin/dfx-nns-wasm-download index 56660eff..663d35ee 100755 --- a/bin/dfx-nns-wasm-download +++ b/bin/dfx-nns-wasm-download @@ -28,7 +28,7 @@ help_text() { Default: '$DOWNLOAD_DIR' The download dir is printed on stdout for use by other programs. - --commit + --ic_commit Commit in the IC repo. Note: Not all commits are available as artifacts to download. @@ -54,7 +54,7 @@ while (($# > 0)); do } >&2 shift 1 ;; - --ic-commit) + --ic_commit) DFX_IC_COMMIT="$1" shift 1 ;; From 4926ea84ab8364cd3763293c274356ddae72c48f Mon Sep 17 00:00:00 2001 From: David de Kloet Date: Wed, 26 Apr 2023 17:02:24 +0200 Subject: [PATCH 6/6] Use --download-dir --- bin/dfx-network-deploy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/dfx-network-deploy b/bin/dfx-network-deploy index 8897f3b7..19ad31a5 100755 --- a/bin/dfx-network-deploy +++ b/bin/dfx-network-deploy @@ -56,7 +56,7 @@ if [[ "$DFX_NETWORK" == "local" ]]; then curl "https://download.dfinity.systems/ic/${DFX_IC_COMMIT}/canisters/sns-wasm-canister.wasm.gz" | gunzip >"${WASM_DIR}/sns-wasm-canister.wasm" dfx start --clean --background - dfx-nns-wasm-download --ic_commit "$DFX_IC_COMMIT" + dfx-nns-wasm-download --ic_commit "$DFX_IC_COMMIT" --download-dir "$(dfx cache show)/wasms" dfx nns install dfx-nns-import