Expand description
TIP-20 token standard — Tempo’s native fungible token implementation.
Provides ERC-20-like balances, allowances, and transfers with Tempo extensions: role-based access control, pausability, supply caps, transfer policies (TIP-403), opt-in staking rewards, EIP-2612 permits (T2+), quote-token graphs, and virtual addresses (TIP-1022).
Re-exports§
pub use slots as tip20_slots;
Modules§
- IRoles
Auth - Module containing a contract’s types and functions.
- ITIP20
- TIP20 token interface providing standard ERC20 functionality with Tempo-specific extensions.
- dispatch
- ABI dispatch for the
TIP20Tokenprecompile. - rewards
- Opt-in staking [rewards system] for TIP-20 tokens.
- roles
- Role-based access control for TIP-20 tokens.
- slots
Structs§
- Recipient 🔒
- Resolved transfer recipient for TIP-1022 virtual address support.
- TIP20
Token
Enums§
- Roles
Auth Error - Container for all the
IRolesAuthcustom errors. - Roles
Auth Event - Container for all the
IRolesAuthevents. - TIP20
Error - Container for all the
ITIP20custom errors. - TIP20
Event - Container for all the
ITIP20events.
Constants§
- U128_
MAX - u128::MAX as U256
- USD_
CURRENCY - USD currency string constant.
Statics§
- BURN_
BLOCKED_ ROLE - Role hash that authorizes burning tokens from blocked accounts.
- EIP712_
DOMAIN_ TYPEHASH - EIP-712 domain separator typehash
- ISSUER_
ROLE - Role hash for minting new tokens.
- PAUSE_
ROLE - Role hash for pausing token transfers.
- PERMIT_
TYPEHASH - EIP-712 Permit typehash: keccak256(“Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)”)
- UNPAUSE_
ROLE - Role hash for unpausing token transfers.
- VERSION_
HASH - EIP-712 version hash: keccak256(“1”)
Functions§
- is_
tip20_ prefix - Returns
trueifaddrhas the TIP-20 token prefix. - validate_
usd_ currency - Validates that the given token’s currency is
"USD".