Skip to main content

Module tempo

Module tempo 

Source
Expand description

Tempo transaction helpers used by Cast-facing commands.

Re-exportsΒ§

use crate::tx::fill_transaction_gas_fees; πŸ”’
use alloy_network::Ethereum; πŸ”’
use alloy_network::Network; πŸ”’
use alloy_network::TransactionBuilder; πŸ”’
use alloy_primitives::Address; πŸ”’
use alloy_primitives::B256; πŸ”’
use alloy_provider::Provider; πŸ”’
use alloy_rpc_client::BuiltInConnectionString; πŸ”’
use alloy_transport::BoxTransport; πŸ”’
use alloy_transport::TransportConnect; πŸ”’
use alloy_transport::TransportError; πŸ”’
use eyre::Result; πŸ”’
use foundry_cli::json::print_json_success; πŸ”’
use foundry_cli::opts::EthereumOpts; πŸ”’
use foundry_cli::opts::TempoOpts; πŸ”’
use foundry_cli::utils::LoadConfig; πŸ”’
use foundry_cli::utils::get_chain; πŸ”’
use foundry_common::FoundryTransactionBuilder; πŸ”’
use foundry_common::provider::ProviderBuilder; πŸ”’
use foundry_common::provider::RetryProvider; πŸ”’
use foundry_common::shell; πŸ”’
use foundry_common::tempo::is_tempo_hardfork_active; πŸ”’
use foundry_common::tempo::maybe_print_fee_token; πŸ”’
use foundry_common::tempo::resolve_and_set_fee_token; πŸ”’
use foundry_config::Chain; πŸ”’
use foundry_config::Config; πŸ”’
use foundry_config::Eip1559FeeEstimatePreset; πŸ”’
use foundry_evm::hardfork::TempoHardfork; πŸ”’
use foundry_evm_networks::NetworkVariant; πŸ”’
use foundry_wallets::TempoAccountsWallet; πŸ”’
use foundry_wallets::WalletOpts; πŸ”’
use foundry_wallets::WalletSigner; πŸ”’
use serde_json::Value; πŸ”’
use std::str::FromStr; πŸ”’
use tempo_alloy::TempoNetwork; πŸ”’
use tempo_alloy::rpc::TempoTransactionRequest; πŸ”’
use tempo_alloy::transport::RelayConnector; πŸ”’
use tempo_alloy::transport::SponsorshipMode; πŸ”’

StructsΒ§

ExistingTransportConnector πŸ”’
Connector for reusing an already-configured RPC transport.
TempoSponsor
Gas sponsor configuration for Tempo fee-payer signatures.

FunctionsΒ§

apply_fee_payment πŸ”’
Attaches the fee payment to a built transaction: the sponsor signature when a sponsor is configured, otherwise the resolved fee token for payer (printing it when it was resolved).
ensure_session_not_browser πŸ”’
ensure_tempo_precompile_active πŸ”’
Fails early with requirement when a Tempo precompile is not active yet: a pre-fork call would succeed as a silent no-op instead of reverting. Prefers the hardfork query and falls back to checking the precompile’s code when the RPC lacks the method.
fill_access_key_transaction πŸ”’
Fills a Tempo transaction request that was built outside crate::tx::CastTxBuilder before access-key signing.
maybe_attach_sponsor πŸ”’
Resolves the sponsored fee token and attaches the sponsor signature preview for payer when a sponsor is configured.
print_expires πŸ”’
print_payload πŸ”’
Prints a command result: the raw payload in JSON mode, the human rendering otherwise.
require_hardfork πŸ”’
Fails with message unless hardfork is active on the RPC.
resolve_and_print_fee_token πŸ”’
Resolves and sets the fee token paid by fee_payer, printing it when it was resolved.
resolve_session_or_wallet_signer πŸ”’
Resolves a command signer, preferring an explicitly selected Tempo session.
resolve_transaction_network_and_signer πŸ”’
Resolves the transaction network and any configured signer without letting an unrelated Tempo Accounts store change ordinary Ethereum commands.
sponsor_hash πŸ”’
Computes the sponsor hash of a built transaction, resolving the fee token for fee_payer first when one is configured. Used by --tempo.print-sponsor-hash.
sponsor_relay_connector πŸ”’
tempo_provider πŸ”’
Loads the config for opts and builds a Tempo provider from it.