How to determine if an address is EOA or contract without pulling the entire code?
The common way to determine if an address is EOA or contract is to call `getCode` and check if the result is `0x` or `0x0`.
For example, this is MetaMask code doing this:
But it introduces some network delay, especially if the target contract is huge(for example, OpenSea contract), which may result in several seconds delay in a bad network situation.
Is there a way to optimize this?
submitted by /u/wonderfuly
[link] [comments]