Skip to main content

ERC20BatchMintable

import "@thirdweb-dev/eip/interface/IERC20.sol"
import "@thirdweb-dev/contracts/extension/multicall.sol";
import "@thirdweb-dev/contracts/extension/interface/IMintableERC20.sol";

Enable minting multiple NFTs at once in a single transaction by Implementing ERC20, IMintableERC20, and Multicall extensions.

This is an extension which is detectable in the dashboard if the smart contract implements the ERC20, Multicall and ERC20Mintable extensions.

Usage

This is an example smart contract that will have ERC20BatchMintable detected on it in the dashboard. It also shows the function that is overridable to add custom logic.

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@thirdweb-dev/contracts/openzeppelin-presets/token/ERC20/ERC20.sol";
import "@thirdweb-dev/contracts/extension/interface/IMintableERC20.sol";
import "@thirdweb-dev/contracts/extension/Multicall.sol";

contract Contract is ERC20, IMintableERC20, Multicall {
constructor(
string memory _name,
string memory _symbol
)
ERC20(
_name,
_symbol
)
{}

function mintTo(address to, uint256 amount) external override returns (uint256) {
// Your custom implementation here
}

}

SDK Usage

By adding this extension to a smart contract, the following features, hooks and functions are unlocked in the SDK:

Base Contracts Implementing This Extension