-
Notifications
You must be signed in to change notification settings - Fork 47
/
AbstractToken.sol
22 lines (18 loc) · 1.23 KB
/
AbstractToken.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
/// Implements ERC 20 Token standard: https://github.com/ethereum/EIPs/issues/20
/// @title Abstract token contract - Functions to be implemented by token contracts.
contract Token {
function transfer(address to, uint256 value) returns (bool success);
function transferFrom(address from, address to, uint256 value) returns (bool success);
function approve(address spender, uint256 value) returns (bool success);
// This is not an abstract function, because solc won't recognize generated getter functions for public variables as functions.
function totalSupply() constant returns (uint256 supply) {}
function balanceOf(address owner) constant returns (uint256 balance);
function allowance(address owner, address spender) constant returns (uint256 remaining);
// Token meta data
// Those are not abstract functions, because solc won't recognize generated getter functions for public variables as functions.
function name() constant returns (string) {}
function symbol() constant returns (string) {}
function decimals() constant returns (uint8) {}
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}