|
1 |
| -// # https://remix.ethereum.org/#version=soljson-v0.5.24+commit.e67f0147.js&optimize=true&gist=7f2a15679aee59fba912aa929f70df1d |
| 1 | +// # https://remix.ethereum.org/#version=soljson-v0.5.24+commit.e67f0147.js&optimize=true&gist=6ba2843f228efec36624338245bd09dd |
2 | 2 | //
|
3 | 3 | pragma solidity ^0.5.24;
|
4 | 4 |
|
5 |
| -contract ERC223 { |
6 |
| - uint public totalSupply; |
7 |
| - function balanceOf(address who) public view returns (uint); |
8 |
| - |
9 |
| - function name() public view returns (string _name); |
10 |
| - function symbol() public view returns (string _symbol); |
11 |
| - function decimals() public view returns (uint8 _decimals); |
12 |
| - function totalSupply() public view returns (uint256 _supply); |
13 |
| - |
14 |
| - function transfer(address to, uint value) public returns (bool ok); |
15 |
| - function transfer(address to, uint value, bytes data) public returns (bool ok); |
16 |
| - function transfer(address to, uint value, bytes data, string custom_fallback) public returns (bool ok); |
17 |
| - |
18 |
| - event Transfer(address indexed from, address indexed to, uint value, bytes indexed data); |
19 |
| - |
20 |
| -} |
21 |
| - |
22 |
| - |
23 |
| -library SafeMath { |
24 |
| - |
25 |
| - function add(uint256 a, uint256 b) internal pure returns (uint256) { |
26 |
| - uint256 c = a + b; |
27 |
| - require(c >= a, "SafeMath: addition overflow"); |
28 |
| - |
29 |
| - return c; |
30 |
| - } |
31 |
| - |
32 |
| - function sub(uint256 a, uint256 b) internal pure returns (uint256) { |
33 |
| - require(b <= a, "SafeMath: subtraction overflow"); |
34 |
| - uint256 c = a - b; |
35 |
| - |
36 |
| - return c; |
37 |
| - } |
38 |
| - |
39 |
| - function mul(uint256 a, uint256 b) internal pure returns (uint256) { |
40 |
| - // Gas optimization: this is cheaper than requiring 'a' not being zero, but the |
41 |
| - // benefit is lost if 'b' is also tested. |
42 |
| - // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522 |
43 |
| - if (a == 0) { |
44 |
| - return 0; |
45 |
| - } |
46 |
| - |
47 |
| - uint256 c = a * b; |
48 |
| - require(c / a == b, "SafeMath: multiplication overflow"); |
49 |
| - |
50 |
| - return c; |
51 |
| - } |
52 |
| - |
53 |
| - function div(uint256 a, uint256 b) internal pure returns (uint256) { |
54 |
| - // Solidity only automatically asserts when dividing by 0 |
55 |
| - require(b > 0, "SafeMath: division by zero"); |
56 |
| - uint256 c = a / b; |
57 |
| - // assert(a == b * c + a % b); // There is no case in which this doesn't hold |
58 |
| - |
59 |
| - return c; |
60 |
| - } |
61 |
| - |
62 |
| - function mod(uint256 a, uint256 b) internal pure returns (uint256) { |
63 |
| - require(b != 0, "SafeMath: modulo by zero"); |
64 |
| - return a % b; |
65 |
| - } |
66 |
| -} |
67 |
| - |
68 | 5 | // change contract name to your contract's name
|
69 | 6 | // i.e. "contract AMIS is ERC223Token"
|
70 | 7 | contract Amis is ERC223Token {
|
|
0 commit comments