Ir al contenido principal

ExecutionManager

It allows adding/removing execution strategies for trading on the LooksRare exchange.

Methods

addStrategy

function addStrategy(address strategy) external nonpayable

Add an execution strategy in the system

Parameters

NameTypeDescription
strategyaddressaddress of the strategy to add

isStrategyWhitelisted

function isStrategyWhitelisted(address strategy) external view returns (bool)

Returns if an execution strategy is in the system

Parameters

NameTypeDescription
strategyaddressaddress of the strategy

Returns

NameTypeDescription
-boolwhether execution strategy is valid

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
owneraddressaddress of the current owner

removeStrategy

function removeStrategy(address strategy) external nonpayable

Remove an execution strategy from the system

Parameters

NameTypeDescription
strategyaddressaddress of the strategy to remove

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressaddress of the new owner

viewCountWhitelistedStrategies

function viewCountWhitelistedStrategies() external view returns (uint256)

View number of whitelisted strategies

Returns

NameTypeDescription
-uint256number of execution strategies valid on the exchange

viewWhitelistedStrategies

function viewWhitelistedStrategies(uint256 cursor, uint256 size) external view returns (address[], uint256)

See whitelisted strategies in the system

Parameters

NameTypeDescription
cursoruint256cursor (should start at 0 for first request)
sizeuint256size of the response (e.g., 50)

Returns

NameTypeDescription
-address[]array of execution strategy addresses
cursoruint256cursor position

Events

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressaddress of the previous owner
newOwner indexedaddressaddress of the new owner

StrategyRemoved

event StrategyRemoved(address indexed strategy)

Parameters

NameTypeDescription
strategy indexedaddressaddress of the execution strategy

StrategyWhitelisted

event StrategyWhitelisted(address indexed strategy)

Parameters

NameTypeDescription
strategy indexedaddressaddress of the execution strategy