Last active
February 23, 2018 08:33
-
-
Save sontuphan/0a93559f77b74f7ddbe0248609691f87 to your computer and use it in GitHub Desktop.
This file contains 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
var Web3 = require('web3'); | |
var web3 = new Web3(new Web3.providers.HttpProvider("http://localhost:8545")); | |
console.log("\n==========================================="); | |
console.log("========== Geth connected:", web3.isConnected(), "==========="); | |
console.log("===========================================\n"); | |
var Geth = function () {} | |
Geth.getStateRoot = function (blockNumber) { | |
return console.log('stateRoot:', web3.eth.getBlock(blockNumber).stateRoot); | |
} | |
module.exports = Geth |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment