Skip to content

@ethereumjs/tx v5.1.0

Compare
Choose a tag to compare
@holgerd77 holgerd77 released this 02 Nov 08:49
· 438 commits to master since this release
c6d8b39

More Type-Aligned Library Structure

This release gently introduces a backwards-compatible new/adopted library structure which is more aligned with the idea of independent tx types, bundling various functionalities together in a way that is not necessarily hierarchical, see PR #2993 and #3010.

Reused functionality (e.g. calculating the upfront-cost (getUpfrontCost()) of an EIP-1559-compatible tx - is internally bundled in capability files (e.g. capabilities/eip1559.ts), which provide static call access to the respective methods.

These methods are then called and the functionality exposed by the respective methods in the tx classes, see the following example code for an FeeMarketEIP1559Transaction:

getUpfrontCost(baseFee: bigint = BigInt(0)): bigint {
    return EIP1559.getUpfrontCost(this, baseFee)
  }

This makes creating additional or custom tx types and reusing of existing functionality substantially easier and makes the library substantially more robust by largely consolidating previously redundant code parts.

Dencun devnet-11 Compatibility

This release contains various fixes and spec updates related to the Dencun (Deneb/Cancun) HF and is now compatible with the specs as used in devnet-11 (October 2023).

  • Update peer dependency for kzg module to use the official trusted setup for mainnet, PR #3107

Other Changes

  • Performance: cache tx sender to avoid redundant and costly ecrecover calls, PR #2985
  • Add new method getDataFee() to BlobEIP4844Transaction, PR #2955