Expand description
Tempo precompile and contract initialization for Foundry.
This module provides the core initialization logic for Tempo-specific precompiles, fee tokens (PathUSD, AlphaUSD, BetaUSD, ThetaUSD), and standard contracts.
It includes the shared genesis initialization function used by both anvil and forge.
Modules§
- IAddress
Registry - TIP-1022 virtual address registry interface.
- IFee
Manager - FeeManager interface for managing gas fee collection and distribution.
- ISignature
Verifier - Module containing a contract’s types and functions.
- IStablecoinDEX
- StablecoinDEX interface for managing orderbook based trading of stablecoins.
- ITIP20
Channel Reserve - TIP-20 channel reserve ABI.
Structs§
Constants§
- ADDRESS_
REGISTRY_ ADDRESS - IMPLICIT_
APPROVAL_ LIST - TIP-1035 Implicit Approval List.
- PATH_
USD_ ADDRESS - RECEIVE_
POLICY_ GUARD_ ADDRESS - SIGNATURE_
VERIFIER_ ADDRESS - STABLECOIN_
DEX_ ADDRESS - TEMPO_
PRECOMPILE_ ADDRESSES - All well-known Tempo precompile addresses.
- TEMPO_
TIP20_ TOKENS - All well-known TIP20 fee token addresses on Tempo networks.
- TIP20_
CHANNEL_ RESERVE_ ADDRESS - Native TIP-1034 channel reserve precompile address.
- TIP20_
FACTORY_ ADDRESS - TIP_
FEE_ MANAGER_ ADDRESS
Functions§
- active_
tempo_ precompile_ addresses - Returns the well-known Tempo precompile addresses active at
hardfork. - create_
and_ 🔒mint_ token - Helper function to create and mint a TIP20 token.
- initialize_
tempo_ genesis - Initialize Tempo precompiles and contracts using a storage provider.
- initialize_
tempo_ genesis_ at_ hardfork - Initialize Tempo precompiles and contracts for a specific active hardfork.
- initialize_
tempo_ genesis_ inner - Inner genesis initialization logic. Must be called within a [
StorageCtx] scope (either via [StorageCtx::enter] or [StorageCtx::enter_evm]). - initialize_
tempo_ 🔒genesis_ inner_ with_ precompiles - initialize_
tempo_ test_ genesis_ inner - Inner genesis initialization for Forge’s local test EVM.
- is_
implicitly_ approved - Returns
trueiffaddris on theIMPLICIT_APPROVAL_LISTfor the given hardfork. - is_
tempo_ precompile_ active_ at - Returns whether a well-known Tempo precompile address is active at
hardfork. - is_
tip20_ prefix - Returns
trueifaddrhas the TIP-20 token prefix.