Skip to content

Test Withdrawals

Documentation for tests/shanghai/eip4895_withdrawals/[email protected].

Generate fixtures for these test cases for Osaka with:

fill -v tests/shanghai/eip4895_withdrawals/test_withdrawals.py --fork Osaka

Test Functions Overview

Name Type Cases (Osaka) Description
test_use_value_in_tx blockchain_test 2 Test sending withdrawal value in a transaction.
test_use_value_in_contract blockchain_test 1 Test sending value from contract that has not received a withdrawal.
test_balance_within_block blockchain_test 1 Test withdrawal balance increase within the same block in a contract call.
test_multiple_withdrawals_same_address blockchain_test 2 Test withdrawals to the same address multiple times in the same block.
test_many_withdrawals blockchain_test 1 Test an unexpected high number of withdrawals in a single block.
test_self_destructing_account blockchain_test 1 Test withdrawals can be done to self-destructed accounts.
test_newly_created_contract blockchain_test 2 Test withdrawing to a newly created contract.
test_no_evm_execution blockchain_test 1 Test withdrawals don't trigger EVM execution.
test_zero_amount blockchain_test 4 Test withdrawal scenarios with a zero amount in a single block.
test_large_amount blockchain_test 1 Test withdrawals that have a large gwei amount.
test_withdrawing_to_precompiles blockchain_test 36 Test withdrawing to all precompiles for a given fork.