Test Execution Contexts¶
Documentation for tests/amsterdam/eip8024_dupn_swapn_exchange/test_execution_contexts.py@c17999c0.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip8024_dupn_swapn_exchange/test_execution_contexts.py --fork Amsterdam
Execution-context tests for EIP-8024 (DUPN, SWAPN, EXCHANGE).
Each context executes all three opcodes, each moving a distinct planted marker to the top of the stack. Every snippet plants its marker relative to the current stack top, so the snippets compose regardless of items left behind by earlier ones.
Test Functions Overview¶
| Name | Type | Cases (Amsterdam) | Description |
|---|---|---|---|
test_stack_access_call_contexts |
state_test | 4 | Test DUPN, SWAPN and EXCHANGE in every call frame type. |
test_stack_access_initcode_create |
state_test | 2 | Test DUPN, SWAPN and EXCHANGE inside initcode executed via CREATE |
test_stack_access_initcode_tx |
state_test | 1 | Test DUPN, SWAPN and EXCHANGE inside the initcode of a |
test_stack_access_set_code |
state_test | 1 | Test DUPN, SWAPN and EXCHANGE inside a set-code delegated account |