feat: icp canister create --with-icp#651
Conversation
There was a problem hiding this comment.
Pull request overview
Adds ICP-funded canister creation through the cycles minting canister.
Changes:
- Adds the
--with-icpfunding option. - Implements ICP transfer, CMC notification, retries, and recovery guidance.
- Adds CMC interfaces, documentation, and integration coverage.
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
CHANGELOG.md |
Records the new feature. |
docs/reference/cli.md |
Documents --with-icp. |
crates/icp-cli/tests/canister_create_tests.rs |
Tests ICP-funded creation. |
crates/icp-cli/src/operations/create.rs |
Implements CMC-funded creation. |
crates/icp-cli/src/commands/deploy.rs |
Preserves cycles funding for deployments. |
crates/icp-cli/src/commands/canister/create.rs |
Adds CLI funding selection. |
crates/icp-canister-interfaces/src/cycles_minting_canister.rs |
Defines CMC request and response types. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Reject ICP amounts with sub-e8s precision via to_token_unit_amount instead of silently truncating with BigDecimal::to_u64. - Classify TransactionTooOld and InvalidTransaction as terminal notify outcomes alongside Refunded; only retry Processing/Other and transport errors. - Render the recovery command from the full typed notify argument so all requested settings are preserved (not just controllers), and shell-escape it. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
|
Deferring approval to Linwei/Raymond since this adds a new user-facing flag and payment path. A few points to resolve first:
Minor: |
|
We don't need to add a restriction that it only be used for the use case specifically envisioned. I can't see a good way of testing the retry loop. |
|
Pushed a follow-up commit hardening the
Added a |
- Include identity/network/environment flags in the CMC recovery command so a timed-out/interrupted creation can be pasted verbatim and targets the same network and identity as the original call. - Log CMC wait status at info level and only when it changes, so a normal wait no longer floods the output with repeated warnings. - Fix the transfer created_at_time and retry transient transport failures, so a lost response is deduplicated by the ledger (TxDuplicate) instead of stranding the paid-for ICP. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
No description provided.