Expand description
Tempo configurable account senders whose owners approve on separate machines.
When the local owner keys of a configurable account sender do not reach its threshold,
--broadcast first simulates the remaining operations in order up to the account’s last
transaction and fixes the gas limit of each of the account’s transactions. It then sends the
operations before the account’s first transaction, approves the account’s remaining
transactions with the local owners and saves them as AwaitingOwners in the sequence
instead of sending them. The other owners sign the printed digests elsewhere. --resume adds
the approvals given with --tempo.owner-signature and, once every saved transaction reaches
the threshold, the broadcast sends them in order with 0x05 signatures built from the
approvals.
Re-exports§
use crate::broadcast::SendTransactionKind;🔒use crate::broadcast::convert_tempo_aa_create;🔒use crate::broadcast::estimate_gas;🔒use crate::broadcast::remaining_operation_indices;🔒use crate::sequence::ScriptSequenceKind;🔒use alloy_consensus::BlockHeader;🔒use alloy_consensus::SignableTransaction;🔒use alloy_eips::BlockNumberOrTag;🔒use alloy_eips::eip2718::Decodable2718;🔒use alloy_eips::eip2718::Encodable2718;🔒use alloy_network::BlockResponse;🔒use alloy_network::Network;🔒use alloy_network::NetworkTransactionBuilder;🔒use alloy_network::TransactionBuilder;🔒use alloy_primitives::Address;🔒use alloy_primitives::B256;🔒use alloy_primitives::Bytes;🔒use alloy_primitives::TxHash;🔒use alloy_primitives::map::HashMap;🔒use alloy_provider::Provider;🔒use alloy_provider::RootProvider;🔒use alloy_rpc_types::simulate::SimBlock;🔒use alloy_rpc_types::simulate::SimCallResult;🔒use alloy_rpc_types::simulate::SimulatePayload;🔒use alloy_rpc_types::simulate::SimulatedBlock;🔒use alloy_signer::Signature;🔒use eyre::Context;🔒use eyre::ContextCompat;🔒use eyre::Result;🔒use eyre::bail;🔒use forge_script_sequence::AwaitingOwners;🔒use forge_script_sequence::ScriptSequence;🔒use foundry_cli::utils::apply_gas_estimate_multiplier;🔒use foundry_common::FoundryTransactionBuilder;🔒use foundry_common::provider::ProviderBuilder;🔒use foundry_common::shell;🔒use foundry_common::tempo::configurable_account::ConfigurableAccountOwnerKey;🔒use foundry_common::tempo::configurable_account::combine_approvals;🔒use foundry_common::tempo::configurable_account::decode_unsigned_tx;🔒use foundry_common::tempo::configurable_account::has_config;🔒use foundry_common::tempo::configurable_account::parse_owner_signature;🔒use foundry_common::tempo::configurable_account::prepare_request;🔒use foundry_common::tempo::configurable_account::reaches_threshold;🔒use foundry_common::tempo::configurable_account::simulation_spec;🔒use foundry_common::tempo::configurable_account::updates_config;🔒use foundry_common::tempo::resolve_and_set_fee_token;🔒use foundry_config::Config;🔒use itertools::Itertools;🔒use serde_json::Value;🔒use std::collections::BTreeMap;🔒use std::collections::BTreeSet;🔒use tempo_alloy::TempoNetwork;🔒use tempo_primitives::TempoTxEnvelope;🔒use tempo_primitives::transaction::ConfigurableAccountConfig;🔒use tempo_primitives::transaction::PrimitiveSignature;🔒use tempo_primitives::transaction::TempoSignature;🔒use tempo_primitives::transaction::TempoTransaction;🔒use tempo_primitives::transaction::configurable_account_digest;🔒
Structs§
- Awaiting 🔒
- A transaction of a configurable account with offline owners whose gas limit is fixed, to be saved for its owners once the operations before it are sent.
- Offline
Owners - A configurable account sender whose local owner keys do not form a quorum that Tempo accepts, so that the other owners approve its transactions elsewhere.
Constants§
- GAS_
CAP_ 🔒HINT - How to raise a node’s limits on one
eth_simulateV1request. - MAX_
SIMULATED_ 🔒BLOCKS - The most blocks a node simulates in one
eth_simulateV1request.
Functions§
- approved_
payload 🔒 - Returns the payload of operation
indexofdeploymentsigned with its owners’ approvals, and its hash, when it was saved for its owners. The signature is rebuilt from the saved approvals, ascombine_approvalsselects them the same way every time. - assemble 🔒
- Adds the owner approvals in
signaturesto the transactions awaiting their owners, and checks that every one of them that was not sent yet reaches its threshold and can still be sent. The broadcast then sends them in order, signed with the approvals, recording each as a submission attempt only then. - awaiting 🔒
- The transactions with offline owners among
transactions, with their prepared requests. - awaits_
approvals 🔒 - Tells whether a saved transaction’s approvals do not reach its threshold yet.
- decode_
entry 🔒 - Decodes a saved transaction, its configuration and the owners’ approvals, and checks its digest.
- describe 🔒
- Describes the transactions awaiting owner approvals: for each, its digest and the owners that approved it, then how the other owners sign and how to send the transactions.
- export 🔒
- Saves the transactions of configurable accounts with offline owners that
preparefixed, approved by their local owners, for the other owners to approve instead of sending them. Other operations are left for--resume. - least_
gas_ 🔒limit - Returns the least gas limit with which the last of
requestssucceeds after the ones before it, found aseth_estimateGasdoes and raised bymultiplierpercent, up tocap. The last request fails with its current gas limit. - prepare 🔒
- Fixes the gas limits of the transactions of configurable accounts with offline owners, before anything is sent.
- report 🔒
- Prints the transactions awaiting owner approvals and how to approve and send them.
- simulate 🔒
- Simulates
requestsin order on top ofblock, so that each runs on the state the ones before it leave: all in one block, or each in a block of its own whenper_callis set. - void_
reason 🔒 - Tells why a saved transaction can no longer be sent with its owners’ approvals: its
account’s configuration or nonce, its deadline or the base fee changed on chain.
next_nonceis the account’s next nonce, orNonewhen its configuration changed, andlatestthe latest block, read after them.