Skip to main content

Module creation_code

Module creation_code 

Source

Re-exportsยง

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

Structsยง

CreationCodeArgs
CLI arguments for cast creation-code.

Functionsยง

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: