Skip to content
Lattice

WormholeGatewayAdapterStorage

Git Source

ERC-7201 namespaced storage for the Wormhole gateway adapter.

Note:

  • storage-location: erc7201:lattice.storage.WormholeGatewayAdapter
struct WormholeGatewayAdapterStorage {
    /// @notice The Wormhole relayer (OZ uses an immutable; a Diamond must use storage). APPEND-ONLY.
    address _relayer;
    /// @notice This chain's Wormhole chain id. APPEND-ONLY.
    uint16 _wormholeChainId;
    /// @notice Monotonic message-id counter (source). APPEND-ONLY.
    uint256 _lastMsgId;
    /// @notice Trusted remote gateway adapter per EVM chainId. APPEND-ONLY.
    mapping(uint256 chainId => address remote) _remoteGateways;
    /// @notice EVM chainId => Wormhole chain id (0 = unset). APPEND-ONLY.
    mapping(uint256 chainId => uint16 wormhole) _chainIdToWormhole;
    /// @notice Wormhole chain id => EVM chainId (0 = unset). APPEND-ONLY.
    mapping(uint16 wormhole => uint256 chainId) _wormholeToChainId;
    /// @notice Pending messages by sendId (no-attribute path). APPEND-ONLY.
    mapping(bytes32 sendId => PendingMessage) _pending;
    /// @notice Replay guard: per source chainId, the set of consumed sendIds. APPEND-ONLY.
    mapping(uint256 chainId => mapping(uint256 sendId => bool used)) _executed;
}

Properties

NameTypeDescription
_relayeraddress
_wormholeChainIduint16
_lastMsgIduint256
_remoteGatewaysmapping(uint256 chainId => address remote)
_chainIdToWormholemapping(uint256 chainId => uint16 wormhole)
_wormholeToChainIdmapping(uint16 wormhole => uint256 chainId)
_pendingmapping(bytes32 sendId => PendingMessage)
_executedmapping(uint256 chainId => mapping(uint256 sendId => bool used))