Developer Quick Reference
Get instant access to the essential parameters, network endpoints, and code snippets required for TRON development. This quick reference covers Mainnet and Testnet configurations, verified TRC-20 addresses, and core SDK initialization patterns to keep your workflow fast and efficient.
Network Endpoints
Section titled “Network Endpoints”Mainnet
Section titled “Mainnet”# Task: Note the official Mainnet RPC endpoints and Chain ID.HTTP API (TronGrid): https://api.trongrid.ioJSON-RPC (EVM): https://api.trongrid.io/jsonrpcgRPC: grpc.trongrid.io:50051EVM Chain ID: 728126428 (0x2B6653DC)Nile Testnet
Section titled “Nile Testnet”# Task: Note the official Nile Testnet RPC endpoints and Chain ID.HTTP API: https://nile.trongrid.ioJSON-RPC (EVM): https://nile.trongrid.io/jsonrpcEVM Chain ID: 3448148188 (0xcd8690dc)Faucet: https://nileex.io/join/getJoinPageExplorer: https://nile.tronscan.orgShasta Testnet
Section titled “Shasta Testnet”# Task: Note the official Shasta Testnet RPC endpoints and Chain ID.HTTP API: https://api.shasta.trongrid.ioEVM Chain ID: 2494104990 (0x94a9059e)Faucet: https://shasta.tronex.ioExplorer: https://shasta.tronscan.orgVerified Contract Addresses (Mainnet)
Section titled “Verified Contract Addresses (Mainnet)”# Task: Use these verified TRC-20 addresses for Mainnet integration.USDT (TRC-20): TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6tUSDD (TRC-20): TPYmHEhy5n8TCEfYGqW2rPxsghSfzghPDnstUSDT (TRC-20): TThzxNRLrW2Brp9DcTQU8i4Wd9udCWEdZ3wstUSDT (TRC-20): TGkxzkDKyMeq2T7edKnyjZoFypyzjkkssqWTRX (TRC-20): TNUC9Qb1rRpS5CbWLmNMxXBjyFoydXjWFRSUN (TRC-20): TSSMHYeV2uE9qYH95DqyoCuNCzEL1NvU3SJST (TRC-20): TCFLL5dx5ZJdKnWuesXxi1VPwjLVmWZZy9BTT (TRC-20): TAFjULxiVgT4qWk6UZwjqwZXTSaGaqnVp4WIN (TRC-20): TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7Testnet USDT Addresses
Section titled “Testnet USDT Addresses”# Task: Use these addresses for USDT integration on TRON Testnets.Nile Testnet: TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBfShasta Testnet: TDZDd58a44n5Bvg7pfpcdWhZpv7XSt9PsUtronweb Initialization
Section titled “tronweb Initialization”Mainnet (with API key)
Section titled “Mainnet (with API key)”// Task: Initialize TronWeb for Mainnet with a Pro API Key.import TronWeb from "tronweb"
const tronWeb = new TronWeb({ fullHost: 'https://api.trongrid.io', headers: { 'TRON-PRO-API-KEY': 'your-api-key-here' }, privateKey: 'your-private-key-here', // omit for read-only});Nile Testnet
Section titled “Nile Testnet”// Task: Initialize TronWeb for the Nile Testnet.const tronWeb = new TronWeb({ fullHost: 'https://nile.trongrid.io', privateKey: 'your-private-key-here',});Read-only / browser (TronLink injection)
Section titled “Read-only / browser (TronLink injection)”// Task: Connect to the window.tronWeb instance injected by TronLink.if (window.tronWeb && window.tronWeb.ready) { const tronWeb = window.tronWeb; const address = tronWeb.defaultAddress.base58; // e.g. TJY...} else { console.warn('TronLink not installed or locked');}Common HTTP API Calls
Section titled “Common HTTP API Calls”# Task: Common account and transaction queries via raw HTTP.# Get account infocurl https://api.trongrid.io/v1/accounts/{address}
# Get TRX balance (returns SUN)curl https://api.trongrid.io/v1/accounts/{address} | jq '.data[0].balance'
# Get TRC-20 token balancecurl "https://api.trongrid.io/v1/accounts/{address}/tokens?token_id=TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t&token_type=trc20"
# Get latest blockcurl https://api.trongrid.io/wallet/getnowblock
# Broadcast a signed transactioncurl -X POST https://api.trongrid.io/wallet/broadcasttransaction \ -H 'Content-Type: application/json' \ -d '{"transaction": {...}}'TRC-20 Contract Interaction (tronweb)
Section titled “TRC-20 Contract Interaction (tronweb)”// Task: Load a contract and perform TRC-20 balance checks/transfers.const USDT = 'TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t';const contract = await tronWeb.contract().at(USDT);
// Get balanceconst balance = await contract.balanceOf(address).call();const usdtAmount = tronWeb.toBigNumber(balance).div(1e6).toFixed(6);
// Transferconst amount = tronWeb.toSun(10);await contract.transfer(recipientAddress, amount).send();Address Utilities
Section titled “Address Utilities”// Task: Convert and validate TRON addresses between Hex and Base58.// Convert hex to Base58const base58 = tronWeb.address.fromHex('0x41....');
// Convert Base58 to hexconst hex = tronWeb.address.toHex('TXXX...');
// Validateconst isValid = tronWeb.isAddress('TXXX...');Extra Developer Utilities
Section titled “Extra Developer Utilities”Check TRC-20 Metadata
Section titled “Check TRC-20 Metadata”// Task: Fetch decimals and symbol for any TRC-20 token.const contract = await tronWeb.contract().at('TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t');const [symbol, decimals, name] = await Promise.all([ contract.symbol().call(), contract.decimals().call(), contract.name().call()]);console.log(`${name} (${symbol}): ${decimals} decimals`);Activate a New Account
Section titled “Activate a New Account”Key TVM Differences from EVM
Section titled “Key TVM Differences from EVM”| Behavior | Ethereum / EVM | TRON / TVM |
|---|---|---|
block.timestamp | Seconds since epoch | Milliseconds since epoch |
SELFDESTRUCT | EIP-6780 (Asset transfer only) | Aligned with EIP-6780 (Proposal 106) |
| Address encoding | address = 20-byte hex | address = 20-byte, but Base58 in tooling |
| Fee model | Gas (ETH per unit) | Energy (from staking) + Bandwidth (per byte) |
| Precompiles | Full EVM set | Partial — some precompiles behave differently |
tx.origin | Allowed | Allowed but same caveats as EVM |
Network Parameters
Section titled “Network Parameters”| Parameter | Value |
|---|---|
| Block time | ~3 seconds |
| Finality | ~19 blocks (~57 seconds) |
| Energy burn rate | 100 sun per Energy unit |
| Bandwidth burn rate | 1,000 Bandwidth per TRX |
| Free Bandwidth per account/day | 600 points |
| USDT transfer Energy cost | ~31,895 (base) – ~64,895 (new account); Up to 140k+ at peak congestion |
| Block reward | 8 TRX (to producing SR) |
| Vote reward | 128 TRX per block (distributed to top 127 SRs) |
Useful Links
Section titled “Useful Links”| Resource | URL |
|---|---|
| TRON Developer Docs | developers.tron.network |
| TronGrid API key | trongrid.io |
| TRONSCAN (mainnet) | tronscan.org |
| TronBox (npm) | npm install -g tronbox |
| tronweb (npm) | npm install tronweb |
| TIP repository | github.com/tronprotocol/tips |
| java-tron full node | github.com/tronprotocol/java-tron |