Skip to content

Instantly share code, notes, and snippets.

3 cups required

Gaëtan Renaudeau gre

3 cups required
View GitHub Profile
cd $(dirname $0)
./ sync_Vertcoin Vertcoin
./ sync_Dash Dash
./ sync_Stakenet Stakenet
./ sync_Viacoin Viacoin
./ sync_PivX PivX
./ sync_Komodo Komodo
gre / package.json
Last active Dec 13, 2019
live-common in a nutshell
View package.json
"private": true,
"name": "send-example",
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"dependencies": {
"@ledgerhq/hw-transport-node-hid-noevents": "canary",
"@ledgerhq/ledger-core": "alpha",
"@ledgerhq/live-common": "alpha",
View tokens_per_holder_count.js
const request = require("request");
const { listTokens } = require("@ledgerhq/live-common/lib/currencies");
const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
const fetch = url =>
new Promise((resolve, reject) =>
request(url, (error, response, body) => {
View hooks.js
* I want to trigger something 5s after mount with some props
const Thing = ({ a, b }) => {
useEffect(() => {
const timeout = setTimeout(() => {
doTheThing(a, b);
}, 5000);
View consume_suspense_read.js
async function suspenseReadToPromise(read, ...args) {
let value;
try {
value = read(...args);
} catch (e) {
if (e && typeof e.then === "function") {
value = await e;
else {

Keybase proof

I hereby claim:

  • I am gre on github.
  • I am greweb ( on keybase.
  • I have a public key whose fingerprint is 70D1 29E9 37F5 DB8B BC04 6E46 92B0 2128 CF8C 915B

To claim this, I am signing this object:

View Finish.js
class Finish extends r.Component {
constructor(...e) {
var t
return (
(t = super(...e)),
Object.defineProperty(this, 'state', {
configurable: !0,
enumerable: !0,
writable: !0,
value: { emit: !1 },
gre /
Last active Jul 14, 2020
Quick Guide for Ethereum Ledger Integration

How to integrate the Ledger device with a Ethereum Web Application

This is a quick guide to show how to integrate Ledger Ethereum libraries into an existing web application.

If you are starting a new DApp project from scratch, or simply are beginning in this Ethereum Smart Contract world, we have made create-dapp Starter Kit for you, it comes with a out-of-the-box support of Ledger and MetaMask and shows a complete smart contract example (that allows to get/set a value globally).

Whether you want to integrate on an existing app or bootstrap it from scratch with our starter kit, the follow guide will drive you to important part on how things work with the Ledger.

Prerequisites of the guide

View recordHistory_gcal_cryptofinance.js
function recordHistory() {
var ss = SpreadsheetApp.getActiveSpreadsheet();
// Toggle a cell that is used in one of a CRYPTOFINANCE formula to force-trigger a refresh
var r = ss.getSheetByName("folio").getRange("A30");
var unit = r.getValues()[0][0];
// accumulate history
var sheet = ss.getSheetByName("History");
View main.js
import React, { Component } from "react";
class Counter extends Component {
state = { count: 1 };
onClick = () => this.setState(({ count }) => ({ count: count + 1 }));
render() {
return (
<button onClick={this.onClick}>
You can’t perform that action at this time.