Loading...
Loading...
Compare original and translation side by side
| Operation | Energy Needed | TRX Burned (no staking) | With Staked Energy |
|---|---|---|---|
| TRX transfer | 0 | 0 (free bandwidth) | 0 |
| USDT transfer | ~65,000 | ~13-27 TRX | 0 TRX |
| SunSwap V2 swap | ~65,000-200,000 | ~13-40 TRX | 0 TRX |
| Contract deployment | ~200,000-1,000,000+ | ~40-200+ TRX | 0 TRX |
| Approve token | ~30,000 | ~6-12 TRX | 0 TRX |
| 操作类型 | 所需Energy | 消耗TRX(未质押) | 已质押Energy时 |
|---|---|---|---|
| TRX转账 | 0 | 0(使用免费Bandwidth) | 0 |
| USDT转账 | ~65,000 | ~13-27 TRX | 0 TRX |
| SunSwap V2兑换 | ~65,000-200,000 | ~13-40 TRX | 0 TRX |
| 合约部署 | ~200,000-1,000,000+ | ~40-200+ TRX | 0 TRX |
| 代币授权 | ~30,000 | ~6-12 TRX | 0 TRX |
node scripts/tron_api.mjs resource-info --address <TRON_ADDRESS>node scripts/tron_api.mjs resource-info --address <TRON_ADDRESS>node scripts/tron_api.mjs estimate-energy \
--contract <CONTRACT_ADDRESS> \
--function <FUNCTION_SIGNATURE> \
--params <PARAMS> \
--caller <CALLER_ADDRESS>undefinednode scripts/tron_api.mjs estimate-energy \
--contract <CONTRACT_ADDRESS> \
--function <FUNCTION_SIGNATURE> \
--params <PARAMS> \
--caller <CALLER_ADDRESS>undefined
Returns: estimated Energy consumption and equivalent TRX cost.
返回内容:估算的Energy消耗量及对应的TRX成本。node scripts/tron_api.mjs estimate-bandwidth --tx-size <BYTES>node scripts/tron_api.mjs estimate-bandwidth --tx-size <BYTES>node scripts/tron_api.mjs energy-pricenode scripts/tron_api.mjs energy-pricenode scripts/tron_api.mjs energy-rental --amount <ENERGY_NEEDED>node scripts/tron_api.mjs energy-rental --amount <ENERGY_NEEDED>node scripts/tron_api.mjs optimize-cost --address <TRON_ADDRESS>node scripts/tron_api.mjs optimize-cost --address <TRON_ADDRESS>User wants to do a smart contract operation?
├── Check energy: resource-info --address <addr>
├── Has enough energy? → Proceed
└── Not enough energy?
├── Frequent user (daily TRC-20 transfers)?
│ └── Recommend: Freeze TRX for Energy (tron-staking)
├── Occasional user (1-2 tx/week)?
│ └── Recommend: Rent energy from marketplace
└── One-time user?
└── Recommend: Accept TRX burn (simplest)用户想要执行智能合约操作?
├── 检查Energy:resource-info --address <addr>
├── 拥有足够Energy? → 继续执行
└── Energy不足?
├── 高频用户(每日进行TRC-20转账)?
│ └── 建议:冻结TRX获取Energy(使用tron-staking技能)
├── 偶尔使用用户(每周1-2笔交易)?
│ └── 建议:从市场租赁能源
└── 一次性用户?
└── 建议:接受燃烧TRX(操作最简单)