Skip to content
Lattice

StarknetGatewayAdapterStorage

Git Source

ERC-7201 namespaced storage for the Starknet L1 <-> L2 gateway adapter.

Note:

  • storage-location: erc7201:lattice.storage.StarknetGatewayAdapter
struct StarknetGatewayAdapterStorage {
    /// @notice The Starknet core (`StarknetMessaging`) contract on this chain (configured at init). APPEND-ONLY.
    address _starknetCore;
    /// @notice The ERC-7930 chain reference this adapter accepts (UTF-8 chain-id string, e.g. `SN_MAIN`,
    ///         configured at init). APPEND-ONLY.
    bytes _expectedChainReference;
    /// @notice L2 target felt => registered `l1_handler` selector (0 = unregistered). APPEND-ONLY.
    mapping(uint256 l2Target => uint256 selector) _l1HandlerSelector;
    /// @notice L2 sender felt => trusted flag for the inbound consume path. APPEND-ONLY.
    mapping(uint256 fromAddress => bool trusted) _trustedL2Senders;
    /// @notice In-flight outbound message hash => the L1 initiator allowed to cancel it. APPEND-ONLY.
    mapping(bytes32 msgHash => address initiator) _initiators;
}

Properties

NameTypeDescription
_starknetCoreaddress
_expectedChainReferencebytes
_l1HandlerSelectormapping(uint256 l2Target => uint256 selector)
_trustedL2Sendersmapping(uint256 fromAddress => bool trusted)
_initiatorsmapping(bytes32 msgHash => address initiator)