Skip to main content
Version: 1.0.0

OrderValidatorV2A

LooksRare protocol team (👀,💎); bitbeckers

OrderValidatorV2A

This contract is used to check the validity of maker ask/bid orders in the LooksRareProtocol (v2). It performs checks for: 1. Protocol allowlist issues (i.e. currency or strategy not allowed) 2. Maker order-specific issues (e.g., order invalid due to format or other-strategy specific issues) 3. Nonce related issues (e.g., nonce executed or cancelled) 4. Signature related issues and merkle tree parameters 5. Timestamp related issues (e.g., order expired) 6. Asset-related issues for ERC20/ERC721/ERC1155/Hypercerts (approvals and balances) 7. Collection-type suggestions 8. Transfer manager related issues 9. Creator fee related issues (e.g., creator fee too high, ERC2981 bundles)

This version does not handle strategies with partial fills.

Methods​

CRITERIA_GROUPS​

function CRITERIA_GROUPS() external view returns (uint256)

Number of distinct criteria groups checked to evaluate the validity of an order.

Returns​

NameTypeDescription
_0uint256undefined

ERC1155_INTERFACE_ID​

function ERC1155_INTERFACE_ID() external view returns (bytes4)

ERC1155 interfaceId.

Returns​

NameTypeDescription
_0bytes4undefined

ERC721_INTERFACE_ID_1​

function ERC721_INTERFACE_ID_1() external view returns (bytes4)

ERC721 potential interfaceId.

Returns​

NameTypeDescription
_0bytes4undefined

ERC721_INTERFACE_ID_2​

function ERC721_INTERFACE_ID_2() external view returns (bytes4)

ERC721 potential interfaceId.

Returns​

NameTypeDescription
_0bytes4undefined

HYPERCERT_INTERFACE_ID​

function HYPERCERT_INTERFACE_ID() external view returns (bytes4)

Hypercert interfaceId

Returns​

NameTypeDescription
_0bytes4undefined

MAGIC_VALUE_ORDER_NONCE_EXECUTED​

function MAGIC_VALUE_ORDER_NONCE_EXECUTED() external view returns (bytes32)

Magic value nonce returned if executed (or cancelled).

Returns​

NameTypeDescription
_0bytes32undefined

checkMakerOrderValidity​

function checkMakerOrderValidity(OrderStructs.Maker makerOrder, bytes signature, OrderStructs.MerkleTree merkleTree) external view returns (uint256[9] validationCodes)

Parameters​

NameTypeDescription
makerOrderOrderStructs.Makerundefined
signaturebytesundefined
merkleTreeOrderStructs.MerkleTreeundefined

Returns​

NameTypeDescription
validationCodesuint256[9]undefined

checkMultipleMakerOrderValidities​

function checkMultipleMakerOrderValidities(OrderStructs.Maker[] makerOrders, bytes[] signatures, OrderStructs.MerkleTree[] merkleTrees) external view returns (uint256[9][] validationCodes)

Parameters​

NameTypeDescription
makerOrdersOrderStructs.Maker[]undefined
signaturesbytes[]undefined
merkleTreesOrderStructs.MerkleTree[]undefined

Returns​

NameTypeDescription
validationCodesuint256[9][]undefined

creatorFeeManager​

function creatorFeeManager() external view returns (contract ICreatorFeeManager)

CreatorFeeManager.

Returns​

NameTypeDescription
_0contract ICreatorFeeManagerundefined

deriveProtocolParameters​

function deriveProtocolParameters() external nonpayable

Derive protocol parameters. Anyone can call this function.

It allows adjusting if the domain separator or creator fee manager address were to change.

domainSeparator​

function domainSeparator() external view returns (bytes32)

LooksRareProtocol domain separator.

Returns​

NameTypeDescription
_0bytes32undefined

looksRareProtocol​

function looksRareProtocol() external view returns (contract LooksRareProtocol)

LooksRareProtocol.

Returns​

NameTypeDescription
_0contract LooksRareProtocolundefined

maxCreatorFeeBp​

function maxCreatorFeeBp() external view returns (uint256)

Maximum creator fee (in basis point).

Returns​

NameTypeDescription
_0uint256undefined

transferManager​

function transferManager() external view returns (contract TransferManager)

TransferManager

Returns​

NameTypeDescription
_0contract TransferManagerundefined