account_extensions_draft-AccountERC7579.sol.patch 1.3 KB

12345678910111213141516171819202122232425
  1. --- account/extensions/draft-AccountERC7579.sol 2025-07-22 11:18:42.944504471 +0200
  2. +++ account/extensions/draft-AccountERC7579.sol 2025-07-22 13:57:03.670277084 +0200
  3. @@ -60,8 +60,8 @@
  4. using EnumerableSet for *;
  5. using Packing for bytes32;
  6. - EnumerableSet.AddressSet private _validators;
  7. - EnumerableSet.AddressSet private _executors;
  8. + EnumerableSet.AddressSet internal _validators; // private → internal for FV
  9. + EnumerableSet.AddressSet internal _executors; // private → internal for FV
  10. mapping(bytes4 selector => address) private _fallbacks;
  11. /// @dev The account's {fallback} was called with a selector that doesn't have an installed handler.
  12. @@ -308,8 +308,9 @@
  13. * the ERC-2771 format.
  14. */
  15. function _fallback() internal virtual returns (bytes memory) {
  16. - address handler = _fallbackHandler(msg.sig);
  17. - require(handler != address(0), ERC7579MissingFallbackHandler(msg.sig));
  18. + bytes4 selector = bytes4(msg.data[0:4]);
  19. + address handler = _fallbackHandler(selector);
  20. + require(handler != address(0), ERC7579MissingFallbackHandler(selector));
  21. // From https://eips.ethereum.org/EIPS/eip-7579#fallback[ERC-7579 specifications]:
  22. // - MUST utilize ERC-2771 to add the original msg.sender to the calldata sent to the fallback handler