Skip to main content

StrategyDutchAuction

This contract offers a single execution strategy for users to create Dutch auctions.

executeStrategyWithTakerBid

function executeStrategyWithTakerBid(struct OrderStructs.Taker takerBid, struct OrderStructs.Maker makerAsk) external view 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. The execution price set by the seller decreases linearly within the defined period.

The client has to provide the seller's desired initial start price as the additionalParameters.

Parameters

NameTypeDescription
takerBidstruct OrderStructs.TakerTaker bid struct (taker ask-specific parameters for the execution)
makerAskstruct OrderStructs.MakerMaker ask struct (maker bid-specific parameters for the execution)

isMakerOrderValid

function isMakerOrderValid(struct OrderStructs.Maker makerAsk, 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

NameTypeDescription
makerAskstruct OrderStructs.Maker
functionSelectorbytes4Function selector for the strategy

Return Values

NameTypeDescription
isValidboolWhether the maker struct is valid
errorSelectorbytes4If isValid is false, it returns the error's 4 bytes selector