Skip to content

chore: migrate rust/icp_transfer to icp-cli#1412

Draft
marc0olo wants to merge 2 commits into
masterfrom
chore/migrate-rust-icp-transfer-to-icp-cli
Draft

chore: migrate rust/icp_transfer to icp-cli#1412
marc0olo wants to merge 2 commits into
masterfrom
chore/migrate-rust-icp-transfer-to-icp-cli

Conversation

@marc0olo

Copy link
Copy Markdown
Member

Summary

  • Replaces dfx.json with icp.yaml using @dfinity/rust@v3.3.0
  • Moves canister source from src/icp_transfer_backend/ to backend/, renames Cargo package to backend
  • Adds Makefile with 4 end-to-end tests: ledger balance check, fund backend canister, backend.transfer call, post-transfer balance check
  • The make test target deploys the ICP ledger locally at ryjl3-tyaaa-aaaaa-aaaba-cai (same principal as mainnet) via provisional_create_canister_with_cycles, matching the hardcoded MAINNET_LEDGER_CANISTER_ID in the Rust code
  • Adds CI workflow .github/workflows/icp_transfer.yml using ghcr.io/dfinity/icp-dev-env-rust:1.0.0
  • Deletes legacy rust-icp-transfer-example.yml, dfx.json, and demo.sh

Test plan

  • icp network start -d && icp deploy && make test passes locally
  • CI workflow rust-icp_transfer job passes
  • Test 1: default identity has 100 ICP initial balance
  • Test 2: fund backend canister with 1 ICP succeeds (ledger returns Ok)
  • Test 3: backend.transfer of 0.5 ICP returns Ok with a block index
  • Test 4: backend ledger balance decreased after transfer

🤖 Generated with Claude Code

marc0olo and others added 2 commits June 16, 2026 19:58
Replaces dfx.json with icp.yaml (@dfinity/rust@v3.3.0), moves the
canister source from src/icp_transfer_backend/ to backend/, renames the
Cargo package to `backend`, adds a Makefile that deploys the ICP ledger
locally at ryjl3-tyaaa-aaaaa-aaaba-cai and runs end-to-end transfer
tests, and adds a CI workflow using icp-dev-env-rust:1.0.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant