Skip to main contentModule creation_code
Source use super::interface::load_abi_from_file; ๐ use alloy_consensus::Transaction; ๐ use alloy_dyn_abi::DynSolType; ๐ use alloy_dyn_abi::Specifier; ๐ use alloy_json_abi::Constructor; ๐ use alloy_json_abi::JsonAbi; ๐ use alloy_primitives::Address; ๐ use alloy_primitives::Bytes; ๐ use alloy_provider::Provider; ๐ use alloy_provider::ext::TraceApi; ๐ use alloy_rpc_types::trace::parity::Action; ๐ use alloy_rpc_types::trace::parity::CreateAction; ๐ use alloy_rpc_types::trace::parity::CreateOutput; ๐ use alloy_rpc_types::trace::parity::TraceOutput; ๐ use clap::Parser; ๐ use eyre::OptionExt; ๐ use eyre::Result; ๐ use eyre::eyre; ๐ use foundry_cli::opts::EtherscanOpts; ๐ use foundry_cli::opts::RpcOpts; ๐ use foundry_cli::utils; ๐ use foundry_cli::utils::LoadConfig; ๐ use foundry_cli::utils::fetch_abi_from_etherscan; ๐ use foundry_config::Config; ๐
- CreationCodeArgs
- CLI arguments for
cast creation-code.
- constructor_args_offset ๐
- Returns the offset in
bytecode at which the ABI-encoded constructor arguments start. - constructor_with_args ๐
- Returns the constructor of
abi, failing if there is none or it takes no arguments. - fetch_creation_code ๐
- Connects to the configured RPC, pins
config.chain to it, and fetches the creation code of
contract using its Etherscan creation transaction. - load_abi ๐
- Loads the ABI of
contract from abi_path, or from Etherscan when no path is given. - parse_code_output ๐
- Parses the creation bytecode and returns one of the following: