Skip to content

Commit fc377ce

Browse files
committed
Finish test setup for eth_blobBaseFee:
- Add async test - Add static value for the tester provider for now until support is added to eth-tester.
1 parent e9119ca commit fc377ce

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

web3/_utils/module_testing/eth_module.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,12 @@ async def test_async_eth_accounts(self, async_w3: "AsyncWeb3") -> None:
18411841
assert len(accounts) != 0
18421842
assert all(is_checksum_address(account) for account in accounts)
18431843

1844+
@pytest.mark.asyncio
1845+
async def test_async_eth_blob_base_fee(self, async_w3: "AsyncWeb3") -> None:
1846+
blob_base_fee = await async_w3.eth.blob_base_fee
1847+
assert is_integer(blob_base_fee)
1848+
assert blob_base_fee >= 0
1849+
18441850
@pytest.mark.asyncio
18451851
async def test_async_eth_get_logs_without_logs(
18461852
self, async_w3: "AsyncWeb3", async_block_with_txn_with_log: BlockData

web3/providers/eth_tester/defaults.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ def create_new_account(eth_tester: "EthereumTester") -> HexAddress:
246246
"chainId": static_return(131277322940537), # from fixture generation file
247247
"feeHistory": call_eth_tester("get_fee_history"),
248248
"maxPriorityFeePerGas": static_return(10**9),
249+
"blobBaseFee": static_return(10**9),
249250
"gasPrice": static_return(10**9), # must be >= base fee post-London
250251
"accounts": call_eth_tester("get_accounts"),
251252
"blockNumber": compose(

0 commit comments

Comments
 (0)