Exploring VeChain Accounts
On VeChainThor, every interaction happens through an account. But not all accounts are the same! 🧙♂️
There are two main flavors:
Externally Owned Accounts (EOA): These are typical user wallets controlled by private keys.
Smart Contracts: These are automated programs deployed with specific code.
How do you tell them apart? It's easy! Check the hasCode flag. If it's true, you're looking at a smart contract. Nice!
To start reading data, we initialize our ThorClient:
VeChain uses a dual-token system. When you look up an account, you'll see:
• balance: This is your VET (Value-transfer token).
• energy: This is your VTHO (Transaction/Gas token).
Both tokens use 18 decimals. This means the raw data looks like a giant number! To make it human-readable, we convert the hex-encoded BigInt and divide it by 10^18.
You’re getting it! Now let’s add some "human" touch with Aliases. Aliases (like alice.vet) are human-readable names stored on-chain. They make it much easier to identify wallets than long hexadecimal strings!
Join our Telegram