ethereumjs / ethereumjs-tx

Project is in active development and has been moved to the EthereumJS VM monorepo.
https://github.com/ethereumjs/ethereumjs-vm/tree/master/packages/tx
Mozilla Public License 2.0
779 stars 235 forks source link

Broken Example #98

Closed jwasinger closed 6 years ago

jwasinger commented 6 years ago

The code gives the following error:

assert.js:42
  throw new errors.AssertionError({
  ^

AssertionError [ERR_ASSERTION]: The field to must have byte length of 20
    at Transaction.setter [as to] (/home/jwasinger/projects/tmp/node_modules/ethereumjs-util/dist/index.js:658:9)
    at /home/jwasinger/projects/tmp/node_modules/ethereumjs-util/dist/index.js:708:63
    at Array.forEach (<anonymous>)
    at Object.exports.defineProperties (/home/jwasinger/projects/tmp/node_modules/ethereumjs-util/dist/index.js:707:14)
    at new Transaction (/home/jwasinger/projects/tmp/node_modules/ethereumjs-tx/es5/index.js:112:13)
    at Object.<anonymous> (/home/jwasinger/projects/tmp/tx.js:16:10)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
holgerd77 commented 6 years ago

Adressed in https://github.com/ethereumjs/ethereumjs-tx/pull/107, will close.