Wallet or Contract? 🕵️
Last step! Sometimes you have an address, but you don't know if it’s a person or a program 🤖
In VeChainThor, every address has a hasCode flag. If it’s true, it holds bytecode—meaning it’s a smart contract!.
If hasCode is false, it’s just an EOA (Externally Owned Account) controlled by a human with a private key.
Think of it like checking a door: if there's a machine inside (code), it's a factory (contract). If it's empty, it's just a house (wallet) 🏠
You’re getting it! You can even scan whole blocks and check hasCode for every transaction to discover new contracts in bulk.
Common pitfalls to avoid:
• Confusing txOrigin with gasPayer: In fee delegation, the address paying for gas might not be the actual deployer.
• Assuming every address is a contract: Always check thehasCodeflag before trying to filter for deployment logs.
Join our Telegram