Skip to content

Conversation

@RomarQ
Copy link

@RomarQ RomarQ commented Apr 30, 2025

Uses the transaction origin in precompile handle to determine if an address is an externally owned account

Address type heuristics:

  • It is a EOA when the transaction origin is equal to the address;
  • It is a Precompile if calling pallet_evm::Config::PrecompilesValue::get().is_precompile returns true;
  • If neither of the conditions above are true, we assume that an address is a smart-contract.

Also, this is already part of the changes required for supporting https://eips.ethereum.org/EIPS/eip-7702, which is part of the Pectra upgrade.

@RomarQ RomarQ self-assigned this Apr 30, 2025
@RomarQ RomarQ changed the title Fix eoa check for precompiles Fix EOA check for precompiles Apr 30, 2025
Copy link

@manuelmauro manuelmauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

@RomarQ
Copy link
Author

RomarQ commented May 2, 2025

Closing in favor of #249, which will result in less breaking changes.

@RomarQ RomarQ closed this May 2, 2025
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.

4 participants