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
{ | |
do: 0, | |
dog: 1, | |
dax: 2, | |
dogu: 3, | |
dodo: 4, | |
house: 5, | |
houses: 6 | |
} |
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
{ | |
'cab8': 'dog', | |
'cabe': 'cat', | |
'39': 'chicken', | |
'395': 'duck', | |
'56f0': 'horse' | |
} |
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) { |
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 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)); |
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 merklePatriciaTree = require('merkle-patricia-tree'); | |
var rlp = require('rlp'); | |
var db = global.db; | |
var Trie = function () {} | |
Trie.getInfoByAddress = function (root, address) { | |
var root = new Buffer(root, 'hex'); | |
var address = new Buffer(address, 'hex'); | |
var trie = new merklePatriciaTree(db, root); |
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 db = global.db; | |
var ethBlock = require('ethereumjs-block'); | |
var rlp = require('rlp'); | |
var utils = require('./libs/utils'); | |
var geth = require('./libs/geth'); | |
var trie = require('./libs/trie'); | |
OlderNewer