Closed kelvinkuo closed 6 years ago
const ETX = require('ethereumjs-tx')
const tx = new ETX('0xf8aa04850553dc121583015f909440395044ac3c0c57051906da938b54bd6557f21280b844a9059cbb85f1150654584d0192059454e9dc1532d9d9cf914926406a02370cea80cf32f600000000000000000000000000000000000000000000000000000000033dc10b25a08cf9f0e8371eb3e576cff0c97774a4d1fda3d63cc3f1cbd108499eda9c95a0a9a055efc1badc54745d013465b96e22c421ce6ad0c44caed64e840a537b5af6368c')
console.log(tx.hash().toString('hex'))
> '0fc8f1cb5112c4679dfcbde54306cabecedfbfd115030252b2e3d77ed7b7da8c'
be sure that you do not use ethjs-util@0.1.5 (https://github.com/ethereumjs/ethereumjs-util/issues/132)
thanks @fanatid
I scanned the ethereum main chain, tx_hash = 0x0fc8f1cb5112c4679dfcbde54306cabecedfbfd115030252b2e3d77ed7b7da8c. decode the input and there is a error msg "Decoded int exceeds width: 160 vs 256 "
ethereumjs-tx version 1.3.4