EOA Contract Differentiation #100
Replies: 2 comments 14 replies
-
I think we could explore a solution similar to EIP-1271 and have an Note that the role of the magic value makes more sense in Ethereum where you need to identify you're calling the right function since function selectors are only the first 4 bytes of a hash (32bits), making collisions much more likely than in StarkNet where function selectors are 250bits. |
Beta Was this translation helpful? Give feedback.
-
This week @spalladino suggested to replace
Therefore I (stealing Palla's thunder) suggest we remove |
Beta Was this translation helpful? Give feedback.
-
Preface
Signature validation is handled at the contract level on StarkNet; thus, users utilize account contract abstractions to handle tx authentication. Read more on this concept in the Account documentation and in Perama's blogpost.
Because Solidity handles accounts by deriving them from a private key, the assembly function
extcodesize()
proves useful in differentiating between an EOA and an actual contract. EOAs return0
as code size, contracts do not.Problem
Because EOAs are contracts, it seems like we'll need a new way to differentiate EOA contracts and regular contracts. While implementing ERC721, this is discovered to be a problem, but I'm sure this will show up elsewhere in the future. A feature request for StarkWare seems warranted here.
Thoughts, ideas, and/or opinions regarding this differentiation issue? Any potential solutions overlooked?
Beta Was this translation helpful? Give feedback.
All reactions