Skip to content

XVSBridgeAdmin

XVSBridgeAdmin at token-bridge v2.7.0 is the transparent proxy that owns and administers the local source or destination bridge. Its implementation constructor fixes an immutable XVSBridge, so each network has a different implementation address even though all eight implementations match the same tagged source.

NetworkRead blockProxyImplementation
BNB Chain1183696930x70d644877b7b73800E9073BCFCE981eAaB6Dbc210xb085926fa310b4af85B499162B96e30E5c0E6fAC
Ethereum258460370x9C6C95632A8FB3A74f2fB4B7FfC50B003c992b960x83aBB808bb291FED8593e953c6489d29aFa0c5Ca
Arbitrum4988922350xf5d81C6F7DAA3F97A6265C8441f92eFda22Ad7840xC57f35500f4F5B2B31c5250bF8BCcf8058835a9B
opBNB1788419880x52fcE05aDbf6103d71ed2BA8Be7A3172827318310x0f0be7BAf4B9E394F91e5B8a17Fc9579f5d3c072
Optimism1561143250x3c307DF1Bf3198a2417d9CA86806B307D147Ddf70xc8A17E5394aeB0A0E227E0f27F922dc60300e80B
Base505190420x6303FEcee7161bF959d65df4Afb9e1ba5701f78e0x358691eB7CC06ac512d9068a71Ea3bc2893F50Ed
Unichain570790730x2EAaa880f97C9B63d37b39b0b316022d93d436040xc6d8bBC659d0B3Beaca513a20218b1727Ef3DCE4
zkSync Era717386870x2471043F05Cc41A6051dd6714DC967C7BfC8F9020x21f8b24f48a3af53B9B597DbA1D7737e4D7aBa3B

The implementation inherits two-step ownership and AccessControlManager selectors. The transparent proxy adds proxy-admin upgrade selectors; those do not imply that a normal caller can upgrade it.

The XVSBridgeAdmin contract extends a parent contract AccessControlledV8 for access control, and it manages an external contract called XVSProxyOFT. It maintains a registry of function signatures and names, allowing for dynamic function handling i.e checking of access control of interaction with only owner functions.

Returns the immutable bridge controlled by this implementation.

function XVSBridge() external view returns (contract IXVSProxyOFT)

Initializes proxy ownership and the AccessControlManager. The implementation disables initializers in its constructor.

function initialize(address accessControlManager_) external

A mapping keeps track of function signature associated with function name string.

mapping(bytes4 => string) functionRegistry

Invoked when called function does not exist in the contract.

fallback(bytes data) external returns (bytes)
NameTypeDescription
[0]bytesResponse of low level call.
  • Controlled by AccessControlManager.

Sets trusted remote on particular chain.

function setTrustedRemoteAddress(uint16 remoteChainId_, bytes remoteAddress_) external
NameTypeDescription
remoteChainId_uint16Chain Id of the destination chain.
remoteAddress_bytesAddress of the destination bridge.
  • Controlled by AccessControlManager.
  • ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.

A setter for the registry of functions that are allowed to be executed from proposals.

function upsertSignature(string[] signatures_, bool[] active_) external
NameTypeDescription
signatures_string[]Function signature to be added or removed.
active_bool[]bool value, should be true to add function.
  • Emits FunctionRegistryChanged if bool value of function changes.
  • Only owner.

This function transfers the ownership of the bridge from this contract to new owner.

function transferBridgeOwnership(address newOwner_) external
NameTypeDescription
newOwner_addressNew owner of the XVS Bridge.
  • Controlled by AccessControlManager.

Returns true if remote address is trustedRemote corresponds to chainId_.

function isTrustedRemote(uint16 remoteChainId_, bytes remoteAddress_) external returns (bool)
NameTypeDescription
remoteChainId_uint16Chain Id of the destination chain.
remoteAddress_bytesAddress of the destination bridge.
NameTypeDescription
[0]boolBool indicating whether the remote chain is trusted or not.
  • ZeroAddressNotAllowed is thrown when remoteAddress_ contract address is zero.

Empty implementation of renounce ownership to avoid any mishappening.

function renounceOwnership() public