The Native Pulse
Did you know VET is a bit special? 🌟
Unlike other tokens on VeChainThor (like B3TR or other ERC20 tokens), VET doesn't have a smart contract address.
Think of VET as the "cash" of the network. Because it's built directly into the blockchain's core, you can't query it through standard smart contract event logs.
In JavaScript, this means we use a dedicated native method: thor.logs.filterTransferLogs.
Nice! To get started, we connect our ThorClient to the network:
You're getting it! You can even narrow your search by filtering for a specific sender, recipient, or the txOrigin (the person who started the whole transaction).
Wait, what if you need to read the amount? Native tokens use 18 decimals! 📏
To turn that giant number into something human-readable, we use BigInt to handle the large value and divide it by $10^{18}$.
Almost there! Monitoring these native pulses is the first step to building interactive heatmaps and interaction maps for your users.
Technical Note: Don't look for a contract address for VET—there isn't one! Also, remember that
limitandoffsetare crucial for pagination if you're searching through millions of blocks.
Join our Telegram