Skip to content
Logo

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 a Trx, 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() and freeze_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 reuses alloy-primitives and alloy-sol-types directly. TRC20 is the EVM ERC20 ABI, so token bindings are generated by alloy's sol! macro.

How TRON differs from Ethereum

If you are coming from alloy or another Ethereum library, a few TRON-specific concepts are worth knowing:

ConceptEthereumTRON
Address format0x-prefixed 20 bytes0x41 prefix + 20 bytes, shown as base58check T...
Native unitwei (1 ETH = 10^18 wei)sun (1 TRX = 10^6 sun)
Gaspaid in ETHbandwidth + energy, obtained by staking TRX
Fee modelgas price × gasfee_limit cap; staked resources first, then burned TRX
Transaction idkeccak256 of the txsha256 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.