Skip to content

Instantly share code, notes, and snippets.

@sontuphan
Created February 23, 2018 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sontuphan/8ae71dbd048df4fe0911bf31f597e02f to your computer and use it in GitHub Desktop.
Save sontuphan/8ae71dbd048df4fe0911bf31f597e02f to your computer and use it in GitHub Desktop.
var path = require('path');
var levelup = require('levelup');
var leveldown = require('leveldown');
/**
* Level DB
*/
var levelDBPath = path.relative('./', '/Users/User/Library/Ethereum/ropsten/geth/chaindata');
var db = levelup(leveldown(levelDBPath));
/**
* Global variable
*/
global.db = db;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment