Expand description
Implementations of Filesystem cheatcodes.
Re-exportsยง
use super::string::parse;๐use crate::Cheatcode;๐use crate::CheatcodesCore;๐use crate::CheatcodesExecutor;๐use crate::CheatsCtxt;๐use crate::Result;๐use crate::inspector::exec_create;๐use alloy_dyn_abi::DynSolType;๐use alloy_json_abi::ContractObject;๐use alloy_network::AnyNetwork;๐use alloy_network::Network;๐use alloy_network::ReceiptResponse;๐use alloy_primitives::Bytes;๐use alloy_primitives::FixedBytes;๐use alloy_primitives::U256;๐use alloy_primitives::hex;๐use alloy_primitives::hex;๐use alloy_primitives::map::Entry;๐use alloy_sol_types::SolValue;๐use dialoguer::Input;๐use dialoguer::Password;๐use forge_script_sequence::BroadcastReader;๐use forge_script_sequence::TransactionWithMetadata;๐use foundry_common::contracts::ContractData;๐use foundry_common::fs;๐use foundry_config::fs_permissions::FsAccessKind;๐use foundry_evm_core::FoundryTransaction;๐use foundry_evm_core::env::FoundryContextExt;๐use foundry_evm_core::evm::FoundryEvmNetwork;๐use foundry_evm_traces::CallKind;๐use revm::context::Cfg;๐use revm::context::ContextTr;๐use revm::context::CreateScheme;๐use revm::context::JournalTr;๐use revm::handler::handle_reservoir_remaining_gas;๐use revm::interpreter::CreateInputs;๐use revm::primitives::hardfork::SpecId;๐use semver::Version;๐use std::io::BufRead;๐use std::io::BufReader;๐use std::path::Path;๐use std::path::PathBuf;๐use std::process::Command;๐use std::sync::mpsc;๐use std::thread;๐use std::time::SystemTime;๐use std::time::UNIX_EPOCH;๐use walkdir::WalkDir;๐use crate::Vm::*;๐
Structsยง
- Parsed
Artifact ๐Path - Parsed artifact path components.
Enumsยง
- Artifact
Source ๐ - Resolved location of an artifact referenced by a cheatcode path argument.
Functionsยง
- decode_
ffi_ ๐stdout - deploy_
code ๐ - Helper function to deploy contract from artifact code. Uses CREATE2 scheme if salt specified.
- ffi ๐
- ffi_
command ๐ - ffi_
stdout ๐ - get_
artifact_ ๐code - Returns the bytecode from a JSON artifact file.
- get_
artifact_ ๐source - Resolves a cheatcode artifact reference to its source.
- latest_
broadcast ๐ - map_
broadcast_ ๐tx_ type - parse_
artifact_ ๐path - Parses an artifact path string into its components.
- parse_
broadcast_ ๐results - prompt ๐
- prompt_
input ๐ - prompt_
password ๐ - read_
artifact_ ๐file - Reads an artifact JSON file, mapping I/O errors to a helpful message when the lookup fell through the in-memory artifacts list.
- read_
dir ๐ - write_
file ๐