Class Erc20BatchMintable

Mint Many ERC20 Tokens at once

Remarks

Token batch minting functionality that handles unit parsing for you.

Example

const contract = await sdk.getContract("{{contract_address}}");
await contract.token.mint.batch.to(walletAddress, [nftMetadata1, nftMetadata2, ...]);

Hierarchy

  • Erc20BatchMintable

Implements

  • DetectableFeature

Constructors

Properties

contractWrapper: ContractWrapper<IMintableERC20 & IMulticall>
erc20: Erc20<BaseERC20 | BaseSignatureMintERC20>
featureName: "ERC20BatchMintable" = FEATURE_TOKEN_BATCH_MINTABLE.name
to: {
    prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>);
    (...args): Promise<TResult>;
} = ...

Type declaration

    • (...args): Promise<TResult>
    • Mint Tokens To Many Wallets

      Parameters

      • Rest ...args: [args: {
            amount: string | number;
            toAddress: string;
        }[]]

      Returns Promise<TResult>

      Remarks

      Mint tokens to many wallets in one transaction.

      Example

      // Data of the tokens you want to mint
      const data = [
      {
      toAddress: "{{wallet_address}}", // Address to mint tokens to
      amount: 0.2, // How many tokens to mint to specified address
      },
      {
      toAddress: "0x...",
      amount: 1.4,
      }
      ]

      await contract.token.mint.batch(data);
  • prepare: ((...args) => Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>)
      • (...args): Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>
      • Parameters

        • Rest ...args: [args: {
              amount: string | number;
              toAddress: string;
          }[]]

        Returns Promise<Transaction<Omit<TransactionResultWithMetadata<unknown>, "data">>>

Generated using TypeDoc