Hi Folks,
Anyone can help me To write mintable smart contract without initial supply and it should take any token value like if we give 10 input then on;y 10 token can mint ,How to write this smart contract?
Hi, welcome!
Do you mean you want a Capped token?
Hi Skyge,
I need ti implement this functionality in my Dapp using below contarct Mintable Tokens generation / crowdsale- mint single token/ perform crowdsale
pragma solidity ^0.6.2;
import “https://github.com/OpenZeppelin/openzeppelin-contracts/blob/v3.1.0/contracts/token/ERC20/ERC20.sol”;
contract Token is ERC20 {
constructor () public ERC20("Token", "TKN") {
_mint(msg.sender, 1000000 * (10 ** uint256(decimals())));
}
}
So you mean you can mint only once?
Hi @Heena,
Have a look at Contracts Wizard: https://zpl.in/wizard
yes and need to mint tokens such way we should not fix the value of that token its should be change every time like that we have to write this mint function