You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Fix icp.yaml config: use build/steps/pre-built with url + init_args
instead of invalid recipe/type/custom (dfx-ism)
- Add missing Motoko imports (Array, Nat8) in subaccount snippet
- Add icrc1_balance_of examples (Rust + Motoko)
- Add candid language tag to Account type code fence
- Remove unused caller capture from Motoko approveSpender
- Rebase on main to drop stale reverse-diffs
Copy file name to clipboardExpand all lines: docs/guides/defi/token-ledgers.md
+54-10Lines changed: 54 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ All of these ledgers are ICRC-1 and ICRC-2 compatible. For chain-key token speci
34
34
35
35
The `icrc1_transfer` function sends tokens from the calling canister's account to a destination account. Every ICRC-1 ledger uses the same `Account` type:
ICRC-2 adds an approve/transferFrom pattern, similar to ERC-20 on Ethereum. The token owner first approves a spender for a certain amount, then the spender calls `icrc2_transfer_from` to move tokens. This is a two-step flow — calling `transfer_from` without a prior approval fails with `InsufficientAllowance`.
0 commit comments