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

is version 2.0.0 no longer a constructor? #159

Closed frankiebee closed 5 years ago

frankiebee commented 5 years ago

node -v v8.15.1

im running old test that would pass with version: 1.3.7 and after updating to version 2.0.0 i get this error: TypeError: EthjsTx is not a constructor

code:

      const EthjsTx = require('ethereumjs-tx')

      const txParams = {
        to: '0x70ad465e0bab6504002ad58c744ed89c7da38524',
        from: '0x69ad465e0bab6504002ad58c744ed89c7da38525',
        value: '0x0',
        gas: '0x7b0c',
        gasPrice: '0x199c82cc00',
        data: '0x',
        nonce: '0x3',
        chainId: 42,
      }
      const ethTx = new EthjsTx(txParams)

maybe i'm doing something wrong here? or a breaking change i'm missing? will dig a little bit longer but thought i might just point this out for now

frankiebee commented 5 years ago

lol just saw the major change woof sorry