-
Notifications
You must be signed in to change notification settings - Fork 12k
Utility to determine if an address is an EOA #5676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Sounds like a great idea @pcaversaccio. The delegation prefix |
I think there's utility in a function to confirm that an account is EIP-7702 delegated and to get the delegation target (this is useful for paymasters IIUC), but this is not what's proposed here. What would be the use of checking if an account is an EOA like this issue proposes? |
One example use case could be this line:
You can argue this is still accepted pattern as it's now a a smart contract wallet and not a "simple" EOA anymore. The delegation contracts like the one from MM (https://etherscan.io/address/0x63c0c19a282a1B52b07dD5a65b58948A07DAE32B#code) will return a valid EIP-1271 magic for such case. Another one could be here:
So the question is how to deal with |
Yes, this would be my main argument. Users sign a delegation message that literally means "execute this code in my EOA's context", and that's the way it should be treated IMO. If they delegated to a contract that doesn't implement 1271, then wasn't that their intention? They can always redelegate to a contract that does implement ERC1271 and will be ready to go. No harm to anyone. (Just as recommended by default in Wizard, though) On the other hand, I would argue that using an
Right, I'm looking for an actual use case because other than that, the current assumptions in smart contracts about empty addresses should remain. For protocols there's conceptually no difference in how accounts are interacting with them |
Uh oh!
There was an error while loading. Please reload this page.
I was wondering if it makes sense to have a utility function that can determine if an address is an EOA. With EIP-7702 we have now also
(0xef0100 || address)
as code for an EOA. So the function could check if the code length is either zero or the first 3 bytes isef_01_00
. I haven't thought this completely through, but dropping this as an idea here for now.The reason why I don't check for the length of 23 bytes is that you cannot deploy a contract starting with
0xef
according to EIP-3541.The text was updated successfully, but these errors were encountered: