Repository navigation
Conversation
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.
… 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.
…e of an installed mock
|
✅ No security or compliance issues detected. Reviewed everything up to 8ad4a49. Security OverviewDetected Code Changes
|
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Callers suppress Bash’s errexit, allowing a failed status pipeline to incorrectly indicate that a canister is installed, skip deployment, and report readiness without canister code.
1 open issue
What changed in this PR
Restores token-import and total-value-locked testing on the local icp-cli network introduced in #8123.
Changes:
- Adds a ckRED ledger and index, plus a mock exchange rate canister using the mainnet ID.
- Preserves installed mock state when restarting the network.
- Re-enables the affected tests and adds polling for refreshed TVL values.
| File | Description |
|---|---|
scripts/nns-dapp/test-tvl |
Migrates calls to icp-cli and polls for updated TVL. |
scripts/icp-network-start |
Deploys ckRED and the exchange rate mock. |
scripts/icp-canister-create-with-id |
Creates a fixed-ID canister through PocketIC. |
mocks/ckred/README.md |
Documents the test token and initial funding. |
mocks/ckred/ckRED-logo.svg |
Adds the ckRED token logo. |
icp.yaml |
Registers pinned ledger, index, and exchange rate mock builds. |
HACKING.md |
Documents the added local-network mocks. |
frontend/src/tests/e2e/README.md |
Updates the remaining test-skip explanation. |
frontend/src/tests/e2e/import-token.spec.ts |
Re-enables token-import testing. |
frontend/src/tests/e2e/import-token-anonymous-validation.spec.ts |
Re-enables anonymous deep-link validation testing. |
CHANGELOG-Nns-Dapp-unreleased.md |
Records restored local functionality and tests. |
.github/workflows/build.yml |
Restores the TVL test in CI. |
.config/spellcheck.dic |
Adds ckRED to the spelling dictionary. |
Review effort: Balanced
The callers run is_installed in an || chain, which turns errexit off inside the function. A failed status request then looked like an installed canister.
artkorotkikh-dfinity
approved these changes
Nov 3, 2026
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 3, 2026 16:11
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
On fresh networks started without --nns_dapp_wasm, the backend can fetch exchange rates before XRC is deployed, leaving TVL at zero for six hours because no refresh is triggered afterward.
1 open issue
Review effort: Balanced
On a fresh network without --nns_dapp_wasm, the nns-dapp of the launcher reads the ICP price before the mock exchange rate canister exists. The total value locked then stays zero for six hours. The script prints a note in that case, and HACKING.md explains it.
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 3, 2026 20:19
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 3, 2026 20:32
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 3, 2026 20:40
…l-ckred-token # Conflicts: # .config/spellcheck.dic
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 4, 2026 07:51
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 4, 2026 08:00
Copilot
AI
dismissed their stale review, a newer Copilot review was requested
November 4, 2026 08:06
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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