You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
chore(local): add a ckRED test token and a mock exchange rate canister to the local network - #8124
The icp-cli network of #8123 has no test token and no exchange rate canister. The two import token end-to-end tests and the TVL test are skipped because of that. The snsdemo snapshot had a ckRED ICRC token and a mock exchange rate canister for them.
Changes
Added the ckred_ledger and ckred_index canisters to icp.yaml, with the ICRC ledger and index wasms of the IC commit in config.json, and deployed them from scripts/icp-network-start on an application subnet with the test account of the "Get tokens" menu as the holder of the initial supply.
Added the xrc mock of the exchange rate canister to icp.yaml, created with the mainnet canister ID through the PocketIC REST API by the new scripts/icp-canister-create-with-id, and set its ICP price to 9 USD.
Installed the token and the mock only when the canister has no code, so a rerun of the start script keeps their state.
Enabled the import-token and import-token-anonymous-validation end-to-end tests and the TVL test of the test-rest job again, and made the TVL test poll for the refreshed rate.
Added the ckRED logo and a README under mocks/ckred.
The import token end-to-end tests need an ICRC token with an index.
The ledger and index wasms come from the IC commit in config.json. The
test account of the Get tokens menu holds the initial supply.
► .github/workflows/build.yml - name: Test TVL run:
Enhancement
► frontend/src/tests/e2e/README.md - Some tests are skipped, because they need an SNS project or ckBTC, which the local network does not have. (updated wording)
Enhancement
► frontend/src/tests/e2e/import-token-anonymous-validation.spec.ts - test(...) replacing test.skip(...) for Import token deep link validates the URL canisters anonymously
Enhancement
► frontend/src/tests/e2e/import-token.spec.ts - test(...) replacing test.skip(...) for Test imported tokens
Enhancement
► scripts/icp-network-start - Deploys the ckRED test token - Deploys a mock exchange rate canister with the mainnet canister ID - Deploys and configures ckred_ledger, ckred_index, xrc canisters
Enhancement
► scripts/icp-canister-create-with-id - New script to create a canister with a given ID via PocketIC REST API (non-default method)
Enhancement
► scripts/nns-dapp/test-tvl - Use icp canister call for governance total_locked_e8s instead of dfx canister call - Upgrade path for nns-dapp with args file and environment local replaced, plus polling for TVL equality
… only once
The TVL of the nns-dapp needs the exchange rate canister with its
mainnet ID. A rerun of the start script no longer upgrades the ckRED
ledger with Init arguments.
yhabib
changed the title
chore(local): add a ckRED test token to the local network
chore(local): add a ckRED test token and a mock exchange rate canister to the local network
Oct 27, 2026
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Default startup can deploy the exchange-rate mock after the initial backend refresh, leaving TVL at zero until the six-hour refresh.
No open issues 🎉
1 previously missed issue
In code that hasn't changed since last review
Trigger TVL refresh after XRC deployment on startup
scripts/icp-network-start:194
On the documented startup path without --nns_dapp_wasm, nns-dapp is already running before XRC is deployed. If its one-second initial refresh runs before deployment, TVL can remain zero until the six-hour refresh (rs/backend/src/tvl.rs:33-36), since installing the mock does not restart that timer. Trigger a refresh after XRC deployment on this path too, or make XRC available before the backend's first refresh.
Intentional. Without --nns_dapp_wasm the network keeps the bundled nns-dapp nightly, and its TVL refreshes again after six hours. The TVL test and the CI jobs install the wasm after the mocks, which refreshes the rate at once.
…S end-to-end tests again (#8125)
# Motivation
The local icp-cli network has no SNS project, so the SNS end-to-end
tests `sns-participation.spec.ts` and `sns-governance.spec.ts` are
skipped since #8123. The old snsdemo snapshot had the projects that the
tests expect. The `aggregator_test` job is also disabled, because its
helper scripts use dfx and the snsdemo scripts.
A fresh `scripts/icp-network-start` takes about five and a half minutes,
four minutes of it for the SNS projects. A start on a running network
takes one minute.
# Changes
- Added `scripts/icp-sns-create`, which creates an SNS project through a
`CreateServiceNervousSystem` proposal of the large NNS neuron of the
anonymous principal, buys the swap on request, and funds the test
account of the "Get tokens" menu.
- Added `scripts/icp-sns-aggregator-wait`, which speeds up the SNS
aggregator until it lists every SNS project, then restores its
configuration.
- Added a step to `scripts/icp-network-start` that creates Alfa Centauri
and Delta with a committed swap, and Bravo and Charlie with an open
swap, see `mocks/sns/README.md`.
- Enabled the two SNS end-to-end tests again.
- Enabled the `aggregator_test` job, ported its helper scripts from dfx
to icp, and let the job create nine more projects for the pagination
test.
- Updated HACKING.md, the end-to-end README and the unreleased
changelog.
---
Prev. #8124
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
The new NNS/SNS lifecycle and persisted-state paths require live validation against the pinned PocketIC launcher for clean startup, interrupted-run recovery, and upgrade/downgrade compatibility, which static review cannot establish.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
The icp-cli network of #8123 has no test token and no exchange rate canister. The two import token end-to-end tests and the TVL test are skipped because of that. The snsdemo snapshot had a ckRED ICRC token and a mock exchange rate canister for them.
Changes
ckred_ledgerandckred_indexcanisters toicp.yaml, with the ICRC ledger and index wasms of the IC commit inconfig.json, and deployed them fromscripts/icp-network-starton an application subnet with the test account of the "Get tokens" menu as the holder of the initial supply.xrcmock of the exchange rate canister toicp.yaml, created with the mainnet canister ID through the PocketIC REST API by the newscripts/icp-canister-create-with-id, and set its ICP price to 9 USD.import-tokenandimport-token-anonymous-validationend-to-end tests and the TVL test of thetest-restjob again, and made the TVL test poll for the refreshed rate.mocks/ckred.Prev. #8123