Superform v1
  • Introduction
  • Components
    • Protocol
    • Keepers
    • API
    • App
  • E2E Flows
    • Same-chain Deposit
    • Cross-chain Deposit
    • Same-chain Withdrawal
    • Cross-chain Withdrawal
  • Periphery Contracts
    • SuperformRouter
      • SuperformRouterPlus
      • SuperformRouterPlusAsync
    • PayMaster
    • PaymentHelper
    • EmergencyQueue
    • SuperformFactory
    • Forms
      • ERC4626Form
      • ERC5115Form
      • ERC7540Form
    • SuperPositions
      • ERC1155A
    • RewardsDistributor
  • Core Contracts
    • State Registries
      • CoreStateRegistry
      • AsyncStateRegistry
      • PayloadHelper
    • AMB Implementations
      • LayerzeroImplementation
      • LayerzeroV2Implementation
      • WormholeARImplementation
      • HyperlaneImplementation
      • AxelarImplementation
    • Broadcasting
      • BroadcastRegistry
      • WormholeSRImplementation
    • Bridge Validators
      • LiFiValidator
      • SocketValidator
      • SocketOneInchValidator
      • DebridgeValidator (and forwarder)
      • OneInchValidator
    • DstSwapper
    • Settings
      • SuperRBAC
      • SuperRegistry
  • SuperVaults
    • SuperVaults
  • Resources
    • Deployment Addresses
    • Subgraphs
      • Protocol Level Entities
      • Form Related Entities
      • Deposits and Withdrawals
      • SuperPosition Events
      • External Entities
    • Infrastructure Integrations
    • Security & Audits
    • Protocol License
    • Glossary
    • Protocol Multisig
    • Superform Labs Socials
Powered by GitBook
On this page
  • Introduction
  • Core Concepts
  • Setters
  • Getters

Was this helpful?

  1. Core Contracts
  2. Settings

SuperRegistry

Last updated 1 year ago

Was this helpful?

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 contract address.

function setPermit2(
    address permit2_
) external override onlyProtocolAdmin
name

permit2_

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_

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_

setStateRegistryAddress

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

registryID_

registryAddress_

setRequiredMessagingQuorum

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.

address of the

address array of the Superform

bool array if the AMB can be used for

This function sets addresses.

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

address array of the addresses where the are deployed

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

PERMIT2
State Registries
State Registries
Bridge Validators
Broadcasting
State Registries
permit2 contract
State Registries