examples/run-transactions-complete/index.js
function readStorage (cb) {
  // we need to create a copy of the state root
  var storageTrie = stateTrie.copy()

  // Since we are using a copy we won't change the
  // root of `stateTrie`
  storageTrie.root = storageRoot

  var stream = storageTrie.createReadStream()

  console.log('------Storage------')

  // prints all of the keys and values in the storage trie
  stream.on('data', function (data) {
    // remove the 'hex' if you want to see the ascii values
    console.log('key: ' + data.key.toString('hex'))
    console.log('Value: ' + rlp.decode(data.value).toString())
  })

  stream.on('end', cb)
}
function readStorage (cb) {
  // we need to create a copy of the state root
  var storageTrie = stateTrie.copy()

  // Since we are using a copy we won't change the
  // root of `stateTrie`
  storageTrie.root = storageRoot

  var stream = storageTrie.createReadStream()

  console.log('------Storage------')

  // prints all of the keys and values in the storage trie
  stream.on('data', function (data) {
    // remove the 'hex' if you want to see the ascii values
    console.log('key: ' + data.key.toString('hex'))
    console.log('Value: ' + rlp.decode(data.value).toString())
  })

  stream.on('end', cb)
}
function readStorage ( cb ) { // we need to create a copy of the state root var storageTrie = stateTrie . copy ( ) // Since we are using a copy we won't change the // root of `stateTrie` storageTrie . root = storageRoot var stream = storageTrie . createReadStream ( ) console . log ( '------Storage------' ) // prints all of the keys and values in the storage trie stream . on ( 'data' , function ( data ) { // remove the 'hex' if you want to see the ascii values console . log ( 'key: ' + data . key . toString ( 'hex' ) ) console . log ( 'Value: ' + rlp . decode ( data . value ) . toString ( ) ) } ) stream . on ( 'end' , cb ) }
So if everything went right we should have "null_radix" stored at "0x9bdf9e2cc4dfa83de3c35da792cdf9b9e9fcfabd". To see this we need to print out the name register's storage trie. reads and prints the storage of a contract
So if everything went right we should have null_radix stored at 0x9bdf9e2cc4dfa83de3c35da792cdf9b9e9fcfabd . To see this we need to print out the name register s storage trie . reads and prints the storage of a contract