Expand description
Implementations of Scripting cheatcodes.
Re-exportsยง
use crate::Cheatcode;๐use crate::CheatcodesCore;๐use crate::CheatsCtxt;๐use crate::Result;๐use crate::evm::journaled_account;๐use alloy_consensus::SidecarBuilder;๐use alloy_consensus::SimpleCoder;๐use alloy_primitives::Address;๐use alloy_primitives::B256;๐use alloy_primitives::U256;๐use alloy_rpc_types::Authorization;๐use alloy_signer::SignerSync;๐use alloy_signer_local::PrivateKeySigner;๐use alloy_sol_types::SolValue;๐use foundry_evm_core::evm::FoundryEvmNetwork;๐use foundry_wallets::WalletSigner;๐use foundry_wallets::wallet_multi::MultiWallet;๐use parking_lot::Mutex;๐use revm::bytecode::Bytecode;๐use revm::context::ContextTr;๐use revm::context::JournalTr;๐use revm::context_interface::transaction::SignedAuthorization;๐use revm::primitives::KECCAK_EMPTY;๐use revm::primitives::hardfork::SpecId;๐use std::sync::Arc;๐use crate::Vm::*;๐
Structsยง
- Broadcast
- Wallets
- Cloneable wrapper around
WalletsInner. - Wallets
Inner - Contains context for wallet management.
Functionsยง
- attach_
delegation ๐ - Helper function to attach an EIP-7702 delegation.
- broadcast ๐
- Sets up broadcasting from a script using
new_originas the sender. - broadcast_
key ๐ - Sets up broadcasting from a script with the sender derived from
private_key. Adds this private key tostateโswalletsvector to later be used for signing if broadcast is successful. - next_
delegation_ ๐nonce - Returns the next valid nonce for a delegation, considering existing active delegations.
- sign_
delegation ๐ - Helper function to sign and attach (if needed) an EIP-7702 delegation. Uses the provided nonce, otherwise retrieves and increments the nonce of the EOA.
- write_
delegation ๐