diff --git a/src/ape_test/provider.py b/src/ape_test/provider.py index 9814daa0b5..e53b2b30c4 100644 --- a/src/ape_test/provider.py +++ b/src/ape_test/provider.py @@ -498,7 +498,7 @@ def add_account(self, private_key: str): self.evm_backend.add_account(private_key) def _get_last_base_fee(self) -> int: - base_fee = self._get_latest_block_rpc().get("base_fee_per_gas", None) + base_fee = self.evm_backend.get_block_by_number("pending").get("base_fee_per_gas", None) if base_fee is not None: return base_fee diff --git a/tests/functional/test_accounts.py b/tests/functional/test_accounts.py index f0e02472bc..35fcd55765 100644 --- a/tests/functional/test_accounts.py +++ b/tests/functional/test_accounts.py @@ -170,7 +170,7 @@ def test_transfer_without_value_send_everything_true_with_low_gas(sender, receiv # Clear balance of sender. # Use small gas so for sure runs out of money. - receipt = sender.transfer(receiver, send_everything=True, gas=21000) + receipt = sender.transfer(receiver, send_everything=True, gas=22000) value_given = receipt.value total_spent = value_given + receipt.total_fees_paid diff --git a/tests/functional/test_provider.py b/tests/functional/test_provider.py index 0876172d05..f5e9f9dfd9 100644 --- a/tests/functional/test_provider.py +++ b/tests/functional/test_provider.py @@ -534,7 +534,7 @@ def rate_limit_hook(self, rpc, params): def test_base_fee(eth_tester_provider): actual = eth_tester_provider.base_fee - assert actual > 0 + assert actual >= eth_tester_provider.get_block("pending").base_fee # NOTE: Mostly doing this to ensure we are calling the fee history # RPC correctly. There was a bug where we were not.