chore: migrate motoko/icp_transfer to icp-cli#1389
Draft
marc0olo wants to merge 1 commit into
Draft
Conversation
- 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>
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.
Summary
dfx.jsonwithicp.yamlusing the@dfinity/motoko@v5.0.0recipesrc/icp_transfer_backend/main.mo→backend/app.mo(canonical layout)canister:icp_ledger_canisterimport and instead reference the ICP ledger directly by its well-known principalryjl3-tyaaa-aaaaa-aaaba-cai— available on both mainnet and the icp-cli local network (NNS subnet is always present)mops.toml: moc 1.9.0, core 2.5.0,--default-persistent-actors, warning flagsMakefilewith atesttarget: funds the backend canister with 2 ICP from the default (seeded) identity, then callstransferto move 1 ICP back to the caller.github/workflows/icp_transfer.yml(Motoko-only job — Rust not yet migrated)dfx.json,demo.sh,src/directory, old per-example.gitignore, and old workflowmotoko-icp-transfer-example.ymlmops.lockto root.gitignoreTest plan
motoko/icp_transfer/**icp network start -d && icp deploycompiles and deploys the backend canistermake testfunds the backend with ICP then successfully callstransfer, asserting#okis returned🤖 Generated with Claude Code