1.0.8 • Published 3 years ago

@almost-fancy/true-dutch v1.0.8

Weekly downloads
-
License
ISC
Repository
github
Last release
3 years ago

License: ISC NPM

Installation

npm install -D @almost-fancy/true-dutch

Usage

To get started, you can use the library as follows:

pragma solidity ^0.8.4;

import "@almost-fancy/true-dutch/contracts/TrueDutchAuction.sol";

contract AlmostFancy is TrueDutchAuction, 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(uint256 quantity) external payable {
    _placeAuctionBid(msg.sender, quantity);
  }

  function _handleBidPlaced(
    address whom,
    uint256 quantity,
    uint256 priceToPay
  ) internal override {
    uint256 cost = priceToPay * quantity;
    _safeMint(whom, quantity); // call ERC721A#_safeMint to actually get the asset to the caller
  }
}

License

Distributed under the ISC License. See LICENSE.txt for more information.

Contact Us

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago