StrategyDutchAuction
Strategy to launch a Dutch Auction for a token where the price decreases linearly until a specified timestamp and end price defined by the seller.
Methods
PROTOCOL_FEE
function PROTOCOL_FEE() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
PROTOCOL_FEE | uint256 | protocol fee (e.g., 200 = 2%) |
canExecuteTakerAsk
function canExecuteTakerAsk(OrderTypes.TakerOrder, OrderTypes.MakerOrder) external pure returns (bool, uint256, uint256)
Check whether a taker ask order can be executed against a maker bid
It cannot execute but it is left for compatibility purposes with the interface.
Parameters
Name | Type | Description |
---|---|---|
- | OrderTypes.TakerOrder | - |
- | OrderTypes.MakerOrder | - |
Returns
Name | Type | Description |
---|---|---|
isValid | bool | whether strategy can be executed, tokenId to execute, amount of tokens to execute |
price | uint256 | price of the transaction |
amount | uint256 | amount of tokens to transfer |
canExecuteTakerBid
function canExecuteTakerBid(OrderTypes.TakerOrder takerBid, OrderTypes.MakerOrder makerAsk) external view returns (bool, uint256, uint256)
Check whether a taker bid order can be executed against a maker ask
Parameters
Name | Type | Description |
---|---|---|
takerBid | OrderTypes.TakerOrder | taker bid order |
makerAsk | OrderTypes.MakerOrder | maker ask order |
Returns
Name | Type | Description |
---|---|---|
isValid | bool | whether strategy can be executed, tokenId to execute, amount of tokens to execute |
price | uint256 | price of the transaction |
amount | uint256 | amount of tokens to transfer |
minimumAuctionLengthInSeconds
function minimumAuctionLengthInSeconds() external view returns (uint256)
Returns
Name | Type | Description |
---|---|---|
minimumAuctionLengthInSeconds | uint256 | minimum auction length in seconds |
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 |
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.
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 |
updateMinimumAuctionLength
function updateMinimumAuctionLength(uint256 _minimumAuctionLengthInSeconds) external nonpayable
Update minimum auction length (in seconds)
It protects against auctions that would be too short to be executed (e.g., 15 seconds)
Parameters
Name | Type | Description |
---|---|---|
_minimumAuctionLengthInSeconds | uint256 | minimum auction length in seconds |
viewProtocolFee
function viewProtocolFee() external view returns (uint256)
Return protocol fee for this strategy
Returns
Name | Type | Description |
---|---|---|
protocolFee | uint256 | protocol fee |
Events
NewMinimumAuctionLengthInSeconds
event NewMinimumAuctionLengthInSeconds(uint256 minimumAuctionLengthInSeconds)
Parameters
Name | Type | Description |
---|---|---|
minimumAuctionLengthInSeconds | uint256 | minimum auction length in seconds |
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 |