Expand description
§tndrly
Unofficial Rust client for the Tenderly API.
Provides access to:
- Simulation API - Simulate transactions without broadcasting
- Virtual
TestNetsAPI - Create isolated blockchain environments - Alerts API - Monitor on-chain activity with notifications
- Contract API - Manage and verify smart contracts
- Web3 Actions API - Deploy serverless functions
- Wallets API - Track and monitor wallet addresses
§Quick Start
ⓘ
use tndrly::{Client, Config};
use tndrly::simulation::SimulationRequest;
#[tokio::main]
async fn main() -> Result<(), tndrly::Error> {
// Create client from environment variables
// Requires: TENDERLY_ACCESS_KEY, TENDERLY_ACCOUNT, TENDERLY_PROJECT
let client = Client::from_env()?;
// Or configure manually
let client = Client::new(Config::new(
"your-access-key",
"your-account",
"your-project"
))?;
// Simulate a transaction
let request = SimulationRequest::new(
"0x0000000000000000000000000000000000000000",
"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"0x70a08231000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa96045"
);
let result = client.simulation().simulate(&request).await?;
println!("Gas used: {}", result.simulation.gas_used);
Ok(())
}§Environment Variables
The client can be configured via environment variables:
TENDERLY_ACCESS_KEY- Your Tenderly API access keyTENDERLY_ACCOUNT- Your account slug (username or organization)TENDERLY_PROJECT- Your project slug
§API Modules
All API modules are always available:
simulation- Transaction simulationvnets- VirtualTestNetsalerts- Alert monitoringcontracts- Contract managementactions- Web3 Actionswallets- Wallet monitoringdelivery_channels- Notification delivery channelsnetworks- Supported networks
Re-exports§
pub use actions::ActionTrigger;pub use actions::CreateActionRequest;pub use alerts::AlertType;pub use alerts::CreateAlertRequest;pub use contracts::AddContractRequest;pub use contracts::Contract;pub use simulation::SimulationRequest;pub use simulation::SimulationResponse;pub use simulation::SimulationType;pub use vnets::CreateVNetRequest;pub use vnets::VNet;pub use wallets::AddWalletRequest;pub use wallets::AddWalletResponse;pub use wallets::WalletOnNetwork;
Modules§
- actions
- Web3 Actions API
- alerts
- Alerts API
- contracts
- Contract API
- delivery_
channels - Delivery Channels API
- networks
- Networks API
- simulation
- Transaction simulation API
- utils
- Utility functions for tndrly
- vnets
- Virtual
TestNetsAPI - wallets
- Wallet API
Structs§
- Client
- The main Tenderly API client
- Config
- Configuration for the Tenderly client
- Retry
Config - Configuration for retry behavior
- Retry
Error - Error wrapper that includes retry information
Constants§
- API_
BASE_ URL - Base URL for the Tenderly API
Traits§
- Retryable
Error - Determines if an error should be retried
Functions§
- with_
retry - Execute an async operation with retries
- with_
simple_ retry - Simple retry wrapper for operations that return Result with any error type