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 (post-T2) and quote-token graphs.
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§
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§
- TIP20_
DECIMALS 🔒 - Decimal precision for TIP-20 tokens
- TIP20_
TOKEN_ 🔒PREFIX - TIP20 token address prefix (12 bytes) The full address is: TIP20_TOKEN_PREFIX (12 bytes) || derived_bytes (8 bytes)
- U128_
MAX - u128::MAX as U256
- USD_
CURRENCY - USD currency string constant.
Statics§
- BURN_
BLOCKED_ ROLE - Role hash that prevents an account from burning tokens.
- 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 true if the address has the TIP20 prefix.
- validate_
usd_ currency - Validates that the given token’s currency is
"USD".