SuperRegistry

Introduction

SuperRegistry serves as a central repository for managing addresses and information related to the Superform ecosystem. It keeps track of various addresses used in the ecosystem and provides functionality for setting and retrieving those addresses.

Core Concepts

All functions in SuperRegistry are PROTOCOL_ADMIN gated.

Setters

setDelay

This function sets the appropriate optimistic time window where users can dispute proposed rescue amounts. This can only be set to between 1 and 24 hours (i.e. 3600 and 86400).

function setDelay(
    uint256 delay_
) external override onlyProtocolAdmin
name

delay_

uint256 delay to set, using 3600 for 1 hour

setPermit2

This function set the appropriate PERMIT2 contract address.

function setPermit2(
    address permit2_
) external override onlyProtocolAdmin
name

permit2_

address of the permit2 contract

setVaultLimitPerTx

This function sets the limit of vaults that can be deposited or withdrawn to/from a chainId in a single transaction.

function setVaultLimitPerDestination(
    uint64 chainId_,
    uint256 vaultLimit_
) extneral override onlyProtocolAdmin
name

chainId_

uint64 destination chainId

vaultLimit_

uint256 vault limit to be set for any given transaction

setAddress

This function sets addresses for specific identifiers and chain ids.

function setAddress(
    bytes32 id_,
    address newAddress_,
    uint64 chainId_
) external override onlyProtocolAdmin
name
description

id_

bytes32 role of the address on that chain

newAddress_

address of the new address on that chain

chainId_

uint64 EVM chain ID

setBridgeAddresses

This function sets bridge addresses and maps to their Bridge Validators.

function setBridgeAddresses(
    uint8[] memory bridgeId_,
    address[] memory bridgeAddress_,
    address[] memory bridgeValidator_
) external override onlyProtocolAdmin
name
description

bridgeId_

uint8 array of the bridge id to set

bridgeAddress_

address array of the 3rd party bridge address to set

bridgeValidator_

address array of the Superform Bridge Validators

setAmbAddress

This function sets AMB addresses and specifies whether they can be used for broadcasting.

function setAmbAddress(
    uint8[] memory ambId_,
    address[] memory ambAddress_,
    bool[] memory isBroadcastAMB_
) external override onlyProtocolAdmin
name
description

ambId_

uint8 array of the AMB ids to set

ambAddress_

address array of the 3rd party AMB addresses to set

isBroadcastAMB_

bool array if the AMB can be used for Broadcasting

setStateRegistryAddress

This function sets State Registries addresses.

function setStateRegistryAddress(
    uint8[] memory registryId_,
    address[] memory registryAddress_
) external override onlyProtocolAdmin
name
description

registryID_

uint8 array of the State Registries id (1 = CSR, 2 = Timelock, 3 = Broadcast, etc.)

registryAddress_

address array of the addresses where the State Registries are deployed

setRequiredMessagingQuorum

This function sets the required messaging quorum for a specific source chain by inheriting QuorumManager. This quorum is used in State Registries to ensure security when passing messages across chains.

function setRequiredMessagingQuorum(
    uint64 srcChainId_,
    uint256 quorum_
) external override onlyProtocolAdmin
name
description

srcChainId_

uint64 EVM chain id on chain to adjust quorum to

quorum_

uint256 quorum to set requirement

Getters

This contract also includes convenience view functions to see what addresses have already been configured.

  • Functions for retrieving various addresses and identifiers, such as getAddress, getBridgeAddress, getBridgeValidator, getAmbAddress, getAmbId, getStateRegistry, getStateRegistryId , getVaultLimitPerDestination

  • Functions for checking the validity of state registries and AMB implementations, such as isValidStateRegistry, isValidAmbImpl, and isValidBroadcastAmbImpl.

Last updated