MultiversX Tracker is Live!

How to determine if an address is EOA or contract without pulling the entire code?

Etherum Reddit

More / Etherum Reddit 150 Views

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:

https://github.com/MetaMask/metamask-extension/blob/e3ea4f2cd044d48c61b6a35ef206fa942f3b43d1/shared/modules/contract-utils.js

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]
Get BONUS $200 for FREE!

You can get bonuses upto $100 FREE BONUS when you:
πŸ’° Install these recommended apps:
πŸ’² SocialGood - 100% Crypto Back on Everyday Shopping
πŸ’² xPortal - The DeFi For The Next Billion
πŸ’² CryptoTab Browser - Lightweight, fast, and ready to mine!
πŸ’° Register on these recommended exchanges:
🟑 Binance🟑 Bitfinex🟑 Bitmart🟑 Bittrex🟑 Bitget
🟑 CoinEx🟑 Crypto.com🟑 Gate.io🟑 Huobi🟑 Kucoin.



Comments