Skip to content

Test State Gas Delegation Pointer

Documentation for tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_delegation_pointer.py@636b5f17.

Generate fixtures for these test cases for Bogota with:

fill -v tests/amsterdam/eip8037_state_creation_gas_cost_increase/test_state_gas_delegation_pointer.py --fork Bogota

Test state gas behavior when calling via 7702 delegation pointer vs direct.

Under EIP-8037, calling a contract that has a 7702 delegation pointer should charge the same state gas as calling the target directly. The delegation resolution is transparent to gas accounting.

Tests for [EIP-8037: State Creation Gas Cost Increase] (https://eips.ethereum.org/EIPS/eip-8037).

Test Functions Overview

Name Type Cases (Bogota) Description
test_account_state_gas_via_delegation_pointer state_test 3 Test account-creating charges are billed the same via a delegation
test_delegation_pointer_new_account_state_gas state_test 1 Test delegation pointer CALL to empty account charges new-account gas.
test_delegation_pointer_state_gas_on_frame_failure state_test 2 Test a delegated frame's state charge is undone when it fails.
test_delegation_pointer_to_delegated_account state_test 1 Test a pointer aimed at an already-delegated account.
test_sstore_direct_call_same_contract state_test 1 Test SSTORE state gas charged when calling the contract directly.
test_sstore_via_delegation_pointer state_test 1 Test SSTORE state gas charged when called via delegation pointer.