dfinity avatar

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-code

Installs 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

TokenLedger Canister IDDecimals
ICPryjl3-tyaaa-aaaaa-aaaba-cai8
ckBTCmxzaz-hqaaa-aaaar-qaada-cai8
ckETHss2fx-dyaaa-aaaar-qacoq-cai18

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

More from dfinity/icskills

All 16
1aliyun avataralibabacloud-network-reachability-analysisaliyun/alibabacloud-aiops-skillsPerform Alibaba Cloud NIS (Network Intelligence Service) network path reachability analysis with forward/reverse path diagnosis, topology visualization, and res277skills.sh installs
2rstackjs avatarrspack-debuggingrstackjs/agent-skillsHelps Rspack users and developers debug crashes or deadlocks/hangs in the Rspack build process using LLDB. Use this Skill when users encounter "Segmentation fau277skills.sh installs
3davila7 avatarfree-tool-strategydavila7/claude-code-templatesWhen the user wants to plan, evaluate, or build a free tool for marketing purposes — lead generation, SEO value, or brand awareness. Also use when the user ment276skills.sh installs
4cinience avataralicloud-compute-fc-agentruncinience/alicloud-skillsManage Function Compute AgentRun resources via OpenAPI (runtime, sandbox, model, memory, credentials). Use for creating runtimes/endpoints, querying status, and273skills.sh installs
5jeremylongshore avatarreadme-generatorjeremylongshore/claude-code-plugins-plus-skillsGenerate readme generator operations. Auto-activating skill for DevOps Basics. Triggers on: readme generator, readme generator Part of the DevOps Basics skill c272skills.sh installs
6jezweb avatardjango-cloud-sql-postgresjezweb/claude-skillsDeploy Django on Google App Engine Standard with Cloud SQL PostgreSQL. Covers Unix socket connections, Cloud SQL Auth Proxy for local dev, Gunicorn configuratio272skills.sh installs