test_single_authorization_charges()¶
Documentation for tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_charges.py::test_single_authorization_charges@26332146.
Generate fixtures for these test cases for Amsterdam with:
fill -v tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_charges.py::test_single_authorization_charges --fork Amsterdam
A single authorization on a third-party authority, spanning the action space that drives its top-frame charge.
Every valid action below is the transaction's first write to its
(third-party) authority, so each pays ACCOUNT_WRITE on top of
the charges listed:
CREATES_ACCOUNT: the authority does not exist, so the authorization also paysNEW_ACCOUNT(creation) andAUTH_BASE(net-new delegation indicator).SETS_NEW_DELEGATION: an existing empty-code EOA gains a delegation, payingAUTH_BASE.SETS_DIFFERENT_DELEGATION/SETS_SAME_DELEGATION: an already-delegated EOA is re-pointed (or re-pointed to the same target); it was delegated before the transaction, so noAUTH_BASEaccrues. The nonce still advances.CLEARS_DELEGATION: an already-delegated EOA is cleared (the authorization target is the null address); noAUTH_BASEaccrues and the delegation code is removed.INVALID: the authorization nonce does not match the authority's account nonce, sovalidate_authorizationskips it. The intrinsic base cost is still paid; no top-frame charge (not evenACCOUNT_WRITE) accrues and the authority is untouched.
Source code in tests/amsterdam/eip2780_reduce_intrinsic_tx_gas/test_authorization_charges.py
31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 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 | |
Parametrized Test Cases¶
This test generates 6 parametrized test cases across 1 fork.