Skip to content

Instantly share code, notes, and snippets.

@vincentserpoul
vincentserpoul / ethjsex
Created November 28, 2017 02:25
ethjs example
import Eth from "ethjs";
const testrpcPort = process.env.SOLIDITY_COVERAGE ? "8555" : "8550";
const eth = new Eth(new Eth.HttpProvider("http://localhost:" + testrpcPort));
const getTxConfirmation = async (txHash, pollTime, NumConfBlocksNeeded) => {
let currReceipt;
let expConfirmationBlock;
while (true) {
currReceipt = await eth.getTransactionReceipt(txHash);
0x0e67ab4d6B455539D02add5dfC749c591e476298
@vincentserpoul
vincentserpoul / gist:25b728b6b3d4be6548a2fb1b7e5dca3d
Created September 1, 2017 03:59
log in with ethereum/metamask
import React from "react";
import Web3 from "web3";
import ethUtil from "ethereumjs-util";
import "./index.css";
const Login = () => {
return (
<div id="login" onClick={handleClick}>
LOGIN
@vincentserpoul
vincentserpoul / main.go
Created August 24, 2017 16:08
check ethereum signature
package main
import (
"encoding/hex"
"fmt"
"log"
"strconv"
"github.com/ethereum/go-ethereum/crypto"
)