eth_getCode
JSON-RPC methods
jsonrpc eth_getCode | TRON
TRON API method that returns the contract code at a given address. This method provides Ethereum-compatible interface for TRON blockchain.
POST
eth_getCode
TRON API method that returns the bytecode of a smart contract at a specified address, providing an Ethereum-compatible interface for accessing TRON blockchain data.
Get your own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
jsonrpc— the JSON-RPC protocol version (always “2.0”)method— the method name (always “eth_getCode”)params— array containing method parametersaddress— the contract address to retrieve code fromblockParameter— only"latest"is supported; TRON has no historical state queries, see Historical data availability
id— request identifier (number or string)
Response
jsonrpc— the JSON-RPC protocol version (“2.0”)id— the request identifier that matches the requestresult— the contract bytecode as a hex string (returns “0x” for non-contract addresses)
Use case
Thejsonrpc eth_getCode method is used for:
- Verifying smart contract deployment and retrieving contract bytecode through Web3 interfaces
- Building contract verification and analysis tools for TRON smart contracts
- Implementing contract existence checks in dApps and development tools
- Developing security analysis tools that examine contract code patterns
Body
application/json
Last modified on June 4, 2026