StrategyStandardSaleForFixedPrice
Strategy that executes an order at a fixed price that can be taken either by a bid or an ask.
Methods
canExecuteTakerAsk
function canExecuteTakerAsk(OrderTypes.TakerOrder takerAsk, OrderTypes.MakerOrder makerBid) external view returns (bool, uint256, uint256)
Check whether a taker ask order can be executed against a maker bid
Parameters
Name | Type | Description |
---|---|---|
takerAsk | OrderTypes.TakerOrder | taker ask order |
makerBid | OrderTypes.MakerOrder | maker bid order |
Returns
Name | Type | Description |
---|---|---|
isValid | bool | whether strategy can be executed, tokenId to execute, amount of tokens to execute |
price | uint256 | price of the transaction |
amount | uint256 | amount of tokens to transfer |
canExecuteTakerBid
function canExecuteTakerBid(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external view returns (bool, uint256, uint256)
Check whether a taker bid order can be executed against a maker ask
Parameters
Name | Type | Description |
---|---|---|
takerBid | OrderTypes.TakerOrder | taker bid order |
makerAsk | OrderTypes.MakerOrder | maker ask order |
Returns
Name | Type | Description |
---|---|---|
isValid | bool | whether strategy can be executed, tokenId to execute, amount of tokens to execute |
price | uint256 | price of the transaction |
amount | uint256 | amount of tokens to transfer |
setProtocolFee
function setProtocolFee(uint256 newProtocolFee) external nonpayable
Set a new protocol fee. Can only be called by the current owner.
viewProtocolFee
function viewProtocolFee() external view returns (uint256)
Return protocol fee for this strategy
Returns
Name | Type | Description |
---|---|---|
protocolFee | uint256 | protocol fee |
Events
NewProtocolFee
event NewProtocolFee(uint256 protocolFee)
Parameters
Name | Type | Description |
---|---|---|
protocolFee | uint256 | new protocol fee |