@ethereumjs/block v3.2.0
This release gets the Block
library ready for the berlin
HF by adding support for EIP2718 Typed Transactions. Transaction objects are now created with the new TransactionFactory
introduced with the @ethereumjs/tx
v3.1.0
release which chooses the correct tx type for the data. The initial tx release supports the old legacy transactions and the newly added EIP2930 Access List Transaction Type, see PR #1048.
Please note that the default HF is still set to istanbul
. You therefore need to explicitly set the hardfork
parameter for instantiating a Block
instance with a berlin
HF activated:
import { Block } from 'ethereumjs-block'
import Common from '@ethereumjs/common'
const common = new Common({ chain: 'mainnet', hardfork: 'berlin' })
const block = Block.fromBlockData({}, { common })
EthereumJS Libraries - Typed Transactions Readiness
If you are using this library in conjunction with other EthereumJS libraries make sure to minimally have the following library versions installed for typed transaction support:
@ethereumjs/common
v2.2.0
@ethereumjs/tx
v3.1.0
@ethereumjs/block
v3.2.0
@ethereumjs/blockchain
v5.2.0
@ethereumjs/vm
v5.2.0