Developers Documentation
  • Overview
    • Contracts Overview
    • Public Repositories
    • Smart Contract Addresses
      • Polygon PoS
  • Core protocol
    • Architecture Overview
    • Blocks
    • Vault Strategy
    • Vault Configuration
    • Vault Deployment
    • Vault Operations
    • Access Manager
    • Contracts
      • StrategVault
      • StrategERC3525
      • StrategVaultFactory
      • StrategAssetBuffer
      • StrategBlockRegistry
      • StrategUserInteractions
      • StrategOperatorProxy
      • StrategOperatorDataAggregator
  • Borrow module
    • Architecture Overview
    • Aave V3 Position manager
    • Smart Contract Docs
      • StrategPositionManagerFactory
      • StrategAaveV3PositionManager
      • StrategAaveV3PositionManagerInfo
  • Portal Module
    • Architecture Overview
    • Swap
      • Features
      • Functions
    • Oracle
      • Architecture design
      • Functions
  • Tools
    • Developer kit
Powered by GitBook
On this page
  • Methods
  • addBlocks
  • authority
  • blocks
  • blocksLength
  • blocksValid
  • getBlocks
  • isConsumingScheduledOp
  • removeBlocks
  • setAuthority
  • Events
  • AuthorityUpdated
  • NewBlock
  • RemoveBlock
  • Errors
  • AccessManagedInvalidAuthority
  • AccessManagedRequiredDelay
  • AccessManagedUnauthorized
  • BlockAlreadyExists
  • NotDeployer
  • NotOwner
  1. Core protocol
  2. Contracts

StrategBlockRegistry

A contract where strategy blocks are registered.

Methods

addBlocks

function addBlocks(address[] _blocks, string[] _names) external nonpayable

Adds multiple blocks to the registry.

Parameters

Name
Type
Description

_blocks

address[]

Array of block addresses to be added.

_names

string[]

Array of names corresponding to the strategy blocks.

authority

function authority() external view returns (address)

Returns the current authority.

Returns

Name
Type
Description

_0

address

undefined

blocks

function blocks(address) external view returns (bool enabled, string name)

The mapping of blocks

Parameters

Name
Type
Description

_0

address

undefined

Returns

Name
Type
Description

enabled

bool

undefined

name

string

undefined

blocksLength

function blocksLength() external view returns (uint256)

The number of blocks registered

Returns

Name
Type
Description

_0

uint256

undefined

blocksValid

function blocksValid(address[] _blocks) external view returns (bool)

Checks if the given blocks are valid (enabled).

Parameters

Name
Type
Description

_blocks

address[]

_blocks Array of block addresses to be checked.

Returns

Name
Type
Description

_0

bool

A boolean indicating whether all the blocks are valid.

getBlocks

function getBlocks(address[] _blocks) external view returns (struct IStrategBlockRegistry.StrategBlockData[])

Retrieves the data of the given blocks.

Parameters

Name
Type
Description

_blocks

address[]

Array of block addresses.

Returns

Name
Type
Description

_0

IStrategBlockRegistry.StrategBlockData[]

An array of StrategBlockData containing the data of the blocks.

isConsumingScheduledOp

function isConsumingScheduledOp() external view returns (bytes4)

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

Name
Type
Description

_0

bytes4

undefined

removeBlocks

function removeBlocks(address[] _blocks) external nonpayable

Removes multiple blocks from the registry.

Parameters

Name
Type
Description

_blocks

address[]

Array of block addresses to be removed.

setAuthority

function setAuthority(address newAuthority) external nonpayable

Transfers control to a new authority. The caller must be the current authority.

Parameters

Name
Type
Description

newAuthority

address

undefined

Events

AuthorityUpdated

event AuthorityUpdated(address authority)

Authority that manages this contract was updated.

Parameters

Name
Type
Description

authority

address

undefined

NewBlock

event NewBlock(address addr, string name)

Event emitted when a block is added to the registry

Parameters

Name
Type
Description

addr

address

Address of the block added

name

string

Name of the block added

RemoveBlock

event RemoveBlock(address addr)

Event emitted when a block is removed from the registry

Parameters

Name
Type
Description

addr

address

Address of the block removed

Errors

AccessManagedInvalidAuthority

error AccessManagedInvalidAuthority(address authority)

Parameters

Name
Type
Description

authority

address

undefined

AccessManagedRequiredDelay

error AccessManagedRequiredDelay(address caller, uint32 delay)

Parameters

Name
Type
Description

caller

address

undefined

delay

uint32

undefined

AccessManagedUnauthorized

error AccessManagedUnauthorized(address caller)

Parameters

Name
Type
Description

caller

address

undefined

BlockAlreadyExists

error BlockAlreadyExists()

Error thrown when trying to add a block that is already registered

NotDeployer

error NotDeployer()

Error thrown when the caller is not the deployer

NotOwner

error NotOwner()

Error thrown when the caller is not the owner

PreviousStrategAssetBufferNextStrategUserInteractions

Last updated 1 year ago