How to create a capped BEP20 token

You can try using a “require” statement inside mint function where you check if the total supply is under 10.000.000

    require(totSupply < 10000000, 'Maximum supply Reached');
   mintFunction(..);
1 Like