mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-25 22:04:06 -06:00
70 lines
2.7 KiB
TypeScript
70 lines
2.7 KiB
TypeScript
import { BigNumberish } from "ethers";
|
|
import { PublicMintCondition } from "../types/claim-conditions/PublicMintCondition";
|
|
import { SnapshotInfo } from "../types/snapshots/SnapshotInfo";
|
|
export default class ClaimConditionPhase {
|
|
private _conditionStartTime;
|
|
private _currencyAddress;
|
|
private _price;
|
|
private _maxQuantity;
|
|
private _quantityLimitPerTransaction;
|
|
private _merkleRootHash;
|
|
private _merkleCondition?;
|
|
private _snapshot?;
|
|
private createSnapshot;
|
|
private _waitInSeconds;
|
|
constructor(createSnapshotFunc: (leafs: string[]) => Promise<SnapshotInfo>);
|
|
/**
|
|
* Set the price claim condition for the drop.
|
|
*
|
|
* @param price - The price of the currency in wei. Must be >= 0.
|
|
* @param tokenAddress - The address of an ERC20 contract to use as the currency for the claim. By default this is the native currency address which is 0x0000000000000000000000000000000000000000 address.
|
|
*/
|
|
setPrice(price: BigNumberish, tokenAddress?: string): ClaimConditionPhase;
|
|
/**
|
|
* Set the start time for the claim condition.
|
|
*
|
|
* @param startTime - The start time for the claim condition. Can be a Date object or a number of seconds since the epoch.
|
|
*/
|
|
setConditionStartTime(when: Date | number): ClaimConditionPhase;
|
|
/**
|
|
* Override the maxQuantity for the claim condition after creating the phase.
|
|
*
|
|
* @param maxQuantity - The max quantity NFTs that can be claimed in this phase.
|
|
*/
|
|
setMaxQuantity(maxQuantity: BigNumberish): ClaimConditionPhase;
|
|
/**
|
|
* The max quantity of NFTs that can be claimed in a single transaction.
|
|
*
|
|
* @param max - The max quantity NFTs that can be claimed in a single transaction.
|
|
*/
|
|
setMaxQuantityPerTransaction(max: BigNumberish): ClaimConditionPhase;
|
|
/**
|
|
* Sets a merkle root hash for the claim condition.
|
|
*
|
|
* @param root - The merkle root hash
|
|
*/
|
|
setMerkleRoot(root: string): ClaimConditionPhase;
|
|
/**
|
|
* Sets a snapshot for the claim condition. You can use a snapshot
|
|
* to verify a merkle tree condition.
|
|
*
|
|
* @param root - The merkle root hash
|
|
*/
|
|
setSnapshot(addresses: string[]): ClaimConditionPhase;
|
|
/**
|
|
* @internal
|
|
*/
|
|
getSnapshot(): SnapshotInfo | undefined;
|
|
/**
|
|
* Helper method that provides defaults for each claim condition.
|
|
* @internal
|
|
*/
|
|
buildPublicClaimCondition(): Promise<PublicMintCondition>;
|
|
/**
|
|
* Wait time enforced after calling `claim` before the next `claim` can be called.
|
|
*
|
|
* @param waitInSeconds - The wait time in seconds.
|
|
*/
|
|
setWaitTimeBetweenClaims(waitInSeconds: BigNumberish): ClaimConditionPhase;
|
|
}
|