Deploying
Deploy a compiled TRON smart contract using TronIDE, TronBox, or TronWeb. This page covers the high-level deployment paths.
Prerequisites
This page covers the high-level deployment paths for TRON smart contracts. Pick the path that matches your workflow:
- TronIDE — browser-based, shown below. Good for occasional deploys and learning.
- TronBox CLI — see Quickstart for the full walkthrough. Good for project-based and CI/CD workflows.
- HTTP API directly — see Smart contract deployment and invocation. Good for custom deployment pipelines or low-level control.
Preparation
Before deploying, ensure the following:
- TronLink wallet — install the TronLink browser extension and import or create the deployer account.
- Network selection — in TronLink, select the correct network (Mainnet, Shasta testnet, or Nile testnet). This guide uses Shasta for demonstration.
- Resources and TRX balance — the deployer needs enough Energy, or enough TRX to pay for an Energy shortfall, and enough Bandwidth or TRX for the deployment transaction. For Shasta, claim testnet TRX from the Shasta faucet.
Deploy in TronIDE
After compiling your contract (see Writing & compiling), open the DEPLOY & RUN TRANSACTIONS tab and set:
| Field | Value |
|---|---|
| ENVIRONMENT | Injected TronWeb (uses the connected TronLink account) |
| ACCOUNT | the wallet address to deploy from |
| CONTRACT | the main contract to deploy |
| Fee Limit | caller-side Energy budget cap for this deployment, in sun; it includes the deployer's available Energy at its current price and any Energy paid for by burning TRX, but excludes Bandwidth and other transaction fees (a common starting value for a TRC-20 deployment is 1,000 TRX = 1000 * 1e6) |
| TRX amount to send | only set if your constructor is payable and you want to fund the contract; otherwise 0 |
Once the parameters are set, click Deploy. TronLink will prompt you to sign the transaction.
Confirming a successful deployment
After signing, the transaction is broadcast. To confirm the deployment landed on-chain, query the transaction info by ID:
BASE_URL=https://api.shasta.trongrid.io # example — replace with any TRON node (TronGrid, third-party, or self-hosted)
curl -X POST ${BASE_URL}/walletsolidity/gettransactioninfobyid \
-d '{"value":"17532357496d30002a9344afa53be0c53187d2c2f531a96c8a4c5e73e0647521"}'Treat the deployment as successful only after the solidified receipt is available, the top-level result is not FAILED, and receipt.result is SUCCESS. Then read contract_address and use GetContract to confirm that contract bytecode is available at that address. The presence of contractResult or contract_address alone does not prove that the constructor completed successfully. For the full confirmation flow, see Transaction lifecycle.
Common deployment failuresIf
resultreturnsOUT_OF_ENERGY, increasefee_limitand try again. If you seeBAD_JUMP_DESTINATION, your bytecode may be malformed — recompile and redeploy. For other failure modes, see Smart contract errors.
After deployment
Once the contract is deployed, you can:
- Verify the source on TRONSCAN so users can audit it — see Contract verification.
- Call methods on the deployed contract from your DApp or scripts — see Interacting with contracts.
- Issue a TRC-20 token on top of your deployment — see Issuing a TRC-20 token.
Related resources
- Quickstart — TronBox CLI deployment walkthrough
- Smart contract deployment and invocation — HTTP API path
- Contract verification — verify source on TRONSCAN
- Interacting with contracts — call methods on the deployed contract
- FeeLimit & Energy cost — cost management guide
Updated 16 days ago