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).
delay_
uint256 delay to set, using 3600 for 1 hour
setPermit2
This function set the appropriate PERMIT2 contract address.
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.
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.
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.
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.
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.
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.
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
, andisValidBroadcastAmbImpl
.
Last updated