Skip to main content

ProtocolHelpers

LooksRare protocol team (👀,💎)

ProtocolHelpers

This contract contains helper view functions for order creation.

Methods​

computeDigestMerkleTree​

function computeDigestMerkleTree(OrderStructs.MerkleTree merkleTree) external view returns (bytes32 digest)

Parameters​

NameTypeDescription
merkleTreeOrderStructs.MerkleTreeundefined

Returns​

NameTypeDescription
digestbytes32undefined

computeMakerDigest​

function computeMakerDigest(OrderStructs.Maker maker) external view returns (bytes32 digest)

Parameters​

NameTypeDescription
makerOrderStructs.Makerundefined

Returns​

NameTypeDescription
digestbytes32undefined

looksRareProtocol​

function looksRareProtocol() external view returns (contract LooksRareProtocol)

Returns​

NameTypeDescription
_0contract LooksRareProtocolundefined

verifyMakerSignature​

function verifyMakerSignature(OrderStructs.Maker maker, bytes makerSignature, address signer) external view returns (bool)

Parameters​

NameTypeDescription
makerOrderStructs.Makerundefined
makerSignaturebytesundefined
signeraddressundefined

Returns​

NameTypeDescription
_0boolundefined

verifyMerkleTree​

function verifyMerkleTree(OrderStructs.MerkleTree merkleTree, bytes makerSignature, address signer) external view returns (bool)

Parameters​

NameTypeDescription
merkleTreeOrderStructs.MerkleTreeundefined
makerSignaturebytesundefined
signeraddressundefined

Returns​

NameTypeDescription
_0boolundefined

Errors​

NullSignerAddress​

error NullSignerAddress()

It is emitted if the signer is null.

SignatureEOAInvalid​

error SignatureEOAInvalid()

It is emitted if the signature is invalid for an EOA (the address recovered is not the expected one).

SignatureERC1271Invalid​

error SignatureERC1271Invalid()

It is emitted if the signature is invalid for a ERC1271 contract signer.

SignatureLengthInvalid​

error SignatureLengthInvalid(uint256 length)

It is emitted if the signature's length is neither 64 nor 65 bytes.

Parameters​

NameTypeDescription
lengthuint256undefined

SignatureParameterSInvalid​

error SignatureParameterSInvalid()

It is emitted if the signature is invalid due to S parameter.

SignatureParameterVInvalid​

error SignatureParameterVInvalid(uint8 v)

It is emitted if the signature is invalid due to V parameter.

Parameters​

NameTypeDescription
vuint8undefined