tronz
tronz connects applications to the TRON network.
An idiomatic, async-first Rust SDK for TRON — inspired by alloy.
Installation
Add the tronz crate with the full feature flag:
Or in your Cargo.toml:
= { = "0.4", = ["full"] }
A full list of available features can be found in the
tronz crate's Cargo.toml.
Examples
Querying the latest block
use ;
# async
Sending TRX
use ;
# async
Querying solidified (irreversible) state
SolidityProvider targets a TRON SolidityNode (WalletSolidity), which only
serves state confirmed by 2/3+ of the super representatives. It is read-only by
construction — no signer, no broadcast — and wait_for_success blocks until a
transaction has solidified and its execution succeeded.
use ;
# async
For more examples, see the examples/ directory.
Crates
| Crate | Description |
|---|---|
tronz |
Meta-crate re-exporting all sub-crates |
tronz-abi |
Native TRON ABI metadata and optional Alloy JSON ABI conversion |
tronz-primitives |
Address, Trx, ResourceCode, signatures |
tronz-signer |
TronSigner trait and LocalSigner implementation |
tronz-provider |
FullNode and SolidityNode transports/providers, fillers, and domain types |
tronz-contract |
TRC20 / TRC721 bindings, deployment, calls, and event filters |
tronz-sol-macro |
tron_sol! procedural macro for provider-bound contract bindings |
tronz-signer-aws |
AWS KMS signer (signer-aws feature) |
Supported Rust Versions (MSRV)
The minimum supported Rust version is 1.91.1.
Contributing
See CONTRIBUTING.md.
License
Licensed under either of Apache License, Version 2.0 or MIT license at your option.