pub fn calculate_aa_batch_intrinsic_gas<'a>(
aa_env: &TempoBatchCallEnv,
gas_params: &GasParams,
access_list: Option<impl Iterator<Item = &'a AccessListItem>>,
spec: TempoHardfork,
) -> Result<InitialAndFloorGas, TempoInvalidTransaction>Expand description
Calculates intrinsic gas for an AA transaction batch using revm helpers.
This includes:
- Base 21k stipend (once for the transaction)
- Signature verification gas (P256: 5k, WebAuthn: 5k + webauthn_data)
- Per-call account access cost (COLD_ACCOUNT_ACCESS_COST * calls.len())
- Per-call input data gas (calldata tokens * 4 gas)
- Per-call CREATE costs (if applicable):
- Additional 32k base (CREATE constant)
- Initcode analysis gas (2 per 32-byte chunk, Shanghai+)
- Check that value transfer is zero.
- Access list costs (shared across batch)
- Key authorization costs (if present):
- Pre-T1B: 27k base + 3k ecrecover + 22k per spending limit
- T1B+: ecrecover + SLOAD + SSTORE × (1 + N limits)
- Floor gas calculation (EIP-7623, Prague+)