Token supply

One of the considerations mentioned in the Token sale contracts section was the total number of tokens to offer in the crowd sale. Often a portion of the total number of tokens is kept by the project, perhaps to be sold in the future as a way to supplement funding. In our implementation, we will be selling 50% of the total tokens we create when we deploy our ERC-20 token contract. Whenever we need to query the balance associated with our token sale contract, we will call our ERC-20 contract directly:

tokenContract.balanceOf(this);

This will give us the remaining balance associated with our token sale, but for convenience, we will keep track of the number of tokens sold with a separate public variable:

uint256 public tokensSold;
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset