Zum Hauptinhalt überspringen

StrategyManager

This contract handles the addition and the update of execution strategies.

strategyInfo

mapping(uint256 => struct IStrategyManager.Strategy) strategyInfo

This returns the strategy information for a strategy id.

constructor

constructor(address _owner) public

Constructor

Parameters

NameTypeDescription
_owneraddressOwner address

addStrategy

function addStrategy(uint16 standardProtocolFeeBp, uint16 minTotalFeeBp, uint16 maxProtocolFeeBp, bytes4 selector, bool isMakerBid, address implementation) external

This function allows the owner to add a new execution strategy to the protocol.

Strategies have an id that is incremental. Only callable by owner.

Parameters

NameTypeDescription
standardProtocolFeeBpuint16Standard protocol fee (in basis point)
minTotalFeeBpuint16Minimum total fee (in basis point)
maxProtocolFeeBpuint16Maximum protocol fee (in basis point)
selectorbytes4Function selector for the strategy
isMakerBidboolWhether the function selector is for maker bid
implementationaddressImplementation address

updateStrategy

function updateStrategy(uint256 strategyId, bool isActive, uint16 newStandardProtocolFee, uint16 newMinTotalFee) external

This function allows the owner to update parameters for an existing execution strategy.

Only callable by owner.

Parameters

NameTypeDescription
strategyIduint256Strategy id
isActiveboolWhether the strategy must be active
newStandardProtocolFeeuint16New standard protocol fee (in basis point)
newMinTotalFeeuint16New minimum total fee (in basis point)