Security and migration
Security best practices and migration walkthroughs for porting Ethereum (Truffle / Hardhat) projects to TRON. Runtime-error diagnostic flows live in the Troubleshooting chapter.
This section covers two related topics — security and migration. Security is what to do before deploying anything; migration is how to bring an existing Ethereum project over.
In this section
- Security — TVM-specific security considerations and audit tools that work on TVM bytecode.
- Best practices — pre-deployment checklist: testing, error handling, access control, and Energy planning.
- Migrating from Ethereum — step-by-step walkthrough for porting an Ethereum (Solidity) contract to TRON. References TVM vs EVM for the underlying differences.
- Migrating a Truffle project to TronBox — project-level migration: directory layout, network config, and test framework adjustments.
Smart contract error diagnosisRuntime-error diagnosis —
OUT_OF_TIME,REVERT,OUT_OF_ENERGY, missingconstant_result, TRC-20 Energy variance, Stake 2.0 permission failures — lives in Smart contract errors in the Troubleshooting chapter.
Suggested reading order
If you have an Ethereum contract to port, start with Migrating from Ethereum for the conceptual changes, then Migrating a Truffle project to TronBox for the project setup.
If you are deploying a new contract to TRON, read Best practices before writing code, Smart contract errors before deploying, and Security before going to Mainnet.
Related resources
- TVM vs EVM — opcode and precompile differences (referenced by both migration pages)
- VM exception handling — the four exception types and how they affect cost
- FeeLimit & Energy cost —
fee_limitcalibration is a common deployment failure point - Contract verification — required for users to audit your deployed contract
Updated 4 days ago