- Notifications
You must be signed in to change notification settings - Fork4
True Dutch Auction solidity smart contract
License
NotificationsYou must be signed in to change notification settings
AlmostFancy/true-dutch
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Forge:
forge install almostfancy/true-dutch
Hardhat or Truffle:
npm install -D @almost-fancy/true-dutch
To get started, you can use the library as follows:
pragma solidity^0.8.4;import { TrueDutchAuction }from"@almost-fancy/true-dutch/src/TrueDutchAuction.sol";contractAlmostFancyisTrueDutchAuction,ERC721A {constructor(address payable_beneficiary)ERC721A("AlmostFancy","AF")TrueDutchAuction(DutchAuctionConfig({ saleStartTime: dutchSaleTime, startPriceWei:0.99 ether, endPriceWei:0.09 ether, duration:9 hours, dropInterval:15 minutes, maxBidsPerAddress:0, available:1111, maxPerTx:3 }), _beneficiary ) {}function placeBid(uint256quantity)externalpayable {_placeAuctionBid(msg.sender, quantity); }function _handleBidPlaced(addresswhom,uint256quantity,uint256priceToPay )internaloverride {uint256 cost= priceToPay* quantity;_safeMint(whom, quantity);// call ERC721A#_safeMint to actually get the asset to the caller }}
Distributed under the ISC License. SeeLICENSE.txt
for more information.
About
True Dutch Auction solidity smart contract