---
updatedAt: 2026-07-21T06:39:12.000Z
agentTools:
  projectIndex: https://developers.tron.network/llms.txt
---

# Smart contracts on TRON

TRON smart contracts run on the TRON Virtual Machine (TVM), which is EVM-compatible at the bytecode level. This chapter covers the concepts, development lifecycle, advanced topics, and security guidance for building on TRON.

TRON smart contracts run on the TRON Virtual Machine (TVM) — a deterministic, sandboxed runtime that is EVM-compatible at the bytecode level. Most Solidity contracts written for Ethereum compile and run on TRON with minimal changes. The differences are largely TRON-specific extensions for Bandwidth, Energy, staking, and TRC-10 tokens.

This chapter is organized into four subsections, plus a quickstart for new readers and a chapter root index (this page).

## Quickstart

<Callout icon="⚡" theme="default">
  ### **New to TRON contracts?**

  Jump to [Quickstart](https://developers.tron.network/docs/quickstart) — deploy your first contract in 10 minutes using TronBox CLI on the Shasta testnet.
</Callout>

## Chapter map

### Concepts

The foundational concepts you need before writing TRON contracts: what the TVM is, how it differs from the EVM, the Solidity language extensions specific to TRON, and the full opcode reference.

→ [Concepts](https://developers.tron.network/docs/concept)

### Development lifecycle

The end-to-end build workflow: prepare resources, write and compile, deploy, interact, and verify on TRONSCAN.

→ [Development lifecycle](https://developers.tron.network/docs/development-lifecycle)

### Advanced topics

Patterns and TRON-specific contract features: parameter encoding, contract-to-contract calls, upgradeable contracts, errors and exception handling, the Stake 2.0 Solidity SDK, event logs, and `feeLimit` cost management.

→ [Advanced Topic](https://developers.tron.network/docs/advanced-topic)

### Security and migration

Security best practices and walkthroughs for porting Ethereum (Truffle / Hardhat) projects to TRON. (Runtime-error diagnostic flows have moved to the [Troubleshooting](https://developers.tron.network/docs/faq) chapter.)

→ [Security and migration](https://developers.tron.network/docs/security-and-migration)

## Choosing your path

| If you want to...                        | Start here                                                                                                                          |
| :--------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------- |
| Deploy your first contract right away    | [Quickstart](https://developers.tron.network/docs/quickstart)                                                                                                        |
| Understand how the TVM works             | [TVM](https://developers.tron.network/docs/tvm)                                                                                                                      |
| Port an Ethereum contract to TRON        | [Migrating from Ethereum](https://developers.tron.network/docs/migrating-eth-contracts-to-tron)                                                                      |
| Estimate deployment cost                 | [Obtaining Energy](https://developers.tron.network/docs/obtaining-energy) + [FeeLimit & Energy cost](https://developers.tron.network/docs/set-feelimit)                                               |
| Audit an existing contract               | [Security](https://developers.tron.network/docs/smart-contract-security) + [Best practices](https://developers.tron.network/docs/best-practices) + [Smart contract errors](https://developers.tron.network/docs/smart-contract-errors) |
| Look up a specific opcode                | [Opcodes](https://developers.tron.network/docs/opcodes)                                                                                                              |
| Stake, vote, or delegate from a contract | [Stake 2.0 Solidity SDK reference](https://developers.tron.network/docs/stake-20-solidity-api)                                                                       |

***

## Related resources

* [Token standards](https://developers.tron.network/docs/token-standards-overview) — the standards built on top of TRON smart contracts (TRC-20, TRC-721, TRC-1155)
* [Resource model](https://developers.tron.network/docs/resource-model) — Bandwidth, Energy, and how staking works
* [Oracles on TRON](https://developers.tron.network/docs/oracle) — price feeds and off-chain data sources that contracts commonly compose with
* [TronBox documentation](https://tronbox.io/docs) — community CLI for compiling and deploying TRON contracts
* [TronWeb SDK](https://tronweb.network/docu/docs/intro) — JavaScript SDK for interacting with TRON contracts