Skip to content
Lattice

L1ToL2CrossDomainMessengerGatewayAdapterLib Constants

Git Source

L1_TO_L2_CROSS_DOMAIN_MESSENGER_GATEWAY_ADAPTER_STORAGE_SLOT

keccak256(abi.encode(uint256(keccak256("lattice.storage.L1ToL2CrossDomainMessengerGatewayAdapter")) - 1)) & ~bytes32(uint256(0xff)).

bytes32 constant L1_TO_L2_CROSS_DOMAIN_MESSENGER_GATEWAY_ADAPTER_STORAGE_SLOT =
    0xba3de3e77bc32833730368f3190597d7121922af189304a06067265b4d53a500;

ERC165_MAP_IERC7786GATEWAYSOURCE_SLOT

ERC-165 map slot for IERC7786GatewaySource (0x11967553). SHARED by all gateway adapters — keccak256(abi.encode(bytes4(0x11967553), 0x9ca7f3e2e2bfb15fdf072b85dde92837cddacee6cf2f6b38cd06c9457c1c4200)).

bytes32 constant ERC165_MAP_IERC7786GATEWAYSOURCE_SLOT =
    0x3c75b8ea75c097979221eb9302e2f0f6009b4ffe0a7198db5dc29979e09ea0e3;

L2_CROSS_DOMAIN_MESSENGER

The canonical OP Stack L2 CrossDomainMessenger predeploy — fixed on every OP Stack chain. Handles the L2 side of both deposits (L1->L2) and withdrawals (L2->L1). PRE-MAINNET: re-verify this address (and the message encoding) against the then-current ethereum-optimism/optimism contracts-bedrock release before ANY production deploy.

address constant L2_CROSS_DOMAIN_MESSENGER = 0x4200000000000000000000000000000000000007;