test_tx_installs_delegation_on_empty_recipient()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py::test_tx_installs_delegation_on_empty_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_empty_recipient --fork Amsterdam
Scenario 2: tx.to is a non-existent (empty) account. The type-4
transaction's authorization installs delegation on tx.to.
The authority's account leaf does not exist, so the authorization
pays NEW_ACCOUNT (account creation) and AUTH_BASE (net-new
delegation indicator). Whether it also 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. set_delegation runs
before the recipient top-frame check and makes the recipient alive,
so the recipient NEW_ACCOUNT charge a value transfer would
otherwise incur is suppressed (the per-authorization NEW_ACCOUNT
accounts for the leaf). The COLD_ACCOUNT_ACCESS charge for the
now-delegated recipient still fires.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
Parametrized Test Cases¶
This test generates 2 parametrized test cases across 1 fork.