Skip to content
Lattice

HyperbridgeGatewayAdapterStorage

Git Source

ERC-7201 namespaced storage for the Hyperbridge (ISMP) gateway adapter.

Note:

  • storage-location: erc7201:lattice.storage.HyperbridgeGatewayAdapter
struct HyperbridgeGatewayAdapterStorage {
    /// @notice The Hyperbridge IsmpHost (OZ-style immutable → Diamond storage). APPEND-ONLY.
    address _host;
    /// @notice EVM chainId => ISMP state machine id (empty = unset). Admin-registered; for EVM chains DERIVED
    ///         as `bytes("EVM-" + chainId)`, never caller-supplied. APPEND-ONLY.
    mapping(uint256 chainId => bytes stateMachineId) _stateMachineIds;
    /// @notice `keccak256(stateMachineId)` => EVM chainId (0 = unset). Loud-duplicate reverse map + inbound
    ///         source resolution. APPEND-ONLY.
    mapping(bytes32 smHash => uint256 chainId) _chainIds;
    /// @notice Trusted remote ISMP module (counterpart adapter) per chainId (empty = unset; tunable).
    ///         APPEND-ONLY.
    mapping(uint256 chainId => bytes remoteModule) _trustedRemotes;
    /// @notice Per-destination dispatch timeout in seconds (0 = no explicit timeout — host default; tunable).
    ///         APPEND-ONLY.
    mapping(uint256 chainId => uint64 timeout) _destTimeout;
    /// @notice Monotonic outbound counter. The ISMP protocol nonce is HOST-side and unknowable pre-dispatch,
    ///         so each envelope carries this source-minted nonce, giving the suite-level
    ///         `sendId = keccak256(abi.encode(sourceChainId, nonce))` identity every sibling adapter uses.
    ///         APPEND-ONLY.
    uint256 _lastNonce;
    /// @notice Replay guard: per source chainId, the set of consumed (source, protocol-nonce) dedup keys.
    ///         APPEND-ONLY.
    mapping(uint256 chainId => mapping(bytes32 dedupKey => bool executed)) _executed;
}

Properties

NameTypeDescription
_hostaddress
_stateMachineIdsmapping(uint256 chainId => bytes stateMachineId)
_chainIdsmapping(bytes32 smHash => uint256 chainId)
_trustedRemotesmapping(uint256 chainId => bytes remoteModule)
_destTimeoutmapping(uint256 chainId => uint64 timeout)
_lastNonceuint256
_executedmapping(uint256 chainId => mapping(bytes32 dedupKey => bool executed))