Skip to content
Lattice

HyperlaneGatewayAdapterStorage

Git Source

ERC-7201 namespaced storage for the Hyperlane gateway adapter.

Note:

  • storage-location: erc7201:lattice.storage.HyperlaneGatewayAdapter
struct HyperlaneGatewayAdapterStorage {
    /// @notice The Hyperlane Mailbox (OZ-style immutable → Diamond storage). APPEND-ONLY.
    address _mailbox;
    /// @notice EVM chainId => Hyperlane domain (0 = unset). Admin-registered, never inferred. APPEND-ONLY.
    mapping(uint256 chainId => uint32 domain) _chainIdToDomain;
    /// @notice Hyperlane domain => EVM chainId (0 = unset). Admin-registered, never inferred. APPEND-ONLY.
    mapping(uint32 domain => uint256 chainId) _domainToChainId;
    /// @notice Trusted 32-byte remote (counterpart adapter) per EVM chainId (0 = unset; tunable). APPEND-ONLY.
    mapping(uint256 chainId => bytes32 remote) _trustedRemotes;
    /// @notice Per-destination `handle` gas limit (0 = unset ⇒ adapter default; tunable). APPEND-ONLY.
    mapping(uint256 chainId => uint256 gasLimit) _destGasLimit;
    /// @notice Monotonic outbound counter. Hyperlane's `handle` exposes no messageId to the recipient, so each
    ///         dispatched envelope carries this source-minted nonce, giving a globally-unique (source, nonce)
    ///         id on delivery (matching the ZetaChain/L2ToL2 siblings' unique-id semantics). APPEND-ONLY.
    uint256 _lastNonce;
    /// @notice Replay guard: per source chainId, the set of consumed sendIds. APPEND-ONLY.
    mapping(uint256 chainId => mapping(bytes32 sendId => bool executed)) _executed;
}

Properties

NameTypeDescription
_mailboxaddress
_chainIdToDomainmapping(uint256 chainId => uint32 domain)
_domainToChainIdmapping(uint32 domain => uint256 chainId)
_trustedRemotesmapping(uint256 chainId => bytes32 remote)
_destGasLimitmapping(uint256 chainId => uint256 gasLimit)
_lastNonceuint256
_executedmapping(uint256 chainId => mapping(bytes32 sendId => bool executed))