LooksRareExchange
It is the core contract of the LooksRare exchange.
Methods
DOMAIN_SEPARATOR
function DOMAIN_SEPARATOR() external view returns (bytes32)
Returns
Name | Type | Description |
---|---|---|
DOMAIN_SEPARATOR | bytes32 | EIP-712 domain separator for the exchange |
WETH
function WETH() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
WETH | address | address of the WETH ("Wrapped Ether") contract |
cancelAllOrdersForSender
function cancelAllOrdersForSender(uint256 minNonce) external nonpayable
Cancel all pending orders for a sender
Parameters
Name | Type | Description |
---|---|---|
minNonce | uint256 | minimum user nonce |
cancelMultipleMakerOrders
function cancelMultipleMakerOrders(uint256[] orderNonces) external nonpayable
Cancel maker orders
Parameters
Name | Type | Description |
---|---|---|
orderNonces | uint256[] | array of order nonces |
currencyManager
function currencyManager() external view returns (contract ICurrencyManager)
Returns
Name | Type | Description |
---|---|---|
currencyManager | contract ICurrencyManager | address of the CurrencyManager |
executionManager
function executionManager() external view returns (contract IExecutionManager)
Returns
Name | Type | Description |
---|---|---|
executionManager | contract IExecutionManager | address of the ExecutionManager |
isUserOrderNonceExecutedOrCancelled
function isUserOrderNonceExecutedOrCancelled(address user, uint256 orderNonce) external view returns (bool)
Check whether user order nonce is executed or cancelled
Parameters
Name | Type | Description |
---|---|---|
user | address | address of user |
orderNonce | uint256 | nonce of the order |
Returns
Name | Type | Description |
---|---|---|
- | bool | whether 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
Name | Type | Description |
---|---|---|
takerBid | OrderTypes.TakerOrder | taker bid order |
makerAsk | OrderTypes.MakerOrder | maker ask order |
matchAskWithTakerBidUsingETHAndWETH
function matchAskWithTakerBidUsingETHAndWETH(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external payable
Match ask with a taker bid order using ETH
Parameters
Name | Type | Description |
---|---|---|
takerBid | OrderTypes.TakerOrder | taker bid order |
makerAsk | OrderTypes.MakerOrder | maker ask order |
matchBidWithTakerAsk
function matchBidWithTakerAsk(OrderTypes.TakerOrder takerAsk, OrderTypes.MakerOrder makerBid) external nonpayable
Match a takerAsk with a makerBid
Parameters
Name | Type | Description |
---|---|---|
takerAsk | OrderTypes.TakerOrder | taker ask order |
makerBid | OrderTypes.MakerOrder | maker bid order |
owner
function owner() external view returns (address)
Returns the address of the current owner.
Returns
Name | Type | Description |
---|---|---|
owner | address | address of the current owner |
protocolFeeRecipient
function protocolFeeRecipient() external view returns (address)
Returns
Name | Type | Description |
---|---|---|
protocolFeeRecipient | address | address 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
Name | Type | Description |
---|---|---|
royaltyFeeManager | contract IRoyaltyFeeManager | address 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
Name | Type | Description |
---|---|---|
newOwner | address | address of the new owner |
transferSelectorNFT
function transferSelectorNFT() external view returns (contract ITransferSelectorNFT)
Returns
Name | Type | Description |
---|---|---|
transferSelectorNFT | contract ITransferSelectorNFT | address of the TransferSelectorNFT contract |
updateCurrencyManager
function updateCurrencyManager(address _currencyManager) external nonpayable
Update currency manager
Parameters
Name | Type | Description |
---|---|---|
_currencyManager | address | new currency manager address |
updateExecutionManager
function updateExecutionManager(address _executionManager) external nonpayable
Update execution manager
Parameters
Name | Type | Description |
---|---|---|
_executionManager | address | new execution manager address |
updateProtocolFeeRecipient
function updateProtocolFeeRecipient(address _protocolFeeRecipient) external nonpayable
Update protocol fee and recipient
Parameters
Name | Type | Description |
---|---|---|
_protocolFeeRecipient | address | new recipient for protocol fees |
updateRoyaltyFeeManager
function updateRoyaltyFeeManager(address _royaltyFeeManager) external nonpayable
Update royalty fee manager
Parameters
Name | Type | Description |
---|---|---|
_royaltyFeeManager | address | new fee manager address |
updateTransferSelectorNFT
function updateTransferSelectorNFT(address _transferSelectorNFT) external nonpayable
Update transfer selector NFT
Parameters
Name | Type | Description |
---|---|---|
_transferSelectorNFT | address | new transfer selector address |
userMinOrderNonce
function userMinOrderNonce(address) external view returns (uint256)
Parameters
Name | Type | Description |
---|---|---|
user | address | user address |
Returns
Name | Type | Description |
---|---|---|
minOrderNonce | uint256 | minimum 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
Name | Type | Description |
---|---|---|
user indexed | address | user address |
newMinNonce | uint256 | new minimum order nonce |
CancelMultipleOrders
event CancelMultipleOrders(address indexed user, uint256[] orderNonces)
Parameters
Name | Type | Description |
---|---|---|
user indexed | address | user address |
orderNonces | uint256[] | array of order nonces that are cancelled |
NewCurrencyManager
event NewCurrencyManager(address indexed currencyManager)
Parameters
Name | Type | Description |
---|---|---|
currencyManager indexed | address | address of the new CurrencyManager |
NewExecutionManager
event NewExecutionManager(address indexed executionManager)
Parameters
Name | Type | Description |
---|---|---|
executionManager indexed | address | address of the new ExecutionManager |
NewProtocolFeeRecipient
event NewProtocolFeeRecipient(address indexed protocolFeeRecipient)
Parameters
Name | Type | Description |
---|---|---|
protocolFeeRecipient indexed | address | address of the new protocol fee recipient |
NewRoyaltyFeeManager
event NewRoyaltyFeeManager(address indexed royaltyFeeManager)
Parameters
Name | Type | Description |
---|---|---|
royaltyFeeManager indexed | address | address of the new RoyaltyFeeManager |
NewTransferSelectorNFT
event NewTransferSelectorNFT(address indexed transferSelectorNFT)
Parameters
Name | Type | Description |
---|---|---|
transferSelectorNFT indexed | address | address of the new TransferSelectorNFT |
OwnershipTransferred
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)
Parameters
Name | Type | Description |
---|---|---|
previousOwner indexed | address | address of the previous owner |
newOwner indexed | address | address of the new owner |
RoyaltyPayment
event RoyaltyPayment(address indexed collection, uint256 indexed tokenId, address indexed royaltyRecipient, address currency, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
collection indexed | address | collection address |
tokenId indexed | uint256 | tokenId |
royaltyRecipient indexed | address | royalty fee recipient |
currency | address | currency used (e.g., WETH) |
amount | uint256 | royalty 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
Name | Type | Description |
---|---|---|
orderHash | bytes32 | order hash |
orderNonce | uint256 | user order nonce (for the maker) |
taker indexed | address | taker address |
maker indexed | address | maker address |
strategy indexed | address | address of the execution strategy |
currency | address | currency address |
collection | address | collection address |
tokenId | uint256 | tokenId |
amount | uint256 | amount of tokens transferred |
price | uint256 | gross 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
Name | Type | Description |
---|---|---|
orderHash | bytes32 | order hash |
orderNonce | uint256 | user order nonce (for the maker) |
taker indexed | address | taker address |
maker indexed | address | maker address |
strategy indexed | address | address of the execution strategy |
currency | address | currency address |
collection | address | collection address |
tokenId | uint256 | tokenId |
amount | uint256 | amount of tokens transferred |
price | uint256 | gross transaction price |