StrategyItemIdsRange
This contract offers a single execution strategy for users to bid on a specific amount of items in a range bounded by 2 item ids.
executeStrategyWithTakerAsk
function executeStrategyWithTakerAsk(struct OrderStructs.Taker takerAsk, struct OrderStructs.Maker makerBid) external pure returns (uint256 price, uint256[] itemIds, uint256[] amounts, bool isNonceInvalidated)
This function validates the order under the context of the chosen strategy and returns the fulfillable items/amounts/price/nonce invalidation status. With this strategy, the bidder picks a item id range (e.g. 1-100) and a seller can fulfill the order with any tokens within the specified id range.
Parameters
Name | Type | Description |
---|---|---|
takerAsk | struct OrderStructs.Taker | Taker ask struct (taker ask-specific parameters for the execution) |
makerBid | struct OrderStructs.Maker | Maker bid struct (maker bid-specific parameters for the execution) |
isMakerOrderValid
function isMakerOrderValid(struct OrderStructs.Maker makerBid, bytes4 functionSelector) external pure returns (bool isValid, bytes4 errorSelector)
Validate only the maker order under the context of the chosen strategy. It does not revert if the maker order is invalid. Instead it returns false and the error's 4 bytes selector.
Parameters
Name | Type | Description |
---|---|---|
makerBid | struct OrderStructs.Maker | |
functionSelector | bytes4 | Function selector for the strategy |
Return Values
Name | Type | Description |
---|---|---|
isValid | bool | Whether the maker struct is valid |
errorSelector | bytes4 | If isValid is false, it returns the error's 4 bytes selector |