Skip to content

Instantly share code, notes, and snippets.

@ramvi
Last active August 28, 2017 12:50
Show Gist options
  • Save ramvi/b2ea3fb9881eebd6dab435d3d41c5262 to your computer and use it in GitHub Desktop.
Save ramvi/b2ea3fb9881eebd6dab435d3d41c5262 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.16;
contract My1stToken {
// TODO storage for total amount of tokens
// TODO storage for the how many tokens all the different accounts have / balances
// TODO storage for name of coin
// TODO storage for how many decimals to show. ie. There could 1000 base units with 3 decimals. Meaning 0.980 SBX = 980 base units. It's like comparing 1 wei to 1 ether.
// TODO storage for the symbol: An identifier eg SBX
// TODO constructor
function My1stToken(
uint256 _initialAmount,
string _tokenName,
uint8 _decimalUnits,
string _tokenSymbol
) {
}
/// @param _owner The address from which the balance will be retrieved
/// @return The balance
function balanceOf(address _owner) constant returns (uint balance) {
// TODO
}
/// @notice send `_value` token to `_to` from `msg.sender`
/// @param _to The address of the recipient
/// @param _value The amount of token to be transferred
/// @return Whether the transfer was successful or not
function transfer(address _to, uint _value) returns (bool success) {
// TODO Transfer
// TODO Event
}
event Transfer(address indexed _from, address indexed _to, uint _value);
event Approval(address indexed _owner, address indexed _spender, uint _value);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment