StrategyChainlinkUSDDynamicAsk
LooksRare protocol team (👀,💎)
StrategyChainlinkUSDDynamicAsk
This contract allows a seller to sell an NFT priced in USD and the receivable amount to be in ETH.
Methods​
ETH_USD_PRICE_FEED_DECIMALS​
function ETH_USD_PRICE_FEED_DECIMALS() external view returns (uint256)
It is possible to call priceFeed.decimals() to get the decimals, but to save gas, it is hard coded instead.
Returns​
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
WETH​
function WETH() external view returns (address)
Wrapped ether (WETH) address.
Returns​
Name | Type | Description |
---|---|---|
_0 | address | undefined |
cancelOwnershipTransfer​
function cancelOwnershipTransfer() external nonpayable
This function is used to cancel the ownership transfer.
This function can be used for both cancelling a transfer to a new owner and cancelling the renouncement of the ownership.
confirmOwnershipRenouncement​
function confirmOwnershipRenouncement() external nonpayable
This function is used to confirm the ownership renouncement.
confirmOwnershipTransfer​
function confirmOwnershipTransfer() external nonpayable
This function is used to confirm the ownership transfer.
This function can only be called by the current potential owner.
executeStrategyWithTakerBid​
function executeStrategyWithTakerBid(OrderStructs.Taker takerBid, OrderStructs.Maker makerAsk) external view returns (uint256 price, uint256[] itemIds, uint256[] amounts, bool isNonceInvalidated)
Parameters​
Name | Type | Description |
---|---|---|
takerBid | OrderStructs.Taker | undefined |
makerAsk | OrderStructs.Maker | undefined |
Returns​
Name | Type | Description |
---|---|---|
price | uint256 | undefined |
itemIds | uint256[] | undefined |
amounts | uint256[] | undefined |
isNonceInvalidated | bool | undefined |
initiateOwnershipRenouncement​
function initiateOwnershipRenouncement() external nonpayable
This function is used to initiate the ownership renouncement.
initiateOwnershipTransfer​
function initiateOwnershipTransfer(address newPotentialOwner) external nonpayable
This function is used to initiate the transfer of ownership to a new owner.
Parameters​
Name | Type | Description |
---|---|---|
newPotentialOwner | address | New potential owner address |
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​
Name | Type | Description |
---|---|---|
_0 | bool | Whether it is a LooksRare V2 protocol strategy |
isMakerOrderValid​
function isMakerOrderValid(OrderStructs.Maker makerAsk, bytes4 functionSelector) external view returns (bool isValid, bytes4 errorSelector)
Parameters​
Name | Type | Description |
---|---|---|
makerAsk | OrderStructs.Maker | undefined |
functionSelector | bytes4 | undefined |
Returns​
Name | Type | Description |
---|---|---|
isValid | bool | undefined |
errorSelector | bytes4 | undefined |
maxLatency​
function maxLatency() external view returns (uint256)
Maximum latency accepted after which the execution strategy rejects the retrieved price. For ETH, it cannot be higher than 3,600 as Chainlink will at least update the price every 3,600 seconds, provided ETH's price does not deviate more than 0.5%. For NFTs, it cannot be higher than 86,400 as Chainlink will at least update the price every 86,400 seconds, provided ETH's price does not deviate more than 2%.
Returns​
Name | Type | Description |
---|---|---|
_0 | uint256 | undefined |
owner​
function owner() external view returns (address)
Address of the current owner.
Returns​
Name | Type | Description |
---|---|---|
_0 | address | undefined |
ownershipStatus​
function ownershipStatus() external view returns (enum IOwnableTwoSteps.Status)
Ownership status.
Returns​
Name | Type | Description |
---|---|---|
_0 | enum IOwnableTwoSteps.Status | undefined |
potentialOwner​
function potentialOwner() external view returns (address)
Address of the potential owner.
Returns​
Name | Type | Description |
---|---|---|
_0 | address | undefined |
priceFeed​
function priceFeed() external view returns (contract AggregatorV3Interface)
ETH/USD Chainlink price feed
Returns​
Name | Type | Description |
---|---|---|
_0 | contract AggregatorV3Interface | undefined |
Events​
CancelOwnershipTransfer​
event CancelOwnershipTransfer()
This is emitted if the ownership transfer is cancelled.
InitiateOwnershipRenouncement​
event InitiateOwnershipRenouncement()
This is emitted if the ownership renouncement is initiated.
InitiateOwnershipTransfer​
event InitiateOwnershipTransfer(address previousOwner, address potentialOwner)
This is emitted if the ownership transfer is initiated.
Parameters​
Name | Type | Description |
---|---|---|
previousOwner | address | undefined |
potentialOwner | address | undefined |
NewOwner​
event NewOwner(address newOwner)
This is emitted when there is a new owner.
Parameters​
Name | Type | Description |
---|---|---|
newOwner | address | undefined |
Errors​
BidTooLow​
error BidTooLow()
It is returned if the bid price is too low for the ask user.
ChainlinkPriceInvalid​
error ChainlinkPriceInvalid()
It is returned if the Chainlink price is invalid (e.g. negative).
NoOngoingTransferInProgress​
error NoOngoingTransferInProgress()
This is returned when there is no transfer of ownership in progress.
NotOwner​
error NotOwner()
This is returned when the caller is not the owner.
OrderInvalid​
error OrderInvalid()
It is returned if the order is permanently invalid. There may be an issue with the order formatting.
PriceNotRecentEnough​
error PriceNotRecentEnough()
It is returned if the current block time relative to the latest price's update time is greater than the latency tolerance.
RenouncementNotInProgress​
error RenouncementNotInProgress()
This is returned when there is no renouncement in progress but the owner tries to validate the ownership renouncement.
TransferAlreadyInProgress​
error TransferAlreadyInProgress()
This is returned when the transfer is already in progress but the owner tries initiate a new ownership transfer.
TransferNotInProgress​
error TransferNotInProgress()
This is returned when there is no ownership transfer in progress but the ownership change tries to be approved.
WrongPotentialOwner​
error WrongPotentialOwner()
This is returned when the ownership transfer is attempted to be validated by the a caller that is not the potential owner.