- Dockerをインストールする。
- ここでは、下記のディレクトリを作成しておく。※構成は自由だが、変える場合は以下の手順を適宜書き換える必要がある。
.
├── build
│ └── hello
├── config ※nodeosのconfigが格納される
| pragma solidity ^0.4.17; | |
| /** | |
| * @title SafeMath | |
| * @dev Math operations with safety checks that throw on error | |
| */ | |
| library SafeMath { | |
| function mul(uint256 a, uint256 b) internal pure returns (uint256) { | |
| if (a == 0) { | |
| return 0; |
| pragma solidity ^0.4.8; | |
| contract ECVerify { | |
| event VerifyResult(bool ret, address indexed addr, address indexed recoverAddress); | |
| function verify(bytes32 hash, uint8 v, bytes32 r, bytes32 s, address signer) returns(bool) { | |
| bytes memory prefix = "\x19Ethereum Signed Message:\n32"; | |
| bytes32 prefixedHash = sha3(prefix, hash); |
| pragma solidity ^0.4.24; | |
| contract SimpleToken { | |
| // (1) 状態変数の宣言 | |
| string public name; // トークンの名前 | |
| string public symbol; // トークンの単位 | |
| uint256 public totalSupply; // トークンの総量 | |
| mapping (address => uint256) public balanceOf; // 各アドレスの残高 |
| pragma solidity ^0.4.24; | |
| contract HelloWorld { | |
| string public greeting; | |
| constructor(string _greeting) public { | |
| greeting = _greeting; | |
| } |
| 0x9a58141b42eebc98446d2567f5edfa38cfee6778 |