diff --git a/.github/workflows/hosting-photo-storage-example.yml b/.github/workflows/hosting-photo-storage-example.yml index 4888c10e5..5662b0448 100644 --- a/.github/workflows/hosting-photo-storage-example.yml +++ b/.github/workflows/hosting-photo-storage-example.yml @@ -27,7 +27,7 @@ jobs: npm install npm run build # verify that frontend asset canister deploys - dfx start --background + dfx start --background --clean --pocketic dfx deploy popd hosting-photo-storage-linux: @@ -43,6 +43,6 @@ jobs: npm install npm run build # verify that frontend asset canister deploys - dfx start --background + dfx start --background --clean --pocketic dfx deploy popd diff --git a/.github/workflows/hosting-static-website-example.yaml b/.github/workflows/hosting-static-website-example.yaml index b672fbe2a..7080aa22e 100644 --- a/.github/workflows/hosting-static-website-example.yaml +++ b/.github/workflows/hosting-static-website-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Hosting Static Website Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd hosting/static-website dfx deploy popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Hosting Static Website Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd hosting/static-website dfx deploy popd diff --git a/.github/workflows/hosting-unity-webgl-example.yaml b/.github/workflows/hosting-unity-webgl-example.yaml index fd501e106..69ea0f7a6 100644 --- a/.github/workflows/hosting-unity-webgl-example.yaml +++ b/.github/workflows/hosting-unity-webgl-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Hosting Unity Webgl Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd hosting/unity-webgl-template dfx deploy popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Hosting Unity Webgl Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd hosting/unity-webgl-template dfx deploy popd diff --git a/.github/workflows/motoko-basic-bitcoin.yaml b/.github/workflows/motoko-basic-bitcoin.yaml index 407997189..b6365e22a 100644 --- a/.github/workflows/motoko-basic-bitcoin.yaml +++ b/.github/workflows/motoko-basic-bitcoin.yaml @@ -26,7 +26,7 @@ jobs: uses: ZenVoich/setup-mops@v1 - name: Motoko Basic Bitcoin Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/basic_bitcoin dfx deploy basic_bitcoin --argument '(variant { regtest })' popd @@ -42,7 +42,7 @@ jobs: uses: ZenVoich/setup-mops@v1 - name: Motoko Basic Bitcoin Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/basic_bitcoin dfx deploy basic_bitcoin --argument '(variant { regtest })' popd diff --git a/.github/workflows/motoko-basic-dao-example.yml b/.github/workflows/motoko-basic-dao-example.yml index 45dc5c9a3..08e3d5176 100644 --- a/.github/workflows/motoko-basic-dao-example.yml +++ b/.github/workflows/motoko-basic-dao-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko DAO Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/basic_dao dfx canister create basic_dao dfx build @@ -39,7 +39,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko DAO Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/basic_dao dfx canister create basic_dao dfx build diff --git a/.github/workflows/motoko-canister-logs-example.yml b/.github/workflows/motoko-canister-logs-example.yml index d17af5cb6..fe0375cc7 100644 --- a/.github/workflows/motoko-canister-logs-example.yml +++ b/.github/workflows/motoko-canister-logs-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Canister Logs Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/canister_logs make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Canister Logs Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/canister_logs make test popd diff --git a/.github/workflows/motoko-cert_var-example.yaml b/.github/workflows/motoko-cert_var-example.yaml index f5db37e07..3c339463f 100644 --- a/.github/workflows/motoko-cert_var-example.yaml +++ b/.github/workflows/motoko-cert_var-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Certified Variable Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/cert-var make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Certified Variable Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/cert-var make test popd diff --git a/.github/workflows/motoko-classes-example.yaml b/.github/workflows/motoko-classes-example.yaml index 4d1f8ab23..31d987979 100644 --- a/.github/workflows/motoko-classes-example.yaml +++ b/.github/workflows/motoko-classes-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Classes Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/classes make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Classes Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/classes make test popd diff --git a/.github/workflows/motoko-composite-query-example.yaml b/.github/workflows/motoko-composite-query-example.yaml index bda8446e3..b2753e315 100644 --- a/.github/workflows/motoko-composite-query-example.yaml +++ b/.github/workflows/motoko-composite-query-example.yaml @@ -23,7 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Composite Query Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/composite_query make test popd @@ -35,7 +35,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Composite Query Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/composite_query make test popd diff --git a/.github/workflows/motoko-counter-example.yaml b/.github/workflows/motoko-counter-example.yaml index 23742ccba..5344c9de4 100644 --- a/.github/workflows/motoko-counter-example.yaml +++ b/.github/workflows/motoko-counter-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Counter Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/counter make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Counter Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/counter make test popd diff --git a/.github/workflows/motoko-hello_cycles-example.yaml b/.github/workflows/motoko-hello_cycles-example.yaml index 2a62b9ea7..5ee836648 100644 --- a/.github/workflows/motoko-hello_cycles-example.yaml +++ b/.github/workflows/motoko-hello_cycles-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Hello Cycles Darwin run: | - dfx start --background --clean + dfx start --background --clean --pocketic pushd motoko/hello_cycles make test popd @@ -35,7 +35,7 @@ jobs: - name: Motoko Hello Cycles Linux run: | dfxvm update - dfx start --background --clean + dfx start --background --clean --pocketic pushd motoko/hello_cycles make test popd diff --git a/.github/workflows/motoko-icrc2-swap-example.yml b/.github/workflows/motoko-icrc2-swap-example.yml index 2f1f73639..02c7dc9b2 100644 --- a/.github/workflows/motoko-icrc2-swap-example.yml +++ b/.github/workflows/motoko-icrc2-swap-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko ICRC2-Swap Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/icrc2-swap npm install sleep 10 diff --git a/.github/workflows/motoko-internet-identity-integration-example.yaml b/.github/workflows/motoko-internet-identity-integration-example.yaml index 9ec2c3ec9..3d374708f 100644 --- a/.github/workflows/motoko-internet-identity-integration-example.yaml +++ b/.github/workflows/motoko-internet-identity-integration-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Internet Identity Integration Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/internet_identity_integration make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Internet Identity Integration Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/internet_identity_integration make test popd diff --git a/.github/workflows/motoko-life-example.yaml b/.github/workflows/motoko-life-example.yaml index 36888b0e1..b311ed628 100644 --- a/.github/workflows/motoko-life-example.yaml +++ b/.github/workflows/motoko-life-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Life Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/life make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Life Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/life make test popd diff --git a/.github/workflows/motoko-minimal-counter-dapp-example.yaml b/.github/workflows/motoko-minimal-counter-dapp-example.yaml index 22e2c4cb1..79dc7eb72 100644 --- a/.github/workflows/motoko-minimal-counter-dapp-example.yaml +++ b/.github/workflows/motoko-minimal-counter-dapp-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Minimal Counter Dapp Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/minimal-counter-dapp make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Minimal Counter Dapp Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/minimal-counter-dapp make test popd diff --git a/.github/workflows/motoko-parallel-calls-example.yml b/.github/workflows/motoko-parallel-calls-example.yml index d55ec51fb..4be4eacee 100644 --- a/.github/workflows/motoko-parallel-calls-example.yml +++ b/.github/workflows/motoko-parallel-calls-example.yml @@ -25,7 +25,7 @@ jobs: - name: Rust Parallel-Calls Darwin run: | pushd motoko/parallel_calls - dfx start --background + dfx start --background --clean --pocketic make test popd motoko-parallel-calls-linux: @@ -39,6 +39,6 @@ jobs: - name: Rust Parallel-Calls Linux run: | pushd motoko/parallel_calls - dfx start --background + dfx start --background --clean --pocketic make test popd diff --git a/.github/workflows/motoko-pub-sub-example.yaml b/.github/workflows/motoko-pub-sub-example.yaml index 24ed4d4de..3f91b14f6 100644 --- a/.github/workflows/motoko-pub-sub-example.yaml +++ b/.github/workflows/motoko-pub-sub-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Pub-Sub Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/pub-sub make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Pub-Sub Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/pub-sub make test popd diff --git a/.github/workflows/motoko-query-stats.yaml b/.github/workflows/motoko-query-stats.yaml index 70e953093..1681f0c66 100644 --- a/.github/workflows/motoko-query-stats.yaml +++ b/.github/workflows/motoko-query-stats.yaml @@ -23,7 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Query Stats Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/query_stats dfx deploy query_stats popd @@ -37,7 +37,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Query Stats Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/query_stats dfx deploy query_stats popd diff --git a/.github/workflows/motoko-random_maze-example.yaml b/.github/workflows/motoko-random_maze-example.yaml index f56059bf3..834f53a8a 100644 --- a/.github/workflows/motoko-random_maze-example.yaml +++ b/.github/workflows/motoko-random_maze-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Random Maze Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/random_maze make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Random Maze Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/random_maze make test popd diff --git a/.github/workflows/motoko-send-http-get-example.yml b/.github/workflows/motoko-send-http-get-example.yml index 6d54e9720..10665af10 100644 --- a/.github/workflows/motoko-send-http-get-example.yml +++ b/.github/workflows/motoko-send-http-get-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Send HTTP GET Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/send_http_get make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Send HTTP GET Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/send_http_get make test popd diff --git a/.github/workflows/motoko-send-http-post-example.yml b/.github/workflows/motoko-send-http-post-example.yml index 9d8b19b85..c7f009edd 100644 --- a/.github/workflows/motoko-send-http-post-example.yml +++ b/.github/workflows/motoko-send-http-post-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Send HTTP POST Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/send_http_post make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Send HTTP POST Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/send_http_post make test popd diff --git a/.github/workflows/motoko-superheroes-example.yaml b/.github/workflows/motoko-superheroes-example.yaml index 34fa48837..09e44dccc 100644 --- a/.github/workflows/motoko-superheroes-example.yaml +++ b/.github/workflows/motoko-superheroes-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Superheroes Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/superheroes make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Superheroes Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/superheroes make test popd diff --git a/.github/workflows/motoko-threshold-ecdsa-example.yaml b/.github/workflows/motoko-threshold-ecdsa-example.yaml index 3006ab321..b9ccacfb8 100644 --- a/.github/workflows/motoko-threshold-ecdsa-example.yaml +++ b/.github/workflows/motoko-threshold-ecdsa-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Threshold ECDSA Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/threshold-ecdsa dfx deploy npm install @@ -36,7 +36,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Threshold ECDSA Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/threshold-ecdsa dfx deploy npm install diff --git a/.github/workflows/motoko-threshold-schnorr-example.yaml b/.github/workflows/motoko-threshold-schnorr-example.yaml index 836663eb9..c927df44d 100644 --- a/.github/workflows/motoko-threshold-schnorr-example.yaml +++ b/.github/workflows/motoko-threshold-schnorr-example.yaml @@ -21,7 +21,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Threshold Schnorr Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/threshold-schnorr npm install make test @@ -33,7 +33,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Threshold Schnorr Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/threshold-schnorr npm install - make test + make test \ No newline at end of file diff --git a/.github/workflows/motoko-vetkd-example.yml b/.github/workflows/motoko-vetkd-example.yml index 068480f96..94e02b3c1 100644 --- a/.github/workflows/motoko-vetkd-example.yml +++ b/.github/workflows/motoko-vetkd-example.yml @@ -24,7 +24,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko vetKD Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/vetkd make test popd @@ -36,7 +36,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko vetKD Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/vetkd make test popd diff --git a/.github/workflows/motoko-whoami-example.yaml b/.github/workflows/motoko-whoami-example.yaml index 0979b61df..3ef3c2845 100644 --- a/.github/workflows/motoko-whoami-example.yaml +++ b/.github/workflows/motoko-whoami-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Motoko Who Am I Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/whoami make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Motoko Who Am I Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd motoko/whoami make test popd diff --git a/.github/workflows/provision-darwin.sh b/.github/workflows/provision-darwin.sh index de1bdfb3e..059149eaf 100755 --- a/.github/workflows/provision-darwin.sh +++ b/.github/workflows/provision-darwin.sh @@ -38,8 +38,8 @@ if [ -f "${GITHUB_WORKSPACE}/.ic-commit" ]; then fi # Install ic-repl -version=0.7.0 -curl --location --output ic-repl "https://github.com/chenyan2002/ic-repl/releases/download/$version/ic-repl-macos" +version=0.7.7 +curl --location --output ic-repl "https://github.com/dfinity/ic-repl/releases/download/$version/ic-repl-macos" mv ./ic-repl /usr/local/bin/ic-repl chmod a+x /usr/local/bin/ic-repl diff --git a/.github/workflows/provision-linux.sh b/.github/workflows/provision-linux.sh index 38e6a5e24..d4074aff5 100755 --- a/.github/workflows/provision-linux.sh +++ b/.github/workflows/provision-linux.sh @@ -32,8 +32,8 @@ if [ -f "${GITHUB_WORKSPACE}/.ic-commit" ]; then fi # Install ic-repl -version=0.7.0 -curl --location --output ic-repl "https://github.com/chenyan2002/ic-repl/releases/download/$version/ic-repl-linux64" +version=0.7.7 +curl --location --output ic-repl "https://github.com/dfinity/ic-repl/releases/download/$version/ic-repl-linux64" mv ./ic-repl /usr/local/bin/ic-repl chmod a+x /usr/local/bin/ic-repl diff --git a/.github/workflows/rust-basic-bitcoin-example.yml b/.github/workflows/rust-basic-bitcoin-example.yml index db5d293b4..67fb1a5e1 100644 --- a/.github/workflows/rust-basic-bitcoin-example.yml +++ b/.github/workflows/rust-basic-bitcoin-example.yml @@ -24,7 +24,7 @@ jobs: brew install llvm - name: Rust Basic Bitcoin Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/basic_bitcoin make deploy popd @@ -36,7 +36,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Basic Bitcoin Linux run: | - dfx start --background --clean + dfx start --background --clean --pocketic pushd rust/basic_bitcoin make deploy popd diff --git a/.github/workflows/rust-basic-dao-example.yml b/.github/workflows/rust-basic-dao-example.yml index 0298a72d5..e845933eb 100644 --- a/.github/workflows/rust-basic-dao-example.yml +++ b/.github/workflows/rust-basic-dao-example.yml @@ -23,7 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust DAO Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/basic_dao dfx canister create basic_dao dfx build @@ -40,7 +40,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust DAO Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/basic_dao dfx canister create basic_dao dfx build diff --git a/.github/workflows/rust-canister-info-example.yml b/.github/workflows/rust-canister-info-example.yml index cc6ddcb1e..74b655c6b 100644 --- a/.github/workflows/rust-canister-info-example.yml +++ b/.github/workflows/rust-canister-info-example.yml @@ -23,7 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Canister info Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/canister-info cargo test make test @@ -36,7 +36,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Canister info Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/canister-info cargo test make test diff --git a/.github/workflows/rust-canister-logs-example.yml b/.github/workflows/rust-canister-logs-example.yml index c869ea27a..9562dcbaf 100644 --- a/.github/workflows/rust-canister-logs-example.yml +++ b/.github/workflows/rust-canister-logs-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Canister Logs Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/canister_logs make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Canister Logs Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/canister_logs make test popd diff --git a/.github/workflows/rust-canister-snapshots-example.yaml b/.github/workflows/rust-canister-snapshots-example.yaml index 3a1c22719..71ee69fab 100644 --- a/.github/workflows/rust-canister-snapshots-example.yaml +++ b/.github/workflows/rust-canister-snapshots-example.yaml @@ -24,7 +24,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Canister Snapshots Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/canister-snapshots make test popd @@ -38,7 +38,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Canister Snapshots Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/canister-snapshots make test popd diff --git a/.github/workflows/rust-composite_query-example.yml b/.github/workflows/rust-composite_query-example.yml index f36b4aac0..bcee35cd6 100644 --- a/.github/workflows/rust-composite_query-example.yml +++ b/.github/workflows/rust-composite_query-example.yml @@ -24,10 +24,10 @@ jobs: - name: Rust composite_query Darwin run: | pushd rust/composite_query - dfx start --background - dfx canister create data_partition + dfx start --background --clean --pocketic + dfx canister create data_partition --no-wallet dfx build data_partition - dfx canister create kv_frontend + dfx canister create kv_frontend --no-wallet dfx build kv_frontend dfx canister install kv_frontend dfx canister call kv_frontend put '(1, 1337)' @@ -42,10 +42,10 @@ jobs: - name: Rust composite_query Linux run: | pushd rust/composite_query - dfx start --background - dfx canister create data_partition + dfx start --background --clean --pocketic + dfx canister create data_partition --no-wallet dfx build data_partition - dfx canister create kv_frontend + dfx canister create kv_frontend --no-wallet dfx build kv_frontend dfx canister install kv_frontend dfx canister call kv_frontend put '(1, 1337)' diff --git a/.github/workflows/rust-counter-example.yml b/.github/workflows/rust-counter-example.yml index 353138b0a..a2e13a531 100644 --- a/.github/workflows/rust-counter-example.yml +++ b/.github/workflows/rust-counter-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Counter Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/counter make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Counter Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/counter make test popd diff --git a/.github/workflows/rust-face-recognition-example.yaml b/.github/workflows/rust-face-recognition-example.yaml index 26478e5ba..ba180fad8 100644 --- a/.github/workflows/rust-face-recognition-example.yaml +++ b/.github/workflows/rust-face-recognition-example.yaml @@ -24,7 +24,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Face Recognition Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/face-recognition npm install dfx deploy --yes @@ -39,7 +39,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Face Recognition Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/face-recognition npm install dfx deploy --yes diff --git a/.github/workflows/rust-hello-example.yml b/.github/workflows/rust-hello-example.yml index 27a934c02..cc2b96bf1 100644 --- a/.github/workflows/rust-hello-example.yml +++ b/.github/workflows/rust-hello-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Hello Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/hello make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Hello Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/hello make test popd diff --git a/.github/workflows/rust-image-classification-example.yaml b/.github/workflows/rust-image-classification-example.yaml index b0b1021b6..9f0e72f93 100644 --- a/.github/workflows/rust-image-classification-example.yaml +++ b/.github/workflows/rust-image-classification-example.yaml @@ -24,7 +24,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Image Classification Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/image-classification make test popd @@ -38,7 +38,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Image Classification Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/image-classification make test popd diff --git a/.github/workflows/rust-nft-wallet-example.yml b/.github/workflows/rust-nft-wallet-example.yml index 7069bbf96..1214494ed 100644 --- a/.github/workflows/rust-nft-wallet-example.yml +++ b/.github/workflows/rust-nft-wallet-example.yml @@ -27,7 +27,7 @@ jobs: - name: Rust NFT Wallet Darwin run: | pushd rust/nft-wallet - dfx start --background --host 127.0.0.1:4943 + dfx start --background --clean --pocketic --host 127.0.0.1:4943 bash ./deploy.sh dfx canister call nftwallet owned_nfts popd @@ -44,7 +44,7 @@ jobs: - name: Rust NFT Wallet Linux run: | pushd rust/nft-wallet - dfx start --background --host 127.0.0.1:4943 + dfx start --background --clean --pocketic --host 127.0.0.1:4943 bash ./deploy.sh dfx canister call nftwallet owned_nfts popd diff --git a/.github/workflows/rust-parallel-calls-example.yml b/.github/workflows/rust-parallel-calls-example.yml index 31847279e..f05f951cc 100644 --- a/.github/workflows/rust-parallel-calls-example.yml +++ b/.github/workflows/rust-parallel-calls-example.yml @@ -25,7 +25,7 @@ jobs: - name: Rust Parallel-Calls Darwin run: | pushd rust/parallel_calls - dfx start --background + dfx start --background --clean --pocketic make test popd rust-parallel-calls-linux: @@ -39,7 +39,7 @@ jobs: - name: Rust Parallel-Calls Linux run: | pushd rust/parallel_calls - dfx start --background + dfx start --background --clean --pocketic make test popd rust-parallel-calls-pocket-ic-linux: diff --git a/.github/workflows/rust-performance_counters-example.yaml b/.github/workflows/rust-performance_counters-example.yaml index 231aa09a1..b86d7f8fb 100644 --- a/.github/workflows/rust-performance_counters-example.yaml +++ b/.github/workflows/rust-performance_counters-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Performance Counters Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/performance_counters make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Performance Counters Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/performance_counters make test popd diff --git a/.github/workflows/rust-periodic_tasks-example.yaml b/.github/workflows/rust-periodic_tasks-example.yaml index 274d0e15a..96302f383 100644 --- a/.github/workflows/rust-periodic_tasks-example.yaml +++ b/.github/workflows/rust-periodic_tasks-example.yaml @@ -24,7 +24,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Periodic Tasks Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/periodic_tasks make test popd @@ -38,7 +38,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust Periodic Tasks Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/periodic_tasks make test popd diff --git a/.github/workflows/rust-pub-sub-example.yml b/.github/workflows/rust-pub-sub-example.yml index 663b8eaf1..f12bf382a 100644 --- a/.github/workflows/rust-pub-sub-example.yml +++ b/.github/workflows/rust-pub-sub-example.yml @@ -26,7 +26,7 @@ jobs: - name: Rust Pub-Sub Darwin run: | pushd rust/pub-sub - dfx start --background + dfx start --background --clean --pocketic make install make test popd @@ -41,7 +41,7 @@ jobs: - name: Rust Pub-Sub Linux run: | pushd rust/pub-sub - dfx start --background + dfx start --background --clean --pocketic make install make test popd diff --git a/.github/workflows/rust-qrcode-example.yaml b/.github/workflows/rust-qrcode-example.yaml index fd54f3c13..be6d97900 100644 --- a/.github/workflows/rust-qrcode-example.yaml +++ b/.github/workflows/rust-qrcode-example.yaml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust QRCode Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/qrcode make test popd @@ -34,7 +34,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust QRCode Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/qrcode make test popd diff --git a/.github/workflows/rust-query-stats.yaml b/.github/workflows/rust-query-stats.yaml index 7080b4c2e..169a68d22 100644 --- a/.github/workflows/rust-query-stats.yaml +++ b/.github/workflows/rust-query-stats.yaml @@ -23,7 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Query Stats Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/query_stats dfx deploy query_stats popd @@ -37,7 +37,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Query Stats Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/query_stats dfx deploy query_stats popd diff --git a/.github/workflows/rust-send-http-get-example.yml b/.github/workflows/rust-send-http-get-example.yml index 5ae847f9c..dd71feeaf 100644 --- a/.github/workflows/rust-send-http-get-example.yml +++ b/.github/workflows/rust-send-http-get-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Send HTTP GET Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/send_http_get RUSTFLAGS=-Ctarget-cpu=mvp make test popd @@ -35,7 +35,7 @@ jobs: - name: Rust Send HTTP GET Linux run: | dfxvm update - dfx start --background + dfx start --background --clean --pocketic pushd rust/send_http_get RUSTFLAGS=-Ctarget-cpu=mvp make test popd diff --git a/.github/workflows/rust-send-http-post-example.yml b/.github/workflows/rust-send-http-post-example.yml index fd6dff21a..0986b45d6 100644 --- a/.github/workflows/rust-send-http-post-example.yml +++ b/.github/workflows/rust-send-http-post-example.yml @@ -22,7 +22,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Send HTTP POST Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/send_http_post RUSTFLAGS=-Ctarget-cpu=mvp make test popd @@ -35,7 +35,7 @@ jobs: - name: Rust Send HTTP POST Linux run: | dfxvm update - dfx start --background + dfx start --background --clean --pocketic pushd rust/send_http_post RUSTFLAGS=-Ctarget-cpu=mvp make test popd diff --git a/.github/workflows/rust-simd-example.yaml b/.github/workflows/rust-simd-example.yaml index 52becd29a..33291d46c 100644 --- a/.github/workflows/rust-simd-example.yaml +++ b/.github/workflows/rust-simd-example.yaml @@ -24,7 +24,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust SIMD Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/simd make test popd @@ -38,7 +38,7 @@ jobs: run: rm -f ~/.config/dfx/networks.json - name: Rust SIMD Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/simd make test popd diff --git a/.github/workflows/rust-threshold-ecdsa-example.yml b/.github/workflows/rust-threshold-ecdsa-example.yml index abca6f66b..a84c453a7 100644 --- a/.github/workflows/rust-threshold-ecdsa-example.yml +++ b/.github/workflows/rust-threshold-ecdsa-example.yml @@ -23,7 +23,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust Threshold ECDSA Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/threshold-ecdsa dfx deploy npm install @@ -37,7 +37,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust Threshold ECDSA Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/threshold-ecdsa dfx deploy npm install diff --git a/.github/workflows/rust-threshold-schnorr-example.yml b/.github/workflows/rust-threshold-schnorr-example.yml index 829993779..6098c495f 100644 --- a/.github/workflows/rust-threshold-schnorr-example.yml +++ b/.github/workflows/rust-threshold-schnorr-example.yml @@ -27,7 +27,7 @@ jobs: run: bash .github/workflows/provision-pocket-ic-server.sh - name: Rust Threshold Schnorr Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/threshold-schnorr make deploy # This should be re-enabled when Pocket IC supports threshold Schnorr @@ -43,7 +43,7 @@ jobs: run: bash .github/workflows/provision-pocket-ic-server.sh - name: Rust Threshold Schnorr Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/threshold-schnorr make deploy # This should be re-enabled when Pocket IC supports threshold Schnorr diff --git a/.github/workflows/rust-vetkd-example.yml b/.github/workflows/rust-vetkd-example.yml index d42176658..51e621e07 100644 --- a/.github/workflows/rust-vetkd-example.yml +++ b/.github/workflows/rust-vetkd-example.yml @@ -24,7 +24,7 @@ jobs: run: bash .github/workflows/provision-darwin.sh - name: Rust vetKD Darwin run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/vetkd make test popd @@ -36,7 +36,7 @@ jobs: run: bash .github/workflows/provision-linux.sh - name: Rust vetKD Linux run: | - dfx start --background + dfx start --background --clean --pocketic pushd rust/vetkd make test popd diff --git a/archive/motoko/auth_client_demo/package.json b/archive/motoko/auth_client_demo/package.json index f91b77f38..5b846f684 100644 --- a/archive/motoko/auth_client_demo/package.json +++ b/archive/motoko/auth_client_demo/package.json @@ -15,7 +15,7 @@ "prebuild": "npm run generate", "start": "vite src/auth_client_demo_assets/vanilla --config vite.config.js", "start:vanilla": "vite src/auth_client_demo_assets/vanilla --config vite.config.js", - "start:dfx": "dfx start --background --clean --host \"127.0.0.1:4943\"", + "start:dfx": "dfx start --pocketic --background --clean --host \"127.0.0.1:4943\"", "start:react": "vite src/auth_client_demo_assets/react --config vite.config.react.js", "build:react": "vite build src/auth_client_demo_assets/react --config vite.config.react.js", "start:vue": "vite src/auth_client_demo_assets/vue --config vite.config.vue.js", diff --git a/archive/motoko/defi/scripts/install.sh b/archive/motoko/defi/scripts/install.sh index 575a76d1e..4aaea8b37 100755 --- a/archive/motoko/defi/scripts/install.sh +++ b/archive/motoko/defi/scripts/install.sh @@ -1,5 +1,5 @@ set -e -dfx stop && dfx start --background --clean --host 127.0.0.1:8000 +dfx stop && dfx start --pocketic --background --clean --host 127.0.0.1:8000 ### === DEPLOY LOCAL LEDGER ===== diff --git a/archive/motoko/dip721-nft-container/demo.sh b/archive/motoko/dip721-nft-container/demo.sh index b9357af65..b3a07d057 100755 --- a/archive/motoko/dip721-nft-container/demo.sh +++ b/archive/motoko/dip721-nft-container/demo.sh @@ -3,7 +3,7 @@ dfx stop set -e trap 'dfx stop' EXIT -dfx start --background --clean +dfx start --pocketic --background --clean dfx identity new alice --disable-encryption || true ALICE=$(dfx --identity alice identity get-principal) dfx identity new bob --disable-encryption || true diff --git a/archive/motoko/ios-notifications/dapp-demo/Makefile b/archive/motoko/ios-notifications/dapp-demo/Makefile index cf8a2d633..599895ac6 100644 --- a/archive/motoko/ios-notifications/dapp-demo/Makefile +++ b/archive/motoko/ios-notifications/dapp-demo/Makefile @@ -4,7 +4,7 @@ all: build .PHONY: build .SILENT: build build: - dfx start --clean --background + dfx start --pocketic --clean --background dfx canister create ios_notifications_api dfx build ios_notifications_api diff --git a/motoko/classes/Makefile b/motoko/classes/Makefile index 53fc16104..265243603 100644 --- a/motoko/classes/Makefile +++ b/motoko/classes/Makefile @@ -4,7 +4,7 @@ all: build .PHONY: build .SILENT: build build: - dfx canister create --all + dfx canister create --all --no-wallet dfx build .PHONY: install diff --git a/motoko/composite_query/Makefile b/motoko/composite_query/Makefile index c1deb5608..cf61c4a22 100644 --- a/motoko/composite_query/Makefile +++ b/motoko/composite_query/Makefile @@ -4,7 +4,7 @@ all: build .PHONY: build .SILENT: build build: - dfx canister create --all + dfx canister create --all --no-wallet dfx build .PHONY: install diff --git a/motoko/encrypted-notes-dapp-vetkd/Makefile b/motoko/encrypted-notes-dapp-vetkd/Makefile index ad722ed16..8beb09001 100644 --- a/motoko/encrypted-notes-dapp-vetkd/Makefile +++ b/motoko/encrypted-notes-dapp-vetkd/Makefile @@ -16,7 +16,7 @@ test-e2e: echo "Pre deploy script succeeded" npm install rm -fr .dfx - dfx start --clean --background + dfx start --pocketic --clean --background dfx deploy internet_identity --argument '(null)' dfx canister create vetkd_system_api --specified-id s55qq-oqaaa-aaaaa-aaakq-cai dfx deploy vetkd_system_api diff --git a/motoko/encrypted-notes-dapp-vetkd/deploy_locally_impl.sh b/motoko/encrypted-notes-dapp-vetkd/deploy_locally_impl.sh index 74cfda635..2bb550d48 100644 --- a/motoko/encrypted-notes-dapp-vetkd/deploy_locally_impl.sh +++ b/motoko/encrypted-notes-dapp-vetkd/deploy_locally_impl.sh @@ -2,7 +2,7 @@ npm install rm -fr .dfx -dfx start --clean --background +dfx start --pocketic --clean --background dfx deploy internet_identity --argument '(null)' dfx deploy encrypted_notes_${BUILD_ENV} dfx generate encrypted_notes_${BUILD_ENV} diff --git a/motoko/encrypted-notes-dapp/Makefile b/motoko/encrypted-notes-dapp/Makefile index 997cda5cc..aa96ebb71 100644 --- a/motoko/encrypted-notes-dapp/Makefile +++ b/motoko/encrypted-notes-dapp/Makefile @@ -15,7 +15,7 @@ test-e2e: echo "Pre deploy script succeeded" npm install rm -fr .dfx - dfx start --clean --background + dfx start --pocketic --clean --background dfx deploy internet_identity --argument '(null)' dfx deploy encrypted_notes_${BUILD_ENV} dfx generate encrypted_notes_${BUILD_ENV} diff --git a/motoko/encrypted-notes-dapp/deploy_locally_impl.sh b/motoko/encrypted-notes-dapp/deploy_locally_impl.sh index 74cfda635..2bb550d48 100644 --- a/motoko/encrypted-notes-dapp/deploy_locally_impl.sh +++ b/motoko/encrypted-notes-dapp/deploy_locally_impl.sh @@ -2,7 +2,7 @@ npm install rm -fr .dfx -dfx start --clean --background +dfx start --pocketic --clean --background dfx deploy internet_identity --argument '(null)' dfx deploy encrypted_notes_${BUILD_ENV} dfx generate encrypted_notes_${BUILD_ENV} diff --git a/motoko/hello_cycles/Makefile b/motoko/hello_cycles/Makefile index 262521e0d..a145d27f8 100644 --- a/motoko/hello_cycles/Makefile +++ b/motoko/hello_cycles/Makefile @@ -26,19 +26,19 @@ test: install echo "wallet: $(WALLET)" echo "hello_cycles: $(HELLO_CYCLES)" echo "$(dfx canister call hello_cycles wallet_balance)" - # canister has just above 3T cycles, so output start with '(3' + # canister has just above 2.5T cycles, so output start with '(2_5' dfx canister call hello_cycles wallet_balance \ - | grep '(3' && echo 'PASS' + | grep '(2_5' && echo 'PASS' dfx canister status hello_cycles dfx canister call $(WALLET) wallet_send '(record { canister = principal "$(HELLO_CYCLES)"; amount = (2000000000000:nat64); } )' - # 2T cycles added, now contains just above 5T + # 2T cycles added, now contains just above 4.5T dfx canister call hello_cycles wallet_balance \ - | grep '(5' && echo 'PASS' + | grep '(4_5' && echo 'PASS' echo '(func "$(WALLET)"."wallet_receive", 5000000)' dfx canister call hello_cycles transfer '(func "$(WALLET)"."wallet_receive", 5000000)' \ | grep '0' && echo 'PASS' dfx canister call hello_cycles wallet_balance \ - | grep '(5' && echo 'PASS' + | grep '(4_5' && echo 'PASS' .PHONY: clean .SILENT: clean diff --git a/motoko/ic-pos/package.json b/motoko/ic-pos/package.json index 54ba8bdd1..0420d2f82 100644 --- a/motoko/ic-pos/package.json +++ b/motoko/ic-pos/package.json @@ -28,7 +28,7 @@ "build": "tsc && vite build", "lint": "eslint src --ext ts,tsx --report-unused-disable-directives --max-warnings 0", "preview": "vite preview", - "dfx:start": "dfx start --background", + "dfx:start": "dfx start --pocketic --background", "dfx:deploy:local": "dfx deploy --network=local --argument '(0)'", "dfx:deploy:ic": "dfx deploy --network=ic --argument '(64051)'", "dfx:generate": "dfx generate" diff --git a/motoko/ic-pos/scripts/deploy.sh b/motoko/ic-pos/scripts/deploy.sh index 20b658c6f..22691a4b8 100644 --- a/motoko/ic-pos/scripts/deploy.sh +++ b/motoko/ic-pos/scripts/deploy.sh @@ -10,7 +10,7 @@ cd "$(dirname "$0")" dfx killall # Start the local Internet Computer replica -dfx start --clean --background +dfx start --clean --background --pocketic # Deploy the internet identity canister dfx deploy internet_identity diff --git a/motoko/icp_transfer/demo.sh b/motoko/icp_transfer/demo.sh index e80053da4..acc7fec31 100755 --- a/motoko/icp_transfer/demo.sh +++ b/motoko/icp_transfer/demo.sh @@ -4,7 +4,7 @@ set -e trap 'dfx stop' EXIT echo "===========SETUP=========" -dfx start --background --clean +dfx start --pocketic --background --clean dfx deploy icp_ledger_canister --argument "(variant { Init = record { minting_account = \"$(dfx ledger --identity anonymous account-id)\"; diff --git a/motoko/icrc2-swap/test/swap/agent.ts b/motoko/icrc2-swap/test/swap/agent.ts index d8e08f382..25c01bc00 100644 --- a/motoko/icrc2-swap/test/swap/agent.ts +++ b/motoko/icrc2-swap/test/swap/agent.ts @@ -57,9 +57,9 @@ export function createActor( }); } -// Ask dfx where the the replica is running. This is a total hack to work -// around `dfx start` launching on a random port each time. -const dfxPort = execSync("dfx info replica-port", { encoding: "utf-8" }); +// Ask dfx where the the webserver is running. This is a total hack to work +// around `dfx start --pocketic` launching on a random port each time. +const dfxPort = execSync("dfx info webserver-port", { encoding: "utf-8" }); export function agent(identity?: Identity) { const a = new HttpAgent({ diff --git a/motoko/parallel_calls/Makefile b/motoko/parallel_calls/Makefile index c6636ce91..5787a7eeb 100644 --- a/motoko/parallel_calls/Makefile +++ b/motoko/parallel_calls/Makefile @@ -4,7 +4,7 @@ all: test .PHONY: deploy .SILENT: deploy build: - dfx deploy + dfx deploy --no-wallet .PHONY: test .SILENT: test @@ -18,4 +18,4 @@ test: build .PHONY: clean .SILENT: clean clean: - rm -rf .dfx \ No newline at end of file + rm -rf .dfx diff --git a/motoko/token_transfer/demo.sh b/motoko/token_transfer/demo.sh index 55d3ab6a5..227fac11d 100755 --- a/motoko/token_transfer/demo.sh +++ b/motoko/token_transfer/demo.sh @@ -4,7 +4,7 @@ set -e trap 'dfx stop' EXIT echo "===========SETUP=========" -dfx start --background --clean +dfx start --pocketic --background --clean export MINTER=$(dfx --identity anonymous identity get-principal) export DEFAULT=$(dfx identity get-principal) dfx deploy icrc1_ledger_canister --argument "(variant { Init = diff --git a/motoko/token_transfer_from/demo.sh b/motoko/token_transfer_from/demo.sh index 84e4e0c0e..66a8e0c43 100755 --- a/motoko/token_transfer_from/demo.sh +++ b/motoko/token_transfer_from/demo.sh @@ -4,7 +4,7 @@ set -e trap 'dfx stop' EXIT echo "===========SETUP=========" -dfx start --background --clean +dfx start --pocketic --background --clean dfx deploy icrc1_ledger_canister --argument "(variant { Init = record { token_symbol = \"ICRC1\"; diff --git a/rust/composite_query/Cargo.lock b/rust/composite_query/Cargo.lock index a8cbeb9a4..0f5adf776 100644 --- a/rust/composite_query/Cargo.lock +++ b/rust/composite_query/Cargo.lock @@ -150,7 +150,7 @@ dependencies = [ "anyhow", "binread", "byteorder", - "candid_derive", + "candid_derive 0.5.0", "codespan-reporting", "crc32fast", "data-encoding", @@ -163,13 +163,36 @@ dependencies = [ "num-traits", "num_enum", "paste", - "pretty", + "pretty 0.10.0", "serde", "serde_bytes", "sha2", "thiserror", ] +[[package]] +name = "candid" +version = "0.10.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c30ee7f886f296b6422c0ff017e89dd4f831521dfdcc76f3f71aae1ce817222" +dependencies = [ + "anyhow", + "binread", + "byteorder", + "candid_derive 0.6.6", + "hex", + "ic_principal", + "leb128", + "num-bigint", + "num-traits", + "paste", + "pretty 0.12.3", + "serde", + "serde_bytes", + "stacker", + "thiserror", +] + [[package]] name = "candid_derive" version = "0.5.0" @@ -182,6 +205,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "candid_derive" +version = "0.6.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3de398570c386726e7a59d9887b68763c481477f9a043fb998a2e09d428df1a9" +dependencies = [ + "lazy_static", + "proc-macro2", + "quote", + "syn 2.0.48", +] + [[package]] name = "cc" version = "1.0.83" @@ -299,9 +334,9 @@ checksum = "7e962a19be5cfc3f3bf6dd8f61eb50107f356ad6270fbb3ed41476571db78be5" name = "data_partition" version = "1.0.0" dependencies = [ - "candid", - "ic-cdk", - "ic-cdk-macros", + "candid 0.8.4", + "ic-cdk 0.8.1", + "ic-cdk-macros 0.6.10", "ic-cdk-optimizer", "ic-stable-structures", ] @@ -473,9 +508,22 @@ version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1faa7b42964694fb38d7f62172e0d8261381e39ce85b4d6b519929f7cad9b4fb" dependencies = [ - "candid", - "ic-cdk-macros", - "ic0", + "candid 0.8.4", + "ic-cdk-macros 0.6.10", + "ic0 0.18.11", + "serde", + "serde_bytes", +] + +[[package]] +name = "ic-cdk" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd8ecacd682fa05a985253592963306cb9799622d7b1cce4b1edb89c6ec85be1" +dependencies = [ + "candid 0.10.10", + "ic-cdk-macros 0.16.0", + "ic0 0.23.0", "serde", "serde_bytes", ] @@ -486,14 +534,28 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebf50458685a0fc6b0e414cdba487610aeb199ac94db52d9fd76270565debee7" dependencies = [ - "candid", + "candid 0.8.4", "proc-macro2", "quote", "serde", - "serde_tokenstream", + "serde_tokenstream 0.1.7", "syn 1.0.109", ] +[[package]] +name = "ic-cdk-macros" +version = "0.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d4d857135deef20cc7ea8f3869a30cd9cfeb1392b3a81043790b2cd82adc3e0" +dependencies = [ + "candid 0.10.10", + "proc-macro2", + "quote", + "serde", + "serde_tokenstream 0.2.2", + "syn 2.0.48", +] + [[package]] name = "ic-cdk-optimizer" version = "0.3.5" @@ -518,6 +580,25 @@ version = "0.18.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "576c539151d4769fb4d1a0c25c4108dd18facd04c5695b02cf2d226ab4e43aa5" +[[package]] +name = "ic0" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8de254dd67bbd58073e23dc1c8553ba12fa1dc610a19de94ad2bbcd0460c067f" + +[[package]] +name = "ic_principal" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1762deb6f7c8d8c2bdee4b6c5a47b60195b74e9b5280faa5ba29692f8e17429c" +dependencies = [ + "crc32fast", + "data-encoding", + "serde", + "sha2", + "thiserror", +] + [[package]] name = "indexmap" version = "1.9.3" @@ -568,9 +649,9 @@ checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" name = "kv_frontend" version = "1.0.0" dependencies = [ - "candid", - "ic-cdk", - "ic-cdk-macros", + "candid 0.10.10", + "ic-cdk 0.16.0", + "ic-cdk-macros 0.16.0", "ic-cdk-optimizer", ] @@ -819,6 +900,17 @@ dependencies = [ "typed-arena", ] +[[package]] +name = "pretty" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b55c4d17d994b637e2f4daf6e5dc5d660d209d5642377d675d7a1c3ab69fa579" +dependencies = [ + "arrayvec", + "typed-arena", + "unicode-width", +] + [[package]] name = "proc-macro-crate" version = "1.3.1" @@ -862,6 +954,15 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "psm" +version = "0.1.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa37f80ca58604976033fae9515a8a2989fc13797d953f7c04fb8fa36a11f205" +dependencies = [ + "cc", +] + [[package]] name = "quote" version = "1.0.35" @@ -1008,6 +1109,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "serde_tokenstream" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64060d864397305347a78851c51588fd283767e7e7589829e8121d65512340f1" +dependencies = [ + "proc-macro2", + "quote", + "serde", + "syn 2.0.48", +] + [[package]] name = "sha2" version = "0.10.8" @@ -1031,6 +1144,19 @@ version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" +[[package]] +name = "stacker" +version = "0.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c886bd4480155fd3ef527d45e9ac8dd7118a898a46530b7b94c3e21866259fce" +dependencies = [ + "cc", + "cfg-if", + "libc", + "psm", + "winapi", +] + [[package]] name = "string_cache" version = "0.8.7" diff --git a/rust/composite_query/src/kv_frontend/Cargo.toml b/rust/composite_query/src/kv_frontend/Cargo.toml index 67f4838aa..bba266a56 100644 --- a/rust/composite_query/src/kv_frontend/Cargo.toml +++ b/rust/composite_query/src/kv_frontend/Cargo.toml @@ -8,7 +8,7 @@ crate-type = ["cdylib"] path = "lib.rs" [dependencies] -candid = "0.8.4" -ic-cdk = "0.8.1" -ic-cdk-macros = "0.6.10" +candid = "0.10.10" +ic-cdk = "0.16.0" +ic-cdk-macros = "0.16.0" ic-cdk-optimizer = "0.3.5" diff --git a/rust/composite_query/src/kv_frontend/lib.rs b/rust/composite_query/src/kv_frontend/lib.rs index b5a8a40b3..684fe2fc5 100644 --- a/rust/composite_query/src/kv_frontend/lib.rs +++ b/rust/composite_query/src/kv_frontend/lib.rs @@ -1,8 +1,10 @@ -use ic_cdk::api::call::{call}; -use ic_cdk::api::management_canister::main::{CreateCanisterArgument, create_canister, InstallCodeArgument, install_code, CanisterInstallMode}; +use candid::Principal; +use ic_cdk::api::call::call; +use ic_cdk::api::management_canister::main::{ + create_canister, install_code, CanisterInstallMode, CreateCanisterArgument, InstallCodeArgument, +}; use ic_cdk::api::management_canister::provisional::CanisterSettings; use ic_cdk_macros::{query, update}; -use candid::Principal; use std::sync::Arc; use std::sync::RwLock; @@ -20,7 +22,6 @@ thread_local! { #[update] async fn put(key: u128, value: u128) -> Option { - // Create partitions if they don't exist yet if CANISTER_IDS.with(|canister_ids| { let canister_ids = canister_ids.read().unwrap(); @@ -32,12 +33,16 @@ async fn put(key: u128, value: u128) -> Option { } let canister_id = get_partition_for_key(key); - ic_cdk::println!("Put in frontend for key={} .. using backend={}", key, canister_id.to_text()); - match call(canister_id, "put", (key, value), ).await { + ic_cdk::println!( + "Put in frontend for key={} .. using backend={}", + key, + canister_id.to_text() + ); + match call(canister_id, "put", (key, value)).await { Ok(r) => { let (res,): (Option,) = r; res - }, + } Err(_) => None, } } @@ -45,12 +50,16 @@ async fn put(key: u128, value: u128) -> Option { #[query(composite = true)] async fn get(key: u128) -> Option { let canister_id = get_partition_for_key(key); - ic_cdk::println!("Get in frontend for key={} .. using backend={}", key, canister_id.to_text()); - match call(canister_id, "get", (key, ), ).await { + ic_cdk::println!( + "Get in frontend for key={} .. using backend={}", + key, + canister_id.to_text() + ); + match call(canister_id, "get", (key,)).await { Ok(r) => { let (res,): (Option,) = r; res - }, + } Err(_) => None, } } @@ -58,12 +67,16 @@ async fn get(key: u128) -> Option { #[update] async fn get_update(key: u128) -> Option { let canister_id = get_partition_for_key(key); - ic_cdk::println!("Get as update in frontend for key={} .. using backend={}", key, canister_id.to_text()); - match call(canister_id, "get", (key, ), ).await { + ic_cdk::println!( + "Get as update in frontend for key={} .. using backend={}", + key, + canister_id.to_text() + ); + match call(canister_id, "get", (key,)).await { Ok(r) => { let (res,): (Option,) = r; res - }, + } Err(_) => None, } } @@ -79,23 +92,31 @@ fn get_partition_for_key(key: u128) -> Principal { #[query(composite = true)] fn lookup(key: u128) -> (u128, String) { let r = key % NUM_PARTITIONS as u128; - (r, CANISTER_IDS.with(|canister_ids| { - let canister_ids = canister_ids.read().unwrap(); - canister_ids[r as usize].to_text() - })) + ( + r, + CANISTER_IDS.with(|canister_ids| { + let canister_ids = canister_ids.read().unwrap(); + canister_ids[r as usize].to_text() + }), + ) } async fn create_data_partition_canister_from_wasm() { let create_args = CreateCanisterArgument { settings: Some(CanisterSettings { controllers: Some(vec![ic_cdk::id()]), - compute_allocation: Some(0.into()), - memory_allocation: Some(0.into()), - freezing_threshold: Some(0.into()), - }) + compute_allocation: Some(0_u64.into()), + memory_allocation: Some(0_u64.into()), + freezing_threshold: Some(0_u64.into()), + log_visibility: None, + reserved_cycles_limit: None, + wasm_memory_limit: None, + }), }; - let canister_record = create_canister(create_args).await.unwrap(); + const T: u128 = 1_000_000_000_000; + + let canister_record = create_canister(create_args, 10 * T).await.unwrap(); let canister_id = canister_record.0.canister_id; ic_cdk::println!("Created canister {}", canister_id); diff --git a/rust/defi/scripts/install.sh b/rust/defi/scripts/install.sh index 575a76d1e..4aaea8b37 100755 --- a/rust/defi/scripts/install.sh +++ b/rust/defi/scripts/install.sh @@ -1,5 +1,5 @@ set -e -dfx stop && dfx start --background --clean --host 127.0.0.1:8000 +dfx stop && dfx start --pocketic --background --clean --host 127.0.0.1:8000 ### === DEPLOY LOCAL LEDGER ===== diff --git a/rust/dip721-nft-container/demo.sh b/rust/dip721-nft-container/demo.sh index a7d02f7fc..c5ec16204 100755 --- a/rust/dip721-nft-container/demo.sh +++ b/rust/dip721-nft-container/demo.sh @@ -3,7 +3,7 @@ dfx stop set -e trap 'dfx stop' EXIT -dfx start --background --clean +dfx start --pocketic --background --clean dfx deploy --argument 'record{name="DFX Blobs";symbol="DFXB";custodians=null;logo=null}' dip721_nft_container dfx identity new alice --disable-encryption || true dfx identity new bob --disable-encryption || true diff --git a/rust/icp_transfer/demo.sh b/rust/icp_transfer/demo.sh index 038c28694..ba2efe3df 100755 --- a/rust/icp_transfer/demo.sh +++ b/rust/icp_transfer/demo.sh @@ -4,7 +4,7 @@ set -e trap 'dfx stop' EXIT echo "===========SETUP=========" -dfx start --background --clean +dfx start --pocketic --background --clean dfx identity new alice_icp_transfer --storage-mode plaintext --force export MINTER_ACCOUNT_ID=$(dfx --identity anonymous ledger account-id) export DEFAULT_ACCOUNT_ID=$(dfx ledger account-id) diff --git a/rust/nft-wallet/deploy.sh b/rust/nft-wallet/deploy.sh index 58f9dfc97..bc2277e5a 100755 --- a/rust/nft-wallet/deploy.sh +++ b/rust/nft-wallet/deploy.sh @@ -8,7 +8,7 @@ for param do export DFX_NETWORK=ic fi done -dfx deploy nftwallet "$@" +dfx deploy nftwallet --no-wallet "$@" canister=$(dfx canister ${networkparam:+"$networkparam"} id nftwallet) PATH="$PATH:$PWD/target/bin" if ! command -v icx-asset &> /dev/null ; then diff --git a/rust/nft-wallet/start.sh b/rust/nft-wallet/start.sh index 7a16a2ce8..dbfb7b2b7 100755 --- a/rust/nft-wallet/start.sh +++ b/rust/nft-wallet/start.sh @@ -2,7 +2,7 @@ killall dfx replica set -e git submodule update --init --recursive rm -rf .dfx/ ./internet-identity/.dfx/ -dfx start --background --clean --host 127.0.0.1:8000 +dfx start --pocketic --background --clean --host 127.0.0.1:8000 II_FETCH_ROOT_KEY=1 dfx deploy internet_identity --no-wallet --argument '(null)' npm install ./deploy.sh --no-wallet --argument null diff --git a/rust/parallel_calls/Makefile b/rust/parallel_calls/Makefile index 5517c6ca4..a23d09881 100644 --- a/rust/parallel_calls/Makefile +++ b/rust/parallel_calls/Makefile @@ -4,7 +4,7 @@ all: test .PHONY: deploy .SILENT: deploy build: - dfx deploy + dfx deploy --no-wallet .PHONY: test .SILENT: test @@ -18,4 +18,4 @@ test: build .PHONY: clean .SILENT: clean clean: - rm -rf .dfx \ No newline at end of file + rm -rf .dfx diff --git a/rust/token_transfer/demo.sh b/rust/token_transfer/demo.sh index 1e7a87619..be40561e2 100755 --- a/rust/token_transfer/demo.sh +++ b/rust/token_transfer/demo.sh @@ -4,7 +4,7 @@ dfx stop # trap 'dfx stop' EXIT echo "===========SETUP=========" -dfx start --background --clean +dfx start --pocketic --background --clean dfx identity new alice_token_transfer --storage-mode plaintext --force export MINTER=$(dfx --identity anonymous identity get-principal) export DEFAULT=$(dfx identity get-principal) diff --git a/rust/token_transfer_from/demo.sh b/rust/token_transfer_from/demo.sh index e7c43bf43..d41d94d33 100755 --- a/rust/token_transfer_from/demo.sh +++ b/rust/token_transfer_from/demo.sh @@ -4,7 +4,7 @@ set -e trap 'dfx stop' EXIT echo "===========SETUP=========" -dfx start --background --clean +dfx start --pocketic --background --clean dfx deploy icrc1_ledger_canister --argument "(variant { Init = record { token_symbol = \"ICRC1\";