Chuyển tiếp đến nội dung chính

LooksRareExchange

It is the core contract of the LooksRare exchange.

Methods

DOMAIN_SEPARATOR

function DOMAIN_SEPARATOR() external view returns (bytes32)

Returns

NameTypeDescription
DOMAIN_SEPARATORbytes32EIP-712 domain separator for the exchange

WETH

function WETH() external view returns (address)

Returns

NameTypeDescription
WETHaddressaddress of the WETH ("Wrapped Ether") contract

cancelAllOrdersForSender

function cancelAllOrdersForSender(uint256 minNonce) external nonpayable

Cancel all pending orders for a sender

Parameters

NameTypeDescription
minNonceuint256minimum user nonce

cancelMultipleMakerOrders

function cancelMultipleMakerOrders(uint256[] orderNonces) external nonpayable

Cancel maker orders

Parameters

NameTypeDescription
orderNoncesuint256[]array of order nonces

currencyManager

function currencyManager() external view returns (contract ICurrencyManager)

Returns

NameTypeDescription
currencyManagercontract ICurrencyManageraddress of the CurrencyManager

executionManager

function executionManager() external view returns (contract IExecutionManager)

Returns

NameTypeDescription
executionManagercontract IExecutionManageraddress of the ExecutionManager

isUserOrderNonceExecutedOrCancelled

function isUserOrderNonceExecutedOrCancelled(address user, uint256 orderNonce) external view returns (bool)

Check whether user order nonce is executed or cancelled

Parameters

NameTypeDescription
useraddressaddress of user
orderNonceuint256nonce of the order

Returns

NameTypeDescription
-boolwhether the user order nonce is executed or cancelled (for cancels, it needs to be checked against the minOrderNonce too)

matchAskWithTakerBid

function matchAskWithTakerBid(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external nonpayable

Match a takerBid with a matchAsk

Parameters

NameTypeDescription
takerBidOrderTypes.TakerOrdertaker bid order
makerAskOrderTypes.MakerOrdermaker ask order

matchAskWithTakerBidUsingETHAndWETH

function matchAskWithTakerBidUsingETHAndWETH(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external payable

Match ask with a taker bid order using ETH

Parameters

NameTypeDescription
takerBidOrderTypes.TakerOrdertaker bid order
makerAskOrderTypes.MakerOrdermaker ask order

matchBidWithTakerAsk

function matchBidWithTakerAsk(OrderTypes.TakerOrder takerAsk, OrderTypes.MakerOrder makerBid) external nonpayable

Match a takerAsk with a makerBid

Parameters

NameTypeDescription
takerAskOrderTypes.TakerOrdertaker ask order
makerBidOrderTypes.MakerOrdermaker bid order

owner

function owner() external view returns (address)

Returns the address of the current owner.

Returns

NameTypeDescription
owneraddressaddress of the current owner

protocolFeeRecipient

function protocolFeeRecipient() external view returns (address)

Returns

NameTypeDescription
protocolFeeRecipientaddressaddress of the protocol fee recipient

renounceOwnership

function renounceOwnership() external nonpayable

Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.

royaltyFeeManager

function royaltyFeeManager() external view returns (contract IRoyaltyFeeManager)

Returns

NameTypeDescription
royaltyFeeManagercontract IRoyaltyFeeManageraddress of the RoyaltyFeeManager

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.

Parameters

NameTypeDescription
newOwneraddressaddress of the new owner

transferSelectorNFT

function transferSelectorNFT() external view returns (contract ITransferSelectorNFT)

Returns

NameTypeDescription
transferSelectorNFTcontract ITransferSelectorNFTaddress of the TransferSelectorNFT contract

updateCurrencyManager

function updateCurrencyManager(address _currencyManager) external nonpayable

Update currency manager

Parameters

NameTypeDescription
_currencyManageraddressnew currency manager address

updateExecutionManager

function updateExecutionManager(address _executionManager) external nonpayable

Update execution manager

Parameters

NameTypeDescription
_executionManageraddressnew execution manager address

updateProtocolFeeRecipient

function updateProtocolFeeRecipient(address _protocolFeeRecipient) external nonpayable

Update protocol fee and recipient

Parameters

NameTypeDescription
_protocolFeeRecipientaddressnew recipient for protocol fees

updateRoyaltyFeeManager

function updateRoyaltyFeeManager(address _royaltyFeeManager) external nonpayable

Update royalty fee manager

Parameters

NameTypeDescription
_royaltyFeeManageraddressnew fee manager address

updateTransferSelectorNFT

function updateTransferSelectorNFT(address _transferSelectorNFT) external nonpayable

Update transfer selector NFT

Parameters

NameTypeDescription
_transferSelectorNFTaddressnew transfer selector address

userMinOrderNonce

function userMinOrderNonce(address) external view returns (uint256)

Parameters

NameTypeDescription
useraddressuser address

Returns

NameTypeDescription
minOrderNonceuint256minimum order nonce that defines the validity of user orders. If an order has a nonce inferior to the minOrderNonce, it cannot be executed.

Events

CancelAllOrders

event CancelAllOrders(address indexed user, uint256 newMinNonce)

Parameters

NameTypeDescription
user indexedaddressuser address
newMinNonceuint256new minimum order nonce

CancelMultipleOrders

event CancelMultipleOrders(address indexed user, uint256[] orderNonces)

Parameters

NameTypeDescription
user indexedaddressuser address
orderNoncesuint256[]array of order nonces that are cancelled

NewCurrencyManager

event NewCurrencyManager(address indexed currencyManager)

Parameters

NameTypeDescription
currencyManager indexedaddressaddress of the new CurrencyManager

NewExecutionManager

event NewExecutionManager(address indexed executionManager)

Parameters

NameTypeDescription
executionManager indexedaddressaddress of the new ExecutionManager

NewProtocolFeeRecipient

event NewProtocolFeeRecipient(address indexed protocolFeeRecipient)

Parameters

NameTypeDescription
protocolFeeRecipient indexedaddressaddress of the new protocol fee recipient

NewRoyaltyFeeManager

event NewRoyaltyFeeManager(address indexed royaltyFeeManager)

Parameters

NameTypeDescription
royaltyFeeManager indexedaddressaddress of the new RoyaltyFeeManager

NewTransferSelectorNFT

event NewTransferSelectorNFT(address indexed transferSelectorNFT)

Parameters

NameTypeDescription
transferSelectorNFT indexedaddressaddress of the new TransferSelectorNFT

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

NameTypeDescription
previousOwner indexedaddressaddress of the previous owner
newOwner indexedaddressaddress of the new owner

RoyaltyPayment

event RoyaltyPayment(address indexed collection, uint256 indexed tokenId, address indexed royaltyRecipient, address currency, uint256 amount)

Parameters

NameTypeDescription
collection indexedaddresscollection address
tokenId indexeduint256tokenId
royaltyRecipient indexedaddressroyalty fee recipient
currencyaddresscurrency used (e.g., WETH)
amountuint256royalty amount transferred

TakerAsk

event TakerAsk(bytes32 orderHash, uint256 orderNonce, address indexed taker, address indexed maker, address indexed strategy, address currency, address collection, uint256 tokenId, uint256 amount, uint256 price)

Parameters

NameTypeDescription
orderHashbytes32order hash
orderNonceuint256user order nonce (for the maker)
taker indexedaddresstaker address
maker indexedaddressmaker address
strategy indexedaddressaddress of the execution strategy
currencyaddresscurrency address
collectionaddresscollection address
tokenIduint256tokenId
amountuint256amount of tokens transferred
priceuint256gross transaction price

TakerBid

event TakerBid(bytes32 orderHash, uint256 orderNonce, address indexed taker, address indexed maker, address indexed strategy, address currency, address collection, uint256 tokenId, uint256 amount, uint256 price)

Parameters

NameTypeDescription
orderHashbytes32order hash
orderNonceuint256user order nonce (for the maker)
taker indexedaddresstaker address
maker indexedaddressmaker address
strategy indexedaddressaddress of the execution strategy
currencyaddresscurrency address
collectionaddresscollection address
tokenIduint256tokenId
amountuint256amount of tokens transferred
priceuint256gross transaction price