Skip to main content

Module fs

Module fs 

Source
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::B256; ๐Ÿ”’
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 evm2::EvmFeatures; ๐Ÿ”’
use evm2::bytecode::Bytecode; ๐Ÿ”’
use evm2::interpreter::Host; ๐Ÿ”’
use evm2::interpreter::MessageKind; ๐Ÿ”’
use evm2::interpreter::derive_create_destination; ๐Ÿ”’
use evm2::version::GasId; ๐Ÿ”’
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::evm::FoundryEvmNetwork; ๐Ÿ”’
use foundry_evm_core::evm::MessageFor; ๐Ÿ”’
use foundry_evm_traces::CallKind; ๐Ÿ”’
use semver::Version; ๐Ÿ”’
use std::io::BufRead; ๐Ÿ”’
use std::io::BufReader; ๐Ÿ”’
use std::mem; ๐Ÿ”’
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ยง

ParsedArtifactPath ๐Ÿ”’
Parsed artifact path components.

Enumsยง

ArtifactSource ๐Ÿ”’
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 ๐Ÿ”’