This file contains hidden or 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
| import axios from "axios"; | |
| // Adding your token as URL parameter | |
| const TOKEN = "token=YOUR_TOKEN_HERE"; | |
| const URL_PREFIX = "https://api.blockcypher.com/v1/btc/test3"; | |
| // Chain Endpoint: 현재 블록체인 상태 반환 | |
| // current block height를 얻기 위해 필요 | |
| // https://www.blockcypher.com/dev/#chain-endpoint | |
| function getBlockchainInfo() { |
This file contains hidden or 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
| import { default as Web3 } from 'web3'; | |
| const URL = "http://127.0.0.1:7545"; | |
| // TODO | |
| const CONTRACT_ADDRESS = ""; | |
| // TODO | |
| const MY_ACCOUNT = ""; | |
| const web3 = new Web3(URL); |
This file contains hidden or 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
| <template> | |
| <div class="box"> | |
| <div class="field is-grouped"> | |
| <h1 class="subtitle">Simple Storage </h1> | |
| </div> | |
| <div class="field is-grouped"> | |
| <p class="control"> | |
| <a class="button is-info" @click="setter"> | |
| setMessage | |
| </a> |
This file contains hidden or 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.5.0; | |
| import "./SafeMath.sol"; | |
| interface IERC20 { | |
| function totalSupply() external view returns (uint256); | |
| function balanceOf(address account) external view returns (uint256); | |
| function transfer(address recipient, uint256 amount) external returns (bool); | |
| function allowance(address owner, address spender) external view returns (uint256); |
This file contains hidden or 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.24; | |
| /** | |
| * @title SafeMath | |
| * @dev Unsigned math operations with safety checks that revert on error | |
| */ | |
| library SafeMath { | |
| /** | |
| * @dev Multiplies two unsigned integers, reverts on overflow. | |
| */ |
This file contains hidden or 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.24; | |
| contract Escrow{ | |
| uint public value; | |
| address public seller; | |
| address public buyer; | |
| string public message; | |
| enum State {Init, Created, Locked, Sent, Complete} | |
| State public state; | |