Skip to content

Conversation

@pgherveou
Copy link
Contributor

@pgherveou pgherveou commented Jan 29, 2026

Summary

This PR continues the work from #10851 implementing EIP-7702 (Set EOA Account Code) for pallet-revive.

Changes in this PR

  • Add EIP-7702 authorization list processing to dry_run_eth_transact
  • Split eth_call into two extrinsics:
    • eth_call (9 arguments, call_index 11) - for regular calls
    • eth_call_with_authorization_list (10 arguments, call_index 14) - for EIP-7702 transactions
  • Refactor eip7702.rs to use WeightMeter for progressive weight charging
  • Update dispatch logic in call.rs to route to correct extrinsic based on authorization list presence
  • Add test infrastructure for eth_call_with_authorization_list

…n API

- Remove UnsignedAuthorizationListEntry struct, flatten fields into AuthorizationListEntry
- Add rlp_encode_unsigned() method to AuthorizationListEntry for signing
- Update sign_authorization() to take (signing_key, chain_id, address, nonce) parameters
- Update all usages in benchmarks and tests
Move the account existence check from process_authorizations into
validate_authorization so its weight is included in the validation
benchmark. The function now returns Option<(H160, bool)> where the
bool indicates if the account is new.
Remove extraneous formatting changes that were not part of the EIP-7702
implementation:
- Revert operator position changes (trailing to leading)
- Revert added braces around single-expression match arms
- Revert semicolon additions on return statements
- Revert | operator position changes
- Use SignedGas::from_weight_fee().to_ethereum_gas() for proper weight-to-gas
  conversion that accounts for both ref_time and proof_size
- Simplify nonce validation in eip7702.rs using try_into() instead of
  separate bounds check
- Compare nonces as u64 directly instead of converting back and forth with U256
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants