Skip to content
Lattice

ChainRecord

Git Source

Per-chain registry record, keyed by the ERC-7930 chain key. APPEND-ONLY.

struct ChainRecord {
    /// @notice Whether this chain identity is registered (identities are permanent — no removal in v1).
    bool registered;
    /// @notice The ERC-7930 chain type (0x0000 = eip-155).
    bytes2 chainType;
    /// @notice The ERC-7930 chain reference (canonical minimal big-endian chainId for EVM chains).
    bytes chainReference;
    /// @notice The EVM chainId (informational; 0 for non-EVM chains).
    uint256 evmChainId;
    /// @notice Informational native bridge-ecosystem ids (0/empty = unset).
    IChainRegistry.NativeIds ids;
    /// @notice The local gateway adapters recorded as covering this chain (direct + hub-routed).
    EnumerableSet.AddressSet gateways;
    /// @notice gateway => reaches this chain only via an intermediate hub (never counts as DIRECT coverage).
    mapping(address gateway => bool hubRouted) hubRouted;
}

Properties

NameTypeDescription
registeredbool
chainTypebytes2
chainReferencebytes
evmChainIduint256
idsIChainRegistry.NativeIds
gatewaysEnumerableSet.AddressSet
hubRoutedmapping(address gateway => bool hubRouted)