Skip to content

Commit

Permalink
👽️ Fix Anvil base fee parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
michprev committed Oct 8, 2024
1 parent 070e0e6 commit 78674be
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion wake/testing/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,13 @@ def _connect_setup(
if block_base_fee_per_gas is not None:
self._initial_base_fee_per_gas = Wei(block_base_fee_per_gas)
else:
self._initial_base_fee_per_gas = block_info.get("baseFeePerGas", 0)
base_fee = block_info.get("baseFeePerGas", 0)
if isinstance(base_fee, str):
if base_fee.startswith("0x"):
base_fee = int(base_fee, 16)
else:
base_fee = int(base_fee)
self._initial_base_fee_per_gas = Wei(base_fee)

if min_gas_price is not None:
try:
Expand Down

0 comments on commit 78674be

Please sign in to comment.