Skip to content

chore: migrate motoko/icp_transfer to icp-cli#1389

Draft
marc0olo wants to merge 1 commit into
masterfrom
chore/migrate-icp_transfer-to-icp-cli
Draft

chore: migrate motoko/icp_transfer to icp-cli#1389
marc0olo wants to merge 1 commit into
masterfrom
chore/migrate-icp_transfer-to-icp-cli

Conversation

@marc0olo

Copy link
Copy Markdown
Member

Summary

  • Replaces dfx.json with icp.yaml using the @dfinity/motoko@v5.0.0 recipe
  • Moves src/icp_transfer_backend/main.mobackend/app.mo (canonical layout)
  • Refactors the Motoko code to drop the canister:icp_ledger_canister import and instead reference the ICP ledger directly by its well-known principal ryjl3-tyaaa-aaaaa-aaaba-cai — available on both mainnet and the icp-cli local network (NNS subnet is always present)
  • Updates mops.toml: moc 1.9.0, core 2.5.0, --default-persistent-actors, warning flags
  • Adds Makefile with a test target: funds the backend canister with 2 ICP from the default (seeded) identity, then calls transfer to move 1 ICP back to the caller
  • Adds CI workflow .github/workflows/icp_transfer.yml (Motoko-only job — Rust not yet migrated)
  • Removes dfx.json, demo.sh, src/ directory, old per-example .gitignore, and old workflow motoko-icp-transfer-example.yml
  • Adds mops.lock to root .gitignore

Test plan

  • Workflow runs on push/PR touching motoko/icp_transfer/**
  • icp network start -d && icp deploy compiles and deploys the backend canister
  • make test funds the backend with ICP then successfully calls transfer, asserting #ok is returned

🤖 Generated with Claude Code

- Replace dfx.json with icp.yaml using @dfinity/motoko@v5.0.0 recipe
- Move src/icp_transfer_backend/main.mo → backend/app.mo
- Refactor Motoko code: replace canister import with direct actor reference
  to the ICP ledger at its well-known principal ryjl3-tyaaa-aaaaa-aaaba-cai
  (available on both mainnet and the icp-cli local network's NNS subnet)
- Update mops.toml: moc 1.9.0, core 2.5.0, --default-persistent-actors flag
- Add Makefile with test target (funds backend then tests transfer function)
- Add CI workflow .github/workflows/icp_transfer.yml (motoko-only job)
- Delete dfx.json, demo.sh, src/ directory, old per-example .gitignore
- Delete old .github/workflows/motoko-icp-transfer-example.yml
- Add mops.lock to root .gitignore

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