What is an Ethereum contract address and how do you find it?
A contract address is where a smart contract lives on Ethereum. How it's derived, how to find and check one, and how to tell a real token from a lookalike.
On this page
What an Ethereum contract address is
An Ethereum contract address is the address of a smart contract: a program stored on the chain. Every token, NFT collection, DEX pool and lending market on Ethereum lives at one. When you send a transaction to that address, the contract's code runs.
It looks exactly like a wallet address: 0x followed by 40 hexadecimal characters (20 bytes). The difference is what sits behind it. Ethereum has two kinds of account:
| Externally owned account (EOA) | Contract account | |
|---|---|---|
| Controlled by | Whoever holds the private key | Its code; it has no private key |
| How the address is made | From the public key of a key pair | From the deployer, at deployment (see below) |
| Code at the address | None, unless it delegates (EIP-7702) | The contract's bytecode |
| Can start a transaction | Yes | No, it only runs when called |
So "the USDC contract address" is the one address where the USDC token's code and balances live. Your wallet holds no USDC itself: the USDC contract records your balance against your address.
How a contract address is created
A contract's address is fixed at the moment it is deployed, and it comes from the deployer, not from the code. There are two ways to deploy.
CREATE, the default. The address is the last 20 bytes of keccak256(rlp([sender, nonce])): a hash of the deployer's address and its nonce (the number of transactions it has sent, or for a contract deployer, one more than the number of contracts it has created). Deploy the same code twice from the same wallet and you get two different addresses, because the nonce has moved on.
CREATE2, added by EIP-1014. The address is the last 20 bytes of keccak256(0xff ++ deployer ++ salt ++ keccak256(init_code)). No nonce is involved, so anyone can compute the address before the contract exists, and the same deployer, salt and code always give the same address. Factories and smart account wallets use this to give users an address before anything is deployed.
You can check both rules yourself. This script uses viem to read a deployment transaction, recompute its address from the sender and nonce, and compare it with the address the transaction receipt reports.
Prerequisites for the scripts in this guide: Node.js 18 or later (they were written on Node 22), and for the viem scripts, RPC_URL set to an Ethereum mainnet JSON-RPC endpoint from any node provider. They use import and top-level await, so save each one as a .mjs file. Save this one as deployment.mjs and run node deployment.mjs <deployment tx hash>:
npm install viem@2.58.4import { createPublicClient, getContractAddress, http } from "viem";import { mainnet } from "viem/chains"; const client = createPublicClient({ chain: mainnet, transport: http(process.env.RPC_URL) }); // Recompute the address a CREATE deployment produced, from its sender and nonce.async function checkDeployment(hash) { const tx = await client.getTransaction({ hash }); const receipt = await client.getTransactionReceipt({ hash }); const derived = getContractAddress({ from: tx.from, nonce: BigInt(tx.nonce) }); return { derived, fromReceipt: receipt.contractAddress };} console.log(await checkDeployment(process.argv[2])); // CREATE2: example 0 from EIP-1014 gives 0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38.console.log( getContractAddress({ opcode: "CREATE2", from: "0x0000000000000000000000000000000000000000", salt: "0x0000000000000000000000000000000000000000000000000000000000000000", bytecode: "0x00", }));The CREATE2 line needs no RPC and prints 0x4D1A2e2bB4F88F0250f26Ffff098B0b30B26BF38, the address EIP-1014 gives for its example 0. For a CREATE deployment, derived comes back checksummed (mixed case) and fromReceipt in lower case; they are the same address. Addresses are not case-sensitive, so compare them in lower case.
How to find an Ethereum contract address
Where to look depends on what you start from.
- The project's own site or docs. The safest source. Token issuers publish their addresses: Circle lists USDC's contract addresses per chain, and Tether lists USDT's. Ethereum USDC is
0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48and Ethereum USDT is0xdac17f958d2ee523a2206206994597c13d831ec7. - A block explorer. Search a token or project name on an explorer such as Etherscan to find its contract page. Names are not unique, so check the address against the project's own site.
- Your wallet. Most wallets show a token's contract address in its details, and ask for it when you add a token by hand.
- The deployment transaction. If you deployed the contract, or know the transaction that did, the receipt's
contractAddressfield holds the new address (see the JSON-RPC spec foreth_getTransactionReceipt). It isnullfor any other transaction. - An API response. Data APIs return the contract address next to every token they report. The next section shows it.
Get a wallet's token contract addresses with an API
The GoldRush Foundational API returns a wallet's tokens with the contract behind each one. Token balances for an address (balances_v2) lists every native and ERC-20 token a wallet holds on one chain, and each item carries contract_address, contract_name, contract_ticker_symbol and contract_decimals, plus a USD price in quote_rate when GoldRush has one. It costs 1 per call.
API=https://api.covalenthq.com/v1 curl "$API/eth-mainnet/address/vitalik.eth/balances_v2/?no-spam=true" \ -H "Authorization: Bearer $GOLDRUSH_API_KEY"Here are two items from that response on 19 November 2026, abridged. Both call themselves Tether USD, with the ticker USDT:
[ { "contract_name": "Tether USD", "contract_ticker_symbol": "USDT", "contract_address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "contract_decimals": 6, "supports_erc": ["erc20"], "type": "stablecoin", "is_spam": false, "quote_rate": 0.99927324 }, { "contract_name": "Tether USD", "contract_ticker_symbol": "USDT", "contract_address": "0xab30ff7cc54e92d194623cf14980590d33a5e43a", "contract_decimals": 6, "supports_erc": ["erc20"], "type": "cryptocurrency", "is_spam": false, "quote_rate": null }]Only the first is Tether's: its address matches the one Tether publishes. The second is another contract that copied the name and ticker. Anyone can deploy a token with any name and send it to any wallet, so a name and ticker prove nothing; only the contract address identifies a token.
This JavaScript groups a wallet's tokens by ticker, so any ticker held from more than one contract stands out. Save it as contracts.mjs, set your key as GOLDRUSH_API_KEY and run node contracts.mjs:
const API = "https://api.covalenthq.com/v1";const headers = { Authorization: `Bearer ${process.env.GOLDRUSH_API_KEY}`,}; // The token contracts a wallet holds on one chain, keyed by ticker.async function getTokenContracts(chain, wallet) { const url = `${API}/${chain}/address/${wallet}/balances_v2/?no-spam=true`; const res = await fetch(url, { headers }); const body = await res.json().catch(() => null); // a missing key's 401 is HTML, not JSON if (!res.ok || !body || body.error) throw new Error(`${res.status} ${body?.error_message ?? "no JSON body"}`); const byTicker = new Map(); for (const token of body.data.items) { if (token.is_native_token) continue; // ETH itself has no contract const list = byTicker.get(token.contract_ticker_symbol) ?? []; list.push({ name: token.contract_name, address: token.contract_address, priced: token.quote_rate !== null, }); byTicker.set(token.contract_ticker_symbol, list); } return byTicker;} const contracts = await getTokenContracts("eth-mainnet", "vitalik.eth");console.log(contracts.get("USDT"));Run against the response above, it prints the two USDT contracts, the real one with priced: true and the copy with priced: false.
- The native token isn't a contract. ETH comes back with
is_native_token: trueand the placeholder address0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee, which is why the code skips it. no-spam=trueis not a lookalike check. It removes tokens on GoldRush's spam lists, but both USDT contracts above came back withis_spam: false. Check addresses against the issuer.- Any chain. Change
eth-mainnettobase-mainnet,arbitrum-mainnetor any other supported chain. The same token has a different contract address on each chain.
To go the other way, from a contract address to the wallets that hold it, use the Token Holders API: pass the contract address to token_holders_v2 and it returns each holder's address and balance, now or at a past block. It costs 0.02 per item and works on 16 chains. How to get token holder data walks through it.
Handle errors from the token balances API
A failed request returns the same envelope as a successful one, with data: null, error: true, the reason in error_message and the HTTP status as a number in error_code; getTokenContracts throws with that message. The docs show this body for a chain name the API doesn't recognize, such as a typo in eth-mainnet:
{ "data": null, "error": true, "error_message": "Chain nosuchchain-mainnet not supported.", "error_code": 501 }A 501 won't change on retry: fix the chain name. A malformed wallet address returns 400. A request with no Authorization header at all gets an HTML 401 page from the edge proxy rather than JSON, which is why the code parses the body with .catch(() => null). Failed requests cost no credits; error handling lists every code.
How to check whether an address is a contract
Ask a node for the code at the address with eth_getCode. A contract returns its bytecode; an ordinary wallet returns 0x, which means no code. Save this as account-type.mjs, with the same viem install and RPC_URL as the first script, and run node account-type.mjs:
import { createPublicClient, http } from "viem";import { mainnet } from "viem/chains"; const client = createPublicClient({ chain: mainnet, transport: http(process.env.RPC_URL) }); // Contract, plain account (EOA), or an EOA that delegates to code under EIP-7702?async function accountType(address) { const code = await client.getCode({ address }); if (!code) return "no code: an EOA, or no contract deployed here"; if (code.startsWith("0xef0100")) return `EOA delegating to 0x${code.slice(8)}`; return "contract";} console.log(await accountType("0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48")); // USDCconsole.log(await accountType("0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045")); // vitalik.ethSince the Pectra upgrade, code at an address no longer always means a contract. Under EIP-7702, a wallet can point to a contract's code and run it, and the code at the wallet's address is then 0xef0100 followed by that contract's address. On 19 November 2026, USDC's address returned its bytecode and vitalik.eth returned a delegation like that, so the script printed contract and then EOA delegating to 0x5a7f….
No code doesn't prove an address is a wallet, either: a CREATE2 address can be computed and funded before its contract is deployed.
Staying safe with contract addresses
- Copy addresses from the source. Take a token's address from the issuer's site or docs, not from search results, social posts or a token that turned up in your wallet.
- Compare the whole address. Lookalike tokens copy names, tickers and logos, and some addresses are generated to share their first and last characters with a real one. Check every character, or paste and compare in code.
- Watch for address poisoning. Scammers send zero-value or tiny transfers from an address that looks like one you use, so it sits in your history waiting to be copied. Don't copy recipients from your transaction history.
- Unknown tokens in your wallet can be bait. A token you never bought may point you to a site that asks you to sign an approval. Don't interact with it.
- Use the right chain. The same token has different addresses on different chains, and sending to a contract address on the wrong chain can lose the funds.
Frequently asked questions
What is an Ethereum contract address?
The 20-byte address where a smart contract's code and data live on Ethereum. It looks like a wallet address, but no private key controls it: the contract's code runs when a transaction calls it.
What's the difference between a contract address and a wallet address?
A wallet address (an externally owned account) comes from a key pair, and whoever holds the private key controls it. A contract address is created when a contract is deployed and is controlled only by its code. A wallet has no code at its address unless it delegates to a contract under EIP-7702.
How do I find a token's contract address?
Take it from the token issuer's website or docs. A block explorer or your wallet's token details also show it, but names and tickers aren't unique, so check the address against the issuer before you use it.
Can two tokens have the same name?
Yes. Anyone can deploy a token with any name, ticker and logo. On 19 November 2026, vitalik.eth's Ethereum balances held two tokens named Tether USD with the ticker USDT; only one was at Tether's published address. The contract address is the only reliable identifier.
How do I know if an address is a contract?
Call eth_getCode on it. A contract returns its bytecode and a plain wallet returns 0x. If the code starts with 0xef0100, it is a wallet delegating to a contract under EIP-7702.
How can I get the contract addresses of every token in a wallet?
Call GoldRush's token balances endpoint for the wallet and chain. Each token in the response carries its contract_address, name, ticker and decimals.
Next steps
- GoldRush Foundational API: every GoldRush endpoint for balances, transactions, NFTs and more, with credit costs.
- Token balances reference: every parameter and response field.
- Token Holders API: every wallet that holds a token, from its contract address.
- How to get token holder data: holders of an ERC-20 or NFT collection, now or at a past block.