Skip to main content

EnglishAuctionsLogic

thirdweb.com

Methods​

MAX_BPS​

function MAX_BPS() external view returns (uint64)

The max bps of the contract. So, 10_000 == 100 %

Returns​

NameTypeDescription
_0uint64undefined

_msgData​

function _msgData() external view returns (bytes)

Returns​

NameTypeDescription
_0bytesundefined

_msgSender​

function _msgSender() external view returns (address sender)

Returns​

NameTypeDescription
senderaddressundefined

bidInAuction​

function bidInAuction(uint256 _auctionId, uint256 _bidAmount) external payable

Bid in an active auction.

Parameters​

NameTypeDescription
_auctionIduint256The ID of the auction to bid in.
_bidAmountuint256The bid amount in the currency specified by the auction.

cancelAuction​

function cancelAuction(uint256 _auctionId) external nonpayable

Cancels an auction.

Parameters​

NameTypeDescription
_auctionIduint256undefined

collectAuctionPayout​

function collectAuctionPayout(uint256 _auctionId) external nonpayable

Distribute the winning bid amount to the auction creator.

Parameters​

NameTypeDescription
_auctionIduint256The ID of an auction.

collectAuctionTokens​

function collectAuctionTokens(uint256 _auctionId) external nonpayable

Distribute the auctioned NFTs to the winning bidder.

Parameters​

NameTypeDescription
_auctionIduint256The ID of an auction.

createAuction​

function createAuction(IEnglishAuctions.AuctionParameters _params) external nonpayable returns (uint256 auctionId)

Parameters​

NameTypeDescription
_paramsIEnglishAuctions.AuctionParametersundefined

Returns​

NameTypeDescription
auctionIduint256undefined

getAllAuctions​

function getAllAuctions(uint256 _startId, uint256 _endId) external view returns (struct IEnglishAuctions.Auction[] _allAuctions)

Returns all non-cancelled auctions.

Parameters​

NameTypeDescription
_startIduint256undefined
_endIduint256undefined

Returns​

NameTypeDescription
_allAuctionsIEnglishAuctions.Auction[]undefined

getAllValidAuctions​

function getAllValidAuctions(uint256 _startId, uint256 _endId) external view returns (struct IEnglishAuctions.Auction[] _validAuctions)

Returns all active auctions.

Parameters​

NameTypeDescription
_startIduint256undefined
_endIduint256undefined

Returns​

NameTypeDescription
_validAuctionsIEnglishAuctions.Auction[]undefined

getAuction​

function getAuction(uint256 _auctionId) external view returns (struct IEnglishAuctions.Auction _auction)

Returns the auction of the provided auction ID.

Parameters​

NameTypeDescription
_auctionIduint256undefined

Returns​

NameTypeDescription
_auctionIEnglishAuctions.Auctionundefined

getWinningBid​

function getWinningBid(uint256 _auctionId) external view returns (address _bidder, address _currency, uint256 _bidAmount)

Returns the winning bid of an active auction.

Parameters​

NameTypeDescription
_auctionIduint256undefined

Returns​

NameTypeDescription
_bidderaddressundefined
_currencyaddressundefined
_bidAmountuint256undefined

isAuctionExpired​

function isAuctionExpired(uint256 _auctionId) external view returns (bool)

Returns whether an auction is active.

Parameters​

NameTypeDescription
_auctionIduint256undefined

Returns​

NameTypeDescription
_0boolundefined

isNewWinningBid​

function isNewWinningBid(uint256 _auctionId, uint256 _bidAmount) external view returns (bool)

Returns whether a given bid amount would make for a winning bid in an auction.

Parameters​

NameTypeDescription
_auctionIduint256The ID of an auction.
_bidAmountuint256The bid amount to check.

Returns​

NameTypeDescription
_0boolundefined

totalAuctions​

function totalAuctions() external view returns (uint256)

Returns​

NameTypeDescription
_0uint256undefined

Events​

AuctionClosed​

event AuctionClosed(uint256 indexed auctionId, address indexed assetContract, address indexed closer, uint256 tokenId, address auctionCreator, address winningBidder)

Parameters​

NameTypeDescription
auctionId indexeduint256undefined
assetContract indexedaddressundefined
closer indexedaddressundefined
tokenIduint256undefined
auctionCreatoraddressundefined
winningBidderaddressundefined

CancelledAuction​

event CancelledAuction(address indexed auctionCreator, uint256 indexed auctionId)

Emitted when a auction is cancelled.

Parameters​

NameTypeDescription
auctionCreator indexedaddressundefined
auctionId indexeduint256undefined

NewAuction​

event NewAuction(address indexed auctionCreator, uint256 indexed auctionId, address indexed assetContract, IEnglishAuctions.Auction auction)

Parameters​

NameTypeDescription
auctionCreator indexedaddressundefined
auctionId indexeduint256undefined
assetContract indexedaddressundefined
auctionIEnglishAuctions.Auctionundefined

NewBid​

event NewBid(uint256 indexed auctionId, address indexed bidder, address indexed assetContract, uint256 bidAmount, IEnglishAuctions.Auction auction)

Parameters​

NameTypeDescription
auctionId indexeduint256undefined
bidder indexedaddressundefined
assetContract indexedaddressundefined
bidAmountuint256undefined
auctionIEnglishAuctions.Auctionundefined