StrategBlockRegistry
A contract where strategy blocks are registered.
Methods
addBlocks
Adds multiple blocks to the registry.
Parameters
_blocks
address[]
Array of block addresses to be added.
_names
string[]
Array of names corresponding to the strategy blocks.
authority
Returns the current authority.
Returns
_0
address
undefined
blocks
The mapping of blocks
Parameters
_0
address
undefined
Returns
enabled
bool
undefined
name
string
undefined
blocksLength
The number of blocks registered
Returns
_0
uint256
undefined
blocksValid
Checks if the given blocks are valid (enabled).
Parameters
_blocks
address[]
_blocks Array of block addresses to be checked.
Returns
_0
bool
A boolean indicating whether all the blocks are valid.
getBlocks
Retrieves the data of the given blocks.
Parameters
_blocks
address[]
Array of block addresses.
Returns
_0
IStrategBlockRegistry.StrategBlockData[]
An array of StrategBlockData containing the data of the blocks.
isConsumingScheduledOp
Returns true only in the context of a delayed restricted call, at the moment that the scheduled operation is being consumed. Prevents denial of service for delayed restricted calls in the case that the contract performs attacker controlled calls.
Returns
_0
bytes4
undefined
removeBlocks
Removes multiple blocks from the registry.
Parameters
_blocks
address[]
Array of block addresses to be removed.
setAuthority
Transfers control to a new authority. The caller must be the current authority.
Parameters
newAuthority
address
undefined
Events
AuthorityUpdated
Authority that manages this contract was updated.
Parameters
authority
address
undefined
NewBlock
Event emitted when a block is added to the registry
Parameters
addr
address
Address of the block added
name
string
Name of the block added
RemoveBlock
Event emitted when a block is removed from the registry
Parameters
addr
address
Address of the block removed
Errors
AccessManagedInvalidAuthority
Parameters
authority
address
undefined
AccessManagedRequiredDelay
Parameters
caller
address
undefined
delay
uint32
undefined
AccessManagedUnauthorized
Parameters
caller
address
undefined
BlockAlreadyExists
Error thrown when trying to add a block that is already registered
NotDeployer
Error thrown when the caller is not the deployer
NotOwner
Error thrown when the caller is not the owner
Last updated