Closed nolash closed 6 years ago
From this page:
https://github.com/ethereumjs/ethereumjs-tx/blob/master/docs/index.md
For Object and Arrays each of the elements can either be a Buffer, a hex-prefixed (0x) String
Example below it has no 0x
var rawTx = { nonce: '00', gasPrice: '09184e72a000', gasLimit: '2710', to: '0000000000000000000000000000000000000000', value: '00', data: '7f7465737432000000000000000000000000000000000000000000000000000000600057', v: '1c', r: '5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab', s: '5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13' }; var tx = new Transaction(rawTx);
which is correct?
Explanation suggesting the 0x prepending is correct, have submitted and merged a PR https://github.com/ethereumjs/ethereumjs-tx/pull/107 with updated example code.
0x
From this page:
https://github.com/ethereumjs/ethereumjs-tx/blob/master/docs/index.md
Example below it has no 0x
which is correct?