
Icrc Ledger
Handles ICRC-1 and ICRC-2 token operations on the Internet Computer: transfers, balance checks, and approve/transferFrom flows for ICP, ckBTC, and ckETH. The source walks you through the common landmines like hardcoding fees across ledgers, forgetting that mints and burns require zero fees, and the minting account gotcha where it can't call approve. Covers both Motoko and Rust with actual canister IDs and index canisters. Use this when you're moving tokens around or building allowance-based flows. Don't use it for ckBTC minting or BTC withdrawal, there's a separate skill for that.
- skills.sh installs
- 278
- GitHub stars
- 39
- last updated
- Aug 21, 2026
Install
$ npx -y skills add dfinity/icskills --skill icrc-ledger --agent claude-codeInstalls into .claude/skills of the current project.
Files
ICRC Ledger Standards
What This Is
ICRC-1 is the fungible token standard on Internet Computer, defining transfer, balance, and metadata interfaces. ICRC-2 extends it with approve/transferFrom (allowance) mechanics, enabling third-party spending like ERC-20 on Ethereum.
Prerequisites
- For Motoko: mops with
core = "2.3.1"in mops.toml - For Rust:
ic-cdk = "0.19",candid = "0.10",icrc-ledger-types = "0.1"in Cargo.toml
Canister IDs
| Token | Ledger Canister ID | Decimals |
|---|---|---|
| ICP | ryjl3-tyaaa-aaaaa-aaaba-cai | 8 |
| ckBTC | mxzaz-hqaaa-aaaar-qaada-cai | 8 |
| ckETH | ss2fx-dyaaa-aaaar-qacoq-cai | 18 |
Index canisters (for transaction history):
- ICP Index:
qhbym-qaaaa-aaaaa-aaafq-cai - ckBTC Index:
n5wcd-faaaa-aaaar-qaaea-cai - ckETH Index:
s3zol-vqaaa-aaaar-qacpa-cai
All ICRC-1 ledgers expose icrc1_fee : () -> (nat) query to return the current transfer fee. Fees are denominated in the token's smallest unit (e8s for ICP where 1 ICP = 10⁸ e8s, satoshis for ckBTC, wei for ckETH). Each ledger sets its own fee, and fees can change at runtime.
Common Pitfalls
Sponsors
Details
- Repository
- github.com/dfinity/icskills
- Categories
- DevOps & CI/CD, Release Management, Finance & Trading
- First seen
- Jun 3, 2026