Admin Functions
Last updated
Last updated
The Asset Controller contract uses OpenZeppelin’s module. To grant, revoke, or check roles for an address, use the standard functions available in the AccessControl
contract.
The following roles are available:
DEFAULT_ADMIN_ROLE
0x0000000000000000000000000000000000000000000000000000000000000000
Full access to all admin functions
PAUSE_ROLE
0x139c2898040ef16910dc9f44dc697df79363da767d8bc92f2e310312b816e46d
Can pause the message sending, resending and execution functions
The following functions can only be called by an account with the DEFAULT_ADMIN_ROLE
role.
Sets the local bridge adapters on the same chain that can be used to relay messages to the Controller contract. If a Registry has been set, the local adapters configured through this function will not be taken into account.
adapters
address[]
An array of adapter addresses to enable/disable
enabled
bool[]
An array of boolean values to enable or disable the corresponding adapters in adapters
. Both arrays must have the same length
Sets the minimum number of bridges required to relay an asset when performing multi-bridge transfers without mint/burn limits. Setting this value to 0 will disable multi-bridge transfers entirely.
_minBridges
uint256
The minimum number of bridges required.
Adds a bridge adapter to the whitelist of adapters that can be used for multi-bridge transfers without applying mint/burn limits.
Input Params:
adapter
address[]
An array of adapter addresses of the bridge adapters.
enabled
bool[]
An array of the status of the adapters. True to enable, false to disable. Adapter
and enabled
must have the same length.
Sets the controller contract addresses for the specified chain IDs. To disable a controller on a given chain, its address should be set to the zero address (address(0)
).
Input params:
chainId
uint256[]
An array of chain id to set controllers for
controller
address[]
An array of controller addresses to set for the corresponding chainIds
. Both arrays must have the same length.
The following functions can only be called by accounts with the PAUSE_ROLE
:
Pauses the contract. This disables the following functions: execute()
, sendMessage()
and resendMessage()
.
Unpauses the contract, re-enabling the functions listed above.