Why tronz
tronz is an idiomatic, async-first Rust SDK for the TRON network. Its design is directly inspired by alloy, the modern Rust toolkit for Ethereum — tronz brings the same ergonomics to TRON.
Design goals
- Idiomatic Rust. Strong types over stringly-typed JSON. A TRON address is
an
Address, a TRX amount is aTrx, and the compiler keeps you honest. - Async-first. Every network call returns a
Future. tronz speaks gRPC to TRON nodes directly, rather than wrapping the HTTP/JSON API. - Composable providers. Like alloy's
ProviderBuilder, you assemble a provider from fillers and an optional signer, then bind a transport. - Lazy builders. Operations such as
send_trx()andfreeze_balance()return builders that perform no I/O until you call.send(). - Reuse, don't reinvent. TRON shares Ethereum's
U256, ABI encoding, and keccak/secp256k1 cryptography, so tronz reusesalloy-primitivesandalloy-sol-typesdirectly. TRC20 is the EVM ERC20 ABI, so token bindings are generated by alloy'ssol!macro.
How TRON differs from Ethereum
If you are coming from alloy or another Ethereum library, a few TRON-specific concepts are worth knowing:
| Concept | Ethereum | TRON |
|---|---|---|
| Address format | 0x-prefixed 20 bytes | 0x41 prefix + 20 bytes, shown as base58check T... |
| Native unit | wei (1 ETH = 10^18 wei) | sun (1 TRX = 10^6 sun) |
| Gas | paid in ETH | bandwidth + energy, obtained by staking TRX |
| Fee model | gas price × gas | fee_limit cap; staked resources first, then burned TRX |
| Transaction id | keccak256 of the tx | sha256 of the protobuf-encoded raw tx |
tronz models all of these explicitly — see Primitives and Staking.
When to use tronz
Use tronz when you want to interact with TRON from Rust: querying chain state, sending TRX, staking for resources, or calling TRC20 / smart contracts — with the type-safety and performance of the alloy ecosystem.
