test_tx_installs_delegation_on_funded_recipient()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py::test_tx_installs_delegation_on_funded_recipient@87aba1a3.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py::test_tx_installs_delegation_on_funded_recipient --fork Amsterdam
Scenario 1: tx.to is a funded EOA with no prior delegation.
The type-4 transaction's authorization installs delegation on
tx.to.
The authority (tx.to) already exists, so it pays no
NEW_ACCOUNT; it has no prior code, so writing the delegation
indicator pays AUTH_BASE. Whether it pays ACCOUNT_WRITE
depends on the value transfer: with zero_value the delegation
write is the transaction's first write to tx.to and
ACCOUNT_WRITE is charged; with non-zero_value the
transaction already pays to write tx.to when it transfers value
to it, so no ACCOUNT_WRITE accrues. The top-frame
COLD_ACCOUNT_ACCESS charge for the now-delegated recipient (its
fresh delegation target is cold) still fires.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py
55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.