ERC1155 NFT collection Sale in an Auction
The smart contract template to help you sell ERC1155 tokens in the form of an auction. In a video game, you can sell a piece of equipment to the player placing the highest bid.
Notice you can start a new auction by simply calling the startNewAuction function without having to deploy a new contract.
|The token address of the ERC721 that you want to sell.
|The address that will receive the amount paid for the NFTs.
|The initial price offered for the NFT.
|The minimum price increase to place a bid on top of the current auction winner.
|The time at which the sale will begin and users can bid. Timestamp in seconds.
|The time when the sale will end and users couldn't bid anymore. Timestamp in seconds.
|The token id of the token that will be minted for the auction.
|The amount of tokens that will be minted for the auction.
|Returns the NFT contract where the new tokens will be minted at.
|Returns the current price of the auction.
|Returns the minimum difference between the currentPrice and the bided amount that there should be.
|Returns the current winner of the auction. Notice that if it’s equal to 0 then there isn’t any winner yet.
|Returns the start time of the sale.
|Returns the end time of the sale.
|Returns the id that the token being auctioned will have.
|Returns the amount of tokens being auctioned.
|Bid for the auction and set the price of the bid by the amount you send to the contract.
|Mint a new token with the tokenURI to the winner of the auction.
|(uint256 newStartingPrice, uint256 newMinPriceDifference, uint256 newStartTime, uint256 newEndTime, uint256 newTokenId, uint256 newTokenAmount)
|Start a whole new auction with new parameters you can define. Notice that no current auction can be ongoing and the caller must be the owner of the smart contract.
|Withdraw the price paid for the mints.
|Returns the owner of the smart contract.
|Renounce the ownership of the smart contract.
|Transfer the ownership of the contract to a specified address.