Developers V1
Search
K
Links

Auction

Functions

doAuction

Participation in the auction
There are two types of auction: buy it now and Dutch auction. In this method, amount has a minimum starting price requirement
Buy it now: when the amount paid for a lot is greater than or equal to the Buy it now price, it is counted as a buy it now price and the excess amount is returned to the user address
Dutch auction: no more details
function doAuction(
uint256 auctionId,
uint256 amount) external
Parameters:
Name
Type
Description
auctionId
uint256
The token ID of the lot
amount
uint256
Payment amount

doHarvestAuction

Claim the lot when user bid it succesful
function doHarvestAuction(uint256 auctionId) external
Parameters:
Name
Type
Description
auctionId
uint256
The token ID of the lot

getAuctioningIds

Get all lot IDs
function getAuctioningIds() external view returns (uint256[] memory)

getBidAuctioningIds

Get the IDs of lots with a history of participation
function getBidAuctioningIds() external view returns (uint256[] memory)

getUserBidAuctioningIds

Get the lot ID of the specified user's participation
function getUserBidAuctioningIds(
address user
) public view returns (uint256[] memory)
Parameters:
Name
Type
Description
user
address
wallet address of a user

getUserBidAuctioningInfos

Get lots info in user participation
function getUserBidAuctioningInfos(
address user
) external view returns (BidAuctionInfo[] memory)
Parameters:
Name
Type
Description
user
address
wallet address of a user
Returns:
BidAuctionInfo Data structure
Name
Type
Description
auctionId
uint256
lot ID
harvestAddress
address
winner's address
harvestFlag
boolean
Harvest or not?
Last modified 1yr ago