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

Simplify Transaction constructor's options #149

Closed alcuadrado closed 5 years ago

alcuadrado commented 5 years ago

There are multiple ways to set the chain that a transaction belongs to, this can/should be simplified.

I'm opening this issue as a continuation of the discussions that happened here, here, and here.

holgerd77 commented 5 years ago

Another question I have related to this: how justified is this constructor option split into "data" and "opts" dictionaries?

alcuadrado commented 5 years ago

I think they were separated because of how defineProperties work. But I don't have enough knowledge about the history of this library.

holgerd77 commented 5 years ago

@alcuadrado ah ok, I think I already stumbled upon that one but forgot again, thanks!