I am creating a token contract with solidity. I am using this link: https://theethereum.wiki/w/index.php/ERC20_Token_Standard

Here is the snapshot of code:

contract FixedSupplyToken {
      string public  symbol = "FIXED";
      string public  name = "Example Fixed Supply Token";
      uint8 public   decimals = 18;
      uint256 _totalSupply = XXX; // I want to set this to unlimited

I want _totalSupply to be unlimited. If this is not possible, is there any way to increase the value of _totalSupply.


The totalSupply will be pretty much limited to the uint256 type: (2^256)-1

What you could do however, is to set the _totalSupply = 0 (or maximum value) and erase all the checks on totalSupply and simply assign balances to the the balances[address] as you wish to.

I'm not aware of any check against totalSupply that's somehow required.

| improve this answer | |
  • Another solution might be to create a contract that generates contracts that hold balanaces upto the uint256 limit and acts as an interface to them - that's however a general scaling problem – j j Sep 7 '17 at 14:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.