@ethereumjs/common v3.0.2
Experimental EIP-4895 Beacon Chain Withdrawals Support
This release comes with experimental EIP-4895 beacon chain withdrawals support, see PR #2353 for the plain implementation and PR #2401 for updated calls for the CL/EL engine API. Also note that there is a new helper module in @ethereumjs/util with a new dedicated Withdrawal
class together with additional TypeScript types to ease withdrawal handling.
Withdrawals support can be activated by initializing a respective Common
object:
import { Common, Chain } from '@ethereumjs/common'
const common = new Common({ chain: Chain.Mainnet, eips: [4895] })
Hardfork-By-Time Support
The Common library now supports setting and retrieving hardforks which are triggered by timestamp instead of a specific block number, see PR #2437. This mechanism will be first applied for the upcoming Shanghai
HF. The methods getHardforkByBlockNumber()
, setHardforkByBlockNumber()
and paramByBlock()
have been altered to take in an additional timestamp
value, method naming remains for now for backwards compatibility. There are two new utility methods hardforkTimestamp()
and nextHardforkBlockOrTimestamp()
.