Skip to main content

Module utils

Module utils 

Source

Re-exportsยง

use crate::bytecode::VerifyBytecodeArgs; ๐Ÿ”’
use crate::types::VerificationType; ๐Ÿ”’
use alloy_dyn_abi::DynSolValue; ๐Ÿ”’
use alloy_dyn_abi::JsonAbiExt; ๐Ÿ”’
use alloy_network::AnyNetwork; ๐Ÿ”’
use alloy_network::AnyRpcBlock; ๐Ÿ”’
use alloy_primitives::Address; ๐Ÿ”’
use alloy_primitives::B256; ๐Ÿ”’
use alloy_primitives::Bytes; ๐Ÿ”’
use alloy_primitives::ChainId; ๐Ÿ”’
use alloy_primitives::TxKind; ๐Ÿ”’
use alloy_primitives::U256; ๐Ÿ”’
use alloy_provider::Provider; ๐Ÿ”’
use alloy_provider::network::BlockResponse; ๐Ÿ”’
use alloy_rpc_types::BlockId; ๐Ÿ”’
use clap::ValueEnum; ๐Ÿ”’
use eyre::OptionExt; ๐Ÿ”’
use eyre::Result; ๐Ÿ”’
use foundry_block_explorers::contract::ContractCreationData; ๐Ÿ”’
use foundry_block_explorers::contract::ContractMetadata; ๐Ÿ”’
use foundry_block_explorers::contract::Metadata; ๐Ÿ”’
use foundry_block_explorers::errors::EtherscanError; ๐Ÿ”’
use foundry_block_explorers::utils::lookup_compiler_version; ๐Ÿ”’
use foundry_cli::utils::LoadConfig; ๐Ÿ”’
use foundry_common::abi::encode_args; ๐Ÿ”’
use foundry_common::compile::ProjectCompiler; ๐Ÿ”’
use foundry_common::find_matching_contract_artifact; ๐Ÿ”’
use foundry_common::ignore_metadata_hash; ๐Ÿ”’
use foundry_common::shell; ๐Ÿ”’
use foundry_compilers::Graph; ๐Ÿ”’
use foundry_compilers::artifacts::BytecodeHash; ๐Ÿ”’
use foundry_compilers::artifacts::CompactContractBytecode; ๐Ÿ”’
use foundry_compilers::compilers::ParsedSource; ๐Ÿ”’
use foundry_compilers::multi::MultiCompilerLanguage; ๐Ÿ”’
use foundry_compilers::multi::MultiCompilerParser; ๐Ÿ”’
use foundry_compilers::utils::canonicalize; ๐Ÿ”’
use foundry_config::Config; ๐Ÿ”’
use foundry_evm::constants::DEFAULT_CREATE2_DEPLOYER; ๐Ÿ”’
use foundry_evm::core::FoundryBlock as _; ๐Ÿ”’
use foundry_evm::core::decode::RevertDecoder; ๐Ÿ”’
use foundry_evm::core::evm::BlockEnvFor; ๐Ÿ”’
use foundry_evm::core::evm::ChainFor; ๐Ÿ”’
use foundry_evm::core::evm::EvmEnvFor; ๐Ÿ”’
use foundry_evm::core::evm::FoundryEvmNetwork; ๐Ÿ”’
use foundry_evm::core::evm::TxEnvFor; ๐Ÿ”’
use foundry_evm::executors::ExecutorBuilder; ๐Ÿ”’
use foundry_evm::executors::TracingExecutor; ๐Ÿ”’
use foundry_evm::opts::EvmOpts; ๐Ÿ”’
use foundry_evm::traces::TraceRequirements; ๐Ÿ”’
use foundry_evm::utils::apply_chain_and_block_specific_env_changes_for_chain; ๐Ÿ”’
use foundry_evm::utils::block_env_from_header; ๐Ÿ”’
use foundry_evm_networks::NetworkConfigs; ๐Ÿ”’
use reqwest::Url; ๐Ÿ”’
use revm::bytecode::Bytecode; ๐Ÿ”’
use revm::context::Block as _; ๐Ÿ”’
use revm::context::Transaction as _; ๐Ÿ”’
use revm::database::Database; ๐Ÿ”’
use semver::BuildMetadata; ๐Ÿ”’
use semver::Version; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Deserialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use serde::Serialize; ๐Ÿ”’
use yansi::Paint; ๐Ÿ”’

Structsยง

JsonResult

Enumsยง

BytecodeType
Enum to represent the type of bytecode being verified

Functionsยง

build_project
check_and_encode_args
check_args_len
check_explorer_args
configure_env_block
deploy_contract
ensure_solc_build_metadata
Given any solc Version return a Version with build metadata
find_mismatch_in_settings ๐Ÿ”’
get_runtime_codes
get_tracing_executor
is_host_only
Returns true if the URL only consists of host.
is_partial_match ๐Ÿ”’
load_fork_config_and_evm_opts
match_bytecodes
maybe_predeploy_contract
print_result
try_extract_and_compare_bytecode ๐Ÿ”’
validate_encoded_constructor_args
wrap_verifier_url_error
Wraps a failed verification error with guidance when --verifier-url looks misconfigured for the Etherscan provider. Returns err untouched when no hint applies.