Skip to main content

FixedPriceAuction

FixedPriceAuction

version

string version

ERC165TAG

bytes4 ERC165TAG

Start

event Start(uint256 startTime)

Buy

event Buy(address buyer, uint256 buyPrice)

Claim

event Claim(address seller, address contractAddr, uint256 tokenId)

asset

struct AuctionLib.Asset asset

acceptableToken

address acceptableToken

seller

address payable seller

saleFeeAddress

address payable saleFeeAddress

auctionDuration

uint256 auctionDuration

price

uint256 price

startTime

uint256 startTime

saleFee

uint256 saleFee

isBought

bool isBought

constructor

constructor() public

initialize

function initialize(address payable _seller, struct AuctionLib.Asset _asset, address ERC20contractAddress, uint256 _price, uint256 _auctionDuration, uint256 _saleFee, address payable _saleFeeAddress, address _forwarder) external

Create auction instance

NameTypeDescription
_selleraddress payableaddress of seller for auction
_assetstruct AuctionLib.Assetstruct containing information of the asset to be listed
ERC20contractAddressaddressaddress of ERC20 token accepted as payment
_priceuint256price to start the auction
_auctionDurationuint256how long the auction should last
_saleFeeuint256the percentage of the sale to be sent to the marketplace as commission
_saleFeeAddressaddress payablethe address to which the sale fee is sent
_forwarderaddressaddress for the trusted forwarder for open GSN integration

proxyInitialize

function proxyInitialize(address payable _seller, struct AuctionLib.Asset _asset, address ERC20contractAddress, uint256 _price, uint256 _auctionDuration, uint256 _saleFee, address payable _saleFeeAddress, address _forwarder) external

__FixedPriceAuction_init

function __FixedPriceAuction_init(address payable _seller, struct AuctionLib.Asset _asset, address ERC20contractAddress, uint256 _price, uint256 _auctionDuration, uint256 _saleFee, address payable _saleFeeAddress, address _forwarder) internal

__FixedPriceAuction_init_unchained

function __FixedPriceAuction_init_unchained(address payable _seller, struct AuctionLib.Asset _asset, address ERC20contractAddress, uint256 _price, uint256 _auctionDuration, uint256 _saleFee, address payable _saleFeeAddress) internal

buy

function buy() external

function that allows a buyer to buy the asset at the fixed price

claim

function claim() external

must be the owner to call this function

allows the owner to reclaim their asset if no one buys

supportsInterface

function supportsInterface(bytes4 interfaceId) public view virtual returns (bool)

ERC165 Support

NameTypeDescription
interfaceIdbytes4hash of the interface testing for
NameTypeDescription
[0]boolbool whether interface is supported