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
pragma solidity ^0.4.10; | |
import "github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/Token.sol" as Token; | |
import "github.com/ConsenSys/Tokens/blob/master/Token_Contracts/contracts/StandardToken.sol" as StandardToken; | |
contract MyERC20 is StandardToken { | |
// metadata | |
string public constant name = "MyERC20Token"; | |
string public constant symbol = "ERC"; | |
uint public constant decimals = 18; |
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
pragma solidity ^0.4.10; | |
contract Token { | |
/// @return total amount of tokens | |
function totalSupply() constant returns (uint256 supply) {} | |
/// @param _owner The address from which the balance will be retrieved | |
/// @return The balance | |
function balanceOf(address _owner) constant returns (uint256 balance) {} |
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
pragma solidity ^0.4.1; | |
import "Token.sol"; | |
contract p2pExchange { | |
// NOTES: | |
// Attribute volume to different Dapps using msg.sender vs tx.origin, allowing custom fee structures (think augur/gnosis integration) | |
// Partial fills: divisibility of valueA & valueB | |
// Token registry (symbol, name, address, decimals) | |
// Separate storage from logic |