contract ERC20 {

    // Events
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval( address indexed owner, address indexed spender, uint256 value);

    // Stateless functions
    function totalSupply() constant public returns (uint256 supply);
    function balanceOf( address who ) constant public returns (uint256 value);
    function allowance(address owner, address spender) constant public returns (uint value);

    // Stateful functions
    function transfer( address to, uint256 value) public returns (bool success);
    function transferFrom( address from, address to, uint256 value) public returns (bool success);
    function approve(address spender, uint256 value) public returns (bool success);

}
function totalSupply() constant public returns (uint256 supply);

// Stateless functions