ISuperRegistry

Git Source

Author: Zeropoint Labs.

interface for Super Registry

Functions

setDelay

sets the deposit rescue delay

function setDelay(uint256 delay_) external;

Parameters

NameTypeDescription
delay_uint256the delay in seconds before the deposit rescue can be finalized

setPermit2

sets the permit2 address

function setPermit2(address permit2_) external;

Parameters

NameTypeDescription
permit2_addressthe address of the permit2 contract

setAddress

sets a new address on a specific chain.

function setAddress(bytes32 id_, address newAddress_, uint64 chainId_) external;

Parameters

NameTypeDescription
id_bytes32the identifier of the address on that chain
newAddress_addressthe new address on that chain
chainId_uint64the chain id of that chain

setBridgeAddresses

this function operates in an APPEND-ONLY fashion.

allows admin to set the bridge address for an bridge id.

function setBridgeAddresses(
    uint8[] memory bridgeId_,
    address[] memory bridgeAddress_,
    address[] memory bridgeValidator_
)
    external;

Parameters

NameTypeDescription
bridgeId_uint8[]represents the bridge unqiue identifier.
bridgeAddress_address[]represents the bridge address.
bridgeValidator_address[]represents the bridge validator address.

setAmbAddress

this function operates in an APPEND-ONLY fashion.

allows admin to set the amb address for an amb id.

function setAmbAddress(uint8[] memory ambId_, address[] memory ambAddress_, bool[] memory isBroadcastAMB_) external;

Parameters

NameTypeDescription
ambId_uint8[]represents the bridge unqiue identifier.
ambAddress_address[]represents the bridge address.
isBroadcastAMB_bool[]represents whether the amb implementation supports broadcasting

setStateRegistryAddress

this function operates in an APPEND-ONLY fashion.

allows admin to set the state registry address for an state registry id.

function setStateRegistryAddress(uint8[] memory registryId_, address[] memory registryAddress_) external;

Parameters

NameTypeDescription
registryId_uint8[]represents the state registry's unqiue identifier.
registryAddress_address[]represents the state registry's address.

setRouterInfo

this function operates in an APPEND-ONLY fashion.

allows admin to set the superform routers info

function setRouterInfo(
    uint8[] memory superformRouterIds_,
    address[] memory stateSyncers_,
    address[] memory routers_
)
    external;

Parameters

NameTypeDescription
superformRouterIds_uint8[]represents the superform router's unqiue identifier.
stateSyncers_address[]represents the state syncer's address.
routers_address[]represents the router's address.

delay

gets the deposit rescue delay

function delay() external view returns (uint256);

PERMIT2

returns the permit2 address

function PERMIT2() external view returns (address);

SUPERFORM_ROUTER

returns the id of the super router module

function SUPERFORM_ROUTER() external view returns (bytes32);

SUPERFORM_FACTORY

returns the id of the superform factory module

function SUPERFORM_FACTORY() external view returns (bytes32);

SUPER_TRANSMUTER

returns the id of the superform transmuter

function SUPER_TRANSMUTER() external view returns (bytes32);

PAYMASTER

returns the id of the superform paymaster contract

function PAYMASTER() external view returns (bytes32);

PAYMENT_HELPER

returns the id of the superform payload helper contract

function PAYMENT_HELPER() external view returns (bytes32);

CORE_STATE_REGISTRY

returns the id of the core state registry module

function CORE_STATE_REGISTRY() external view returns (bytes32);

TIMELOCK_STATE_REGISTRY

returns the id of the two steps form state registry module

function TIMELOCK_STATE_REGISTRY() external view returns (bytes32);

BROADCAST_REGISTRY

returns the id of the broadcast state registry module

function BROADCAST_REGISTRY() external view returns (bytes32);

SUPER_POSITIONS

returns the id of the super positions module

function SUPER_POSITIONS() external view returns (bytes32);

SUPER_RBAC

returns the id of the super rbac module

function SUPER_RBAC() external view returns (bytes32);

PAYLOAD_HELPER

returns the id of the payload helper module

function PAYLOAD_HELPER() external view returns (bytes32);

DST_SWAPPER

returns the id of the dst swapper keeper

function DST_SWAPPER() external view returns (bytes32);

EMERGENCY_QUEUE

returns the id of the emergency queue

function EMERGENCY_QUEUE() external view returns (bytes32);

PAYMENT_ADMIN

returns the id of the payment admin keeper

function PAYMENT_ADMIN() external view returns (bytes32);

CORE_REGISTRY_PROCESSOR

returns the id of the core state registry processor keeper

function CORE_REGISTRY_PROCESSOR() external view returns (bytes32);

BROADCAST_REGISTRY_PROCESSOR

returns the id of the broadcast registry processor keeper

function BROADCAST_REGISTRY_PROCESSOR() external view returns (bytes32);

TIMELOCK_REGISTRY_PROCESSOR

returns the id of the two steps form state registry processor keeper

function TIMELOCK_REGISTRY_PROCESSOR() external view returns (bytes32);

CORE_REGISTRY_UPDATER

returns the id of the core state registry updater keeper

function CORE_REGISTRY_UPDATER() external view returns (bytes32);

CORE_REGISTRY_RESCUER

returns the id of the core state registry updater keeper

function CORE_REGISTRY_RESCUER() external view returns (bytes32);

CORE_REGISTRY_DISPUTER

returns the id of the core state registry updater keeper

function CORE_REGISTRY_DISPUTER() external view returns (bytes32);

DST_SWAPPER_PROCESSOR

returns the id of the core state registry updater keeper

function DST_SWAPPER_PROCESSOR() external view returns (bytes32);

getAddress

gets the address of a contract on current chain

function getAddress(bytes32 id_) external view returns (address);

Parameters

NameTypeDescription
id_bytes32is the id of the contract

getAddressByChainId

gets the address of a contract on a target chain

function getAddressByChainId(bytes32 id_, uint64 chainId_) external view returns (address);

Parameters

NameTypeDescription
id_bytes32is the id of the contract
chainId_uint64is the chain id of that chain

getBridgeAddress

gets the address of a bridge

function getBridgeAddress(uint8 bridgeId_) external view returns (address bridgeAddress_);

Parameters

NameTypeDescription
bridgeId_uint8is the id of a bridge

Returns

NameTypeDescription
bridgeAddress_addressis the address of the form

getStateRegistry

gets the address of the registry

function getStateRegistry(uint8 registryId_) external view returns (address registryAddress_);

Parameters

NameTypeDescription
registryId_uint8is the id of the state registry

Returns

NameTypeDescription
registryAddress_addressis the address of the state registry

getAmbId

gets the id of the amb

function getAmbId(address ambAddress_) external view returns (uint8 ambId_);

Parameters

NameTypeDescription
ambAddress_addressis the address of an amb

Returns

NameTypeDescription
ambId_uint8is the identifier of an amb

getStateRegistryId

reverts if the id is not found

gets the id of the registry

function getStateRegistryId(address registryAddress_) external view returns (uint8 registryId_);

Parameters

NameTypeDescription
registryAddress_addressis the address of the state registry

Returns

NameTypeDescription
registryId_uint8is the id of the state registry

getStateSyncer

gets the address of a state syncer

function getStateSyncer(uint8 superformRouterId_) external view returns (address stateSyncer_);

Parameters

NameTypeDescription
superformRouterId_uint8is the id of a state syncer

Returns

NameTypeDescription
stateSyncer_addressis the address of a state syncer

getRouter

gets the address of a router

function getRouter(uint8 superformRouterId_) external view returns (address router_);

Parameters

NameTypeDescription
superformRouterId_uint8is the id of a state syncer

Returns

NameTypeDescription
router_addressis the address of a router

getSuperformRouterId

gets the id of a router

function getSuperformRouterId(address router_) external view returns (uint8 superformRouterId_);

Parameters

NameTypeDescription
router_addressis the address of a router

Returns

NameTypeDescription
superformRouterId_uint8is the id of a superform router / state syncer

isValidStateRegistry

helps validate if an address is a valid state registry

function isValidStateRegistry(address registryAddress_) external view returns (bool valid_);

Parameters

NameTypeDescription
registryAddress_addressis the address of the state registry

Returns

NameTypeDescription
valid_boola flag indicating if its valid.

isValidAmbImpl

helps validate if an address is a valid amb implementation

function isValidAmbImpl(address ambAddress_) external view returns (bool valid_);

Parameters

NameTypeDescription
ambAddress_addressis the address of the amb implementation

Returns

NameTypeDescription
valid_boola flag indicating if its valid.

isValidBroadcastAmbImpl

helps validate if an address is a valid broadcast amb implementation

function isValidBroadcastAmbImpl(address ambAddress_) external view returns (bool valid_);

Parameters

NameTypeDescription
ambAddress_addressis the address of the broadcast amb implementation

Returns

NameTypeDescription
valid_boola flag indicating if its valid.

getBridgeValidator

gets the address of a bridge validator

function getBridgeValidator(uint8 bridgeId_) external view returns (address bridgeValidator_);

Parameters

NameTypeDescription
bridgeId_uint8is the id of a bridge

Returns

NameTypeDescription
bridgeValidator_addressis the address of the form

getAmbAddress

gets the address of a amb

function getAmbAddress(uint8 ambId_) external view returns (address ambAddress_);

Parameters

NameTypeDescription
ambId_uint8is the id of a bridge

Returns

NameTypeDescription
ambAddress_addressis the address of the form

Events

SetPermit2

emitted when permit2 is set.

event SetPermit2(address indexed permit2);

AddressUpdated

is emitted when an address is set.

event AddressUpdated(
    bytes32 indexed protocolAddressId, uint64 indexed chainId, address indexed oldAddress, address newAddress
);

SetBridgeAddress

is emitted when a new token bridge is configured.

event SetBridgeAddress(uint256 indexed bridgeId, address indexed bridgeAddress);

SetBridgeValidator

is emitted when a new bridge validator is configured.

event SetBridgeValidator(uint256 indexed bridgeId, address indexed bridgeValidator);

SetAmbAddress

is emitted when a new amb is configured.

event SetAmbAddress(uint8 ambId_, address ambAddress_, bool isBroadcastAMB_);

SetStateRegistryAddress

is emitted when a new state registry is configured.

event SetStateRegistryAddress(uint8 registryId_, address registryAddress_);

SetRouterInfo

is emitted when a new router/state syncer is configured.

event SetRouterInfo(uint8 superFormRouterId_, address stateSyncer_, address router_);

SetDelay

is emitted when a new delay is configured.

event SetDelay(uint256 oldDelay_, uint256 newDelay_);