Skip to content

contract.DynamicPricePresaleListExtension

Aleksey Bykhun edited this page Jan 18, 2023 · 1 revision

DynamicPricePresaleListExtension

Git Source

Inherits: NFTExtension, Ownable, SaleControl, LimitedSupply

State Variables

pricePerOne

uint256 public pricePerOne;

maxPerAddress

uint256 public maxPerAddress;

whitelistRoot

bytes32 public whitelistRoot;

claimedByAddress

mapping(address => uint256) public claimedByAddress;

Functions

constructor

constructor(
    address _nft,
    bytes32 _whitelistRoot,
    uint256 _pricePerOne,
    uint256 _maxPerAddress,
    uint256 _extensionSupply
) NFTExtension(_nft) SaleControl LimitedSupply(_extensionSupply);

price

function price(uint256 nTokens) public view returns (uint256);

updatePrice

function updatePrice(uint256 _price) public onlyOwner;

updateMaxPerAddress

function updateMaxPerAddress(uint256 _maxPerAddress) public onlyOwner;

updateWhitelistRoot

function updateWhitelistRoot(bytes32 _whitelistRoot) public onlyOwner;

mint

function mint(uint256 nTokens, bytes32[] memory proof)
    external
    payable
    whenSaleStarted
    whenLimitedSupplyNotReached(nTokens);

isWhitelisted

function isWhitelisted(bytes32 root, address receiver, bytes32[] memory proof) public pure returns (bool);
Clone this wiki locally