Skip to content
Logo

Build on TRON,without protocol complexity.

One idiomatic Rust API for accounts, transactions, staking, contracts, tokens, and solidified chain state.
Quick start
cargo add tronz
Connect to TronGrid or any TRON gRPC endpoint. Add a signer when you are ready to transact.
release0.5.1
transportgRPC
rust1.91.1

At a glance

Start with a read-only provider. Add a signer when you need transactions, then use the same provider for typed contract calls.

use tronz::{ProviderBuilder, TronProvider, TRONGRID_MAINNET};
 
#[tokio::main]
async fn main() -> anyhow::Result<()> {
    // Mainnet is safe here because this example only reads chain state.
    let provider = ProviderBuilder::new()
        .connect_grpc(TRONGRID_MAINNET)
        .await?;
 
    // Read the latest block.
    let block = provider.get_now_block().await?;
    println!("block {} @ {}ms", block.number, block.timestamp);
 
    Ok(())
}

Features

TRON-native

Protocol primitives

First-class types for Address, Trx, resources, permissions, and receipts.
Modular

Composable providers

Layer in signers, fillers, middleware, retries, and failover without rewriting application code.
Lazy

Predictable transactions

Build and inspect requests locally; network I/O begins only when you call .send().
Type-safe

Contracts and tokens

Use TRC20, TRC721, JSON ABI, and tron_sol! bindings with alloy-compatible types.
Full coverage

Staking and governance

Freeze, delegate, vote, claim rewards, manage witnesses, and submit proposals.
Finalized

Solidified state

Read irreversible chain state through SolidityProvider.

Sponsors

Thanks to the organizations supporting the ongoing development and maintenance of tronz.

Community