Skip to main content

StrategyHypercertCollectionOffer

LooksRare protocol team (👀,💎); bitbeckers

StrategyHypercertCollectionOffer

This contract offers execution strategies for users to create maker bid offers for items in a collection. There are two available functions: 1. executeCollectionStrategyWithTakerAsk --> it applies to all itemIds in a collection 2. executeCollectionStrategyWithTakerAskWithProof --> it allows adding merkle proof criteria for tokenIds. 2. executeCollectionStrategyWithTakerAskWithAllowlist --> it allows adding merkle proof criteria for accounts.The bidder can only bid on 1 item id at a time. 1. The amount must be 1. 2. The units held at bid creation and ask execution time must be the same. 3. The units held by the item sold must be the same as the units held by the item bid.

Methods​

executeHypercertCollectionStrategyWithTakerAsk​

function executeHypercertCollectionStrategyWithTakerAsk(OrderStructs.Taker takerAsk, OrderStructs.Maker makerBid) external view returns (uint256 price, uint256[] itemIds, uint256[] amounts, bool isNonceInvalidated)

Parameters​

NameTypeDescription
takerAskOrderStructs.Takerundefined
makerBidOrderStructs.Makerundefined

Returns​

NameTypeDescription
priceuint256undefined
itemIdsuint256[]undefined
amountsuint256[]undefined
isNonceInvalidatedboolundefined

executeHypercertCollectionStrategyWithTakerAskWithAllowlist​

function executeHypercertCollectionStrategyWithTakerAskWithAllowlist(OrderStructs.Taker takerAsk, OrderStructs.Maker makerBid) external view returns (uint256 price, uint256[] itemIds, uint256[] amounts, bool isNonceInvalidated)

Parameters​

NameTypeDescription
takerAskOrderStructs.Takerundefined
makerBidOrderStructs.Makerundefined

Returns​

NameTypeDescription
priceuint256undefined
itemIdsuint256[]undefined
amountsuint256[]undefined
isNonceInvalidatedboolundefined

executeHypercertCollectionStrategyWithTakerAskWithProof​

function executeHypercertCollectionStrategyWithTakerAskWithProof(OrderStructs.Taker takerAsk, OrderStructs.Maker makerBid) external view returns (uint256 price, uint256[] itemIds, uint256[] amounts, bool isNonceInvalidated)

Parameters​

NameTypeDescription
takerAskOrderStructs.Takerundefined
makerBidOrderStructs.Makerundefined

Returns​

NameTypeDescription
priceuint256undefined
itemIdsuint256[]undefined
amountsuint256[]undefined
isNonceInvalidatedboolundefined

isLooksRareV2Strategy​

function isLooksRareV2Strategy() external pure returns (bool)

This function acts as a safety check for the protocol's owner when adding new execution strategies.

Returns​

NameTypeDescription
_0boolWhether it is a LooksRare V2 protocol strategy

isMakerOrderValid​

function isMakerOrderValid(OrderStructs.Maker makerBid, bytes4 functionSelector) external pure returns (bool isValid, bytes4 errorSelector)

Parameters​

NameTypeDescription
makerBidOrderStructs.Makerundefined
functionSelectorbytes4undefined

Returns​

NameTypeDescription
isValidboolundefined
errorSelectorbytes4undefined

Errors​

CollectionTypeInvalid​

error CollectionTypeInvalid()

It is returned is the collection type is not supported. For instance if the strategy is specific to hypercerts.

MerkleProofInvalid​

error MerkleProofInvalid()

It is returned if the merkle proof provided is invalid.

OrderInvalid​

error OrderInvalid()

It is returned if the order is permanently invalid. There may be an issue with the order formatting.