Skip to content
Lattice

CCTPBridgeAdapterStorage

Git Source

ERC-7201 namespaced storage for the CCTP v2 USDC token-bridge adapter.

Note:

  • storage-location: erc7201:lattice.storage.CCTPBridgeAdapter
struct CCTPBridgeAdapterStorage {
    /// @notice The CCTP v2 `TokenMessengerV2` (deployed contract, configured at init). APPEND-ONLY.
    address _tokenMessenger;
    /// @notice The CCTP v2 `MessageTransmitterV2` (deployed contract, configured at init). APPEND-ONLY.
    address _messageTransmitter;
    /// @notice The bridged USDC token (deployed contract, configured at init). APPEND-ONLY.
    address _usdc;
    /// @notice chainId => CCTP domain id (meaningless unless `_chainRegistered[chainId]`). APPEND-ONLY.
    mapping(uint256 chainId => uint32 domain) _chainIdToDomain;
    /// @notice chainId => registered flag (distinguishes domain 0 = Ethereum from unset). APPEND-ONLY.
    mapping(uint256 chainId => bool registered) _chainRegistered;
    /// @notice CCTP domain id => per-domain outbound config. APPEND-ONLY.
    mapping(uint32 domain => DomainConfig config) _domainConfig;
    /// @notice CCTP domain id => the chainId that registered it (0 = unregistered; chainId 0 is rejected, so 0
    ///         is a safe sentinel). Loud-duplicate reverse map — two chains can NEVER share a domain. APPEND-ONLY.
    mapping(uint32 domain => uint256 chainId) _domainOwner;
    /// @notice The role-less, fund-less {CCTPHookExecutor} deployed once at init (`new CCTPHookExecutor(diamond)`)
    ///         and never changed — inbound hooks are executed through it so attacker `hookData` gains no
    ///         authority. NO admin setter (a swappable executor would be a forgeable trust anchor). APPEND-ONLY.
    address _hookExecutor;
}

Properties

NameTypeDescription
_tokenMessengeraddress
_messageTransmitteraddress
_usdcaddress
_chainIdToDomainmapping(uint256 chainId => uint32 domain)
_chainRegisteredmapping(uint256 chainId => bool registered)
_domainConfigmapping(uint32 domain => DomainConfig config)
_domainOwnermapping(uint32 domain => uint256 chainId)
_hookExecutoraddress