test_tx_installs_delegation_on_sender()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py::test_tx_installs_delegation_on_sender@5c024cbb.
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_sender --fork Amsterdam
Self-sponsored type-4 transaction: the sender signs an
authorization installing delegation on itself, and the
authorization's nonce equals the sender's nonce after the
transaction-side increment (1). After set_delegation the
sender holds delegation code and its nonce reaches 2.
The sender authority already exists, so no NEW_ACCOUNT accrues,
and its leaf was already written at inclusion (priced into
TX_BASE), so the delegation write is not the transaction's
first write to it and no ACCOUNT_WRITE accrues either. The
authorization pays only AUTH_BASE (the net-new delegation
indicator).
Parametrized over the call target:
calls_self:tx.to == sender. The intrinsic self-transfer carve-out suppresses the recipient access and value-transfer charges; the top-frame fires the delegation access charge becauseset_delegationhas installed delegation code on the sender by then. The transaction then dispatches into the sender's delegated code.calls_other:tx.tois a separate funded EOA. The intrinsic charges includeCOLD_ACCOUNT_ACCESSfor the recipient (and the value-transfer charges whenvalue > 0). The top-frame fires no recipient charge because the recipient is a plain EOA. The sender's delegation is installed and persists past the transaction without ever being invoked.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_value_moving_with_tx_delegation.py
248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 | |
Parametrized Test Cases¶
This test generates 4 parametrized test cases across 1 fork.