Skip to content

Instantly share code, notes, and snippets.

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() {
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);
<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>
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);
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.
*/
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;