Last active
August 17, 2017 17:52
-
-
Save aunyks/fc9565dd99264b336564a299d259ddde to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
contract MyERCToken { | |
// In this case, the total supply | |
// of MyERCToken is fixed, but | |
// it can very much be changed | |
uint256 _totalSupply = 1000000; | |
function totalSupply() constant returns (uint256 theTotalSupply) { | |
// Because our function signature | |
// states that the returning variable | |
// is "theTotalSupply", we'll just set that variable | |
// to the value of the instance variable "_totalSupply" | |
// and return it | |
theTotalSupply = _totalSupply; | |
return theTotalSupply; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment