Skip to content
Lattice

LayerZeroGatewayAdapterStorage

Git Source

ERC-7201 namespaced storage for the LayerZero gateway adapter.

Note:

  • storage-location: erc7201:lattice.storage.LayerZeroGatewayAdapter
struct LayerZeroGatewayAdapterStorage {
    /// @notice The LayerZero v2 EndpointV2 (OZ-style immutable → Diamond storage). APPEND-ONLY.
    address _endpoint;
    /// @notice EVM chainId => LayerZero eid (0 = unset). APPEND-ONLY.
    mapping(uint256 chainId => uint32 eid) _chainIdToEid;
    /// @notice LayerZero eid => EVM chainId (0 = unset). APPEND-ONLY.
    mapping(uint32 eid => uint256 chainId) _eidToChainId;
    /// @notice Trusted 32-byte remote peer (adapter) per EVM chainId (0 = unset). APPEND-ONLY.
    mapping(uint256 chainId => bytes32 peer) _peers;
    /// @notice Per-destination executor gas + native msg.value (gas 0 = unconfigured). APPEND-ONLY.
    mapping(uint256 chainId => DestinationConfig) _destConfig;
    /// @notice Replay guard: per source chainId, the set of consumed LayerZero guids. APPEND-ONLY.
    mapping(uint256 chainId => mapping(bytes32 guid => bool used)) _executed;
}

Properties

NameTypeDescription
_endpointaddress
_chainIdToEidmapping(uint256 chainId => uint32 eid)
_eidToChainIdmapping(uint32 eid => uint256 chainId)
_peersmapping(uint256 chainId => bytes32 peer)
_destConfigmapping(uint256 chainId => DestinationConfig)
_executedmapping(uint256 chainId => mapping(bytes32 guid => bool used))