erc20-asset-generator
erc20-asset-generator copied to clipboard
Input real supply number
My idea is to help user has a better experience using the generator by changing the Supply input to real supply number. So I replace lines from 637 to 642 in /scripts/app.js with this:
e.preventDefault();
var tokenName = $('#name').val();
var tokenSymbol = $('#symbol').val();
var decimalUnits = $('#decimals').val();
var realSupply = $('#total-supply').val();
var initialSupply = realSupply * Math.pow(10, decimalUnits);
But it doesn't work, please help. This is the error in console logs:
Uncaught Error: overflow (fault="overflow", operation="BigNumber.from", value=1000000000000000000, code=NUMERIC_FAULT, version=bignumber/5.0.13)
I think there's a workaround. Ref: https://stackoverflow.com/questions/62301960/unable-to-call-contract-function-from-web3-with-big-number-as-parameter