erc20-asset-generator icon indicating copy to clipboard operation
erc20-asset-generator copied to clipboard

Input real supply number

Open appgara opened this issue 4 years ago • 1 comments

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)

appgara avatar Jun 23 '21 05:06 appgara

I think there's a workaround. Ref: https://stackoverflow.com/questions/62301960/unable-to-call-contract-function-from-web3-with-big-number-as-parameter

0xSumitBanik avatar Nov 19 '21 05:11 0xSumitBanik