ERC20 Address: Format, balanceOf and Creating One via API
An ERC20 address is the 42-character, 0x-prefixed account address Ethereum uses for every wallet. It becomes an ERC-20 address when the account holds tokens that follow the ERC-20 standard. The same string works on Polygon and Arbitrum because they are EVM-compatible, but tokens and balances are specific to each chain.
Calling balanceOf(address) on the token contract returns an ERC-20 balance. Over REST, GET /api/v2/ethereum/balances/{address}/erc20/{contract_address} returns the same figure already decoded. To receive tokens, share the address. To send them, you need its key and a little ETH to pay gas.
This page covers the address format, balanceOf, the same address on Polygon and Arbitrum, and creating addresses over REST.
What is the ERC-20 standard?
ERC-20 is Ethereum's standard interface for fungible tokens. EIP-20 defines six functions, totalSupply, balanceOf, transfer, transferFrom, approve and allowance, plus the Transfer and Approval events. Any contract that implements them is a compliant token. Wallets and exchanges can therefore support a new token without custom work per token.
The ethereum.org ERC-20 overview walks through the same interface with examples. The full mechanics are in our ERC20 token standard article. This page stays on the address side: what an ERC-20 address is and how to work with it in code.
What does an ERC-20 address look like?
An ERC-20 address is the ordinary Ethereum address, for example 0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed. It is 0x plus 40 hexadecimal characters, 42 characters in total. The ethereum.org accounts documentation describes it as the last 20 bytes of the Keccak-256 hash of the account's public key.
The name only appears in context. An address becomes an "ERC-20 address" when the discussion is about the tokens it holds. Nothing in the string marks it as token-capable, and the same address works for ETH, for every ERC-20 token and for NFTs.
- The 0x prefix marks the value as hexadecimal.
- The 40 hexadecimal characters are 20 bytes: the last 20 bytes of the Keccak-256 hash of the public key.
- 42 characters in total. The mix of upper and lower case letters is the EIP-55 checksum.
How does balanceOf read an ERC-20 balance?
balanceOf(address) is the read-only function that returns an address's token balance. The balance is not stored on the address. It lives inside the token's smart contract, in a mapping keyed by address, and balanceOf looks it up.
Calling it directly means encoding a JSON-RPC eth_call against the token contract and decoding the returned hex. The result is an integer in the token's smallest unit, so you must also read decimals(). Many stablecoins use 6 decimals, others use 18, and getting this wrong is a common source of off-by-a-million bugs.
The Chaingateway API does the encoding and the decimal handling for you. The balance endpoints return plain numbers, so a raw-RPC problem becomes a normal REST response.
Is the same ERC-20 address valid on Polygon and Arbitrum?
Yes. Polygon and Arbitrum are EVM-compatible, so their addresses use the identical 0x format. An address derived from the same private key is the same string on Ethereum, Polygon and Arbitrum.
The tokens at that address are not shared. A token contract deployed on Ethereum does not exist on Polygon until someone deploys it there or bridges the asset. Balances are therefore chain-specific, even when the address is not. Tokens on Polygon follow the same ERC-20 interface, which is why one code path can serve all three chains.
ERC-721 and ERC-721A: a different standard, same address format
ERC-721 is Ethereum's non-fungible token standard. Each token ID is unique, unlike the interchangeable balances of ERC-20. EIP-721 specifies the interface.
ERC-721A is a gas-optimized implementation of the same interface, popular for collections minted in batches. It changes how the contract stores data internally, not what a holder's address looks like. Both standards use the same 0x address for ownership. The ERC721 token standard article covers the NFT side in depth.
Create and read ERC-20 addresses over REST
Six routes cover the address lifecycle of a payment integration.
| Endpoint | What it does |
|---|---|
POST /api/v2/ethereum/addresses | Generate a new Ethereum address |
POST /api/v2/ethereum/addresses/import | Import a private key so the API can sign for that address |
GET /api/v2/ethereum/balances/{address}/erc20/{contract_address} | Balance of one ERC-20 token, already decoded |
GET /api/v2/ethereum/balances/{address}/erc20 | All token balances of the wallet |
POST /api/v2/ethereum/webhooks | Register a webhook for ERC-20 deposits to the address |
POST /api/v2/ethereum/transactions/erc20 | Send an ERC-20 token from the address |
The same request shape applies with /polygon/ or /arbitrum/ in place of /ethereum/ in the path, since all three chains share the address format and the ERC-20 interface.
Read an ERC-20 balance without eth_call
The contract address below is USDT on Ethereum mainnet. Add X-Network: testnet to query a testnet token instead.
curl https://app.chaingateway.io/api/v2/ethereum/balances/0xYourAddress/erc20/0xdAC17F958D2ee523a2206206994597C13D831ec7 \
-H "Authorization: Bearer YOUR_API_KEY"How do I validate an ERC-20 address before sending?
Match the string against ^0x[a-fA-F0-9]{40}$ first, which rejects wrong lengths and stray characters. If the address mixes upper and lower case, verify the EIP-55 checksum as well. A single wrong letter then fails the check.
A format check cannot tell you which network the recipient expects, because the same address is valid on every EVM chain. Collect the network explicitly. Never accept a token contract address as a destination. The address validator runs the format and checksum checks in the browser for a single address.
Sources
- EIP-20: Token Standard
- ERC-20 token standard (ethereum.org)
- Ethereum accounts (ethereum.org)
- ERC-55: Mixed-case checksum address encoding
Checked on 5 November 2026.
Need ERC-20 balances without hand-decoding balanceOf calls? Create a free account and query a testnet address over REST — 7-day trial, no card, no KYC.
FAQ: ERC-20 addresses
Ready to build on Ethereum, Polygon or Arbitrum?
Create an account and query a testnet ERC-20 balance today — 7-day trial, no card, no KYC. Full reference in the Ethereum API docs, or cover all seven chains with the multi-chain blockchain API.
Reviewed by Maurice Sobiera How we write these pages