diff --git a/crates/cast/bin/cmd/creation_args.rs b/crates/cast/bin/cmd/creation_args.rs index b2134d658aaf..ecb2b136e271 100644 --- a/crates/cast/bin/cmd/creation_args.rs +++ b/crates/cast/bin/cmd/creation_args.rs @@ -10,7 +10,7 @@ use foundry_config::Config; use super::{creation_code::fetch_creation_code, interface::fetch_abi_from_etherscan}; -/// CLI arguments for `cast creation-code`. +/// CLI arguments for `cast creation-args`. #[derive(Parser)] pub struct CreationArgsArgs { /// An Ethereum address, for which the bytecode will be fetched. @@ -46,6 +46,7 @@ impl CreationArgsArgs { } } +/// Fetches the constructor arguments values and types from the creation bytecode. async fn parse_creation_args( bytecode: Bytes, contract: Address, diff --git a/crates/cast/bin/cmd/creation_code.rs b/crates/cast/bin/cmd/creation_code.rs index 07eecca30151..4e8b4f04b135 100644 --- a/crates/cast/bin/cmd/creation_code.rs +++ b/crates/cast/bin/cmd/creation_code.rs @@ -69,6 +69,8 @@ impl CreationCodeArgs { } } +/// Parses the creation bytecode to return either the bytecode without constructor arguments or only +/// the constructor arguments. async fn parse_code_output( bytecode: Bytes, contract: Address, @@ -114,8 +116,6 @@ async fn parse_code_output( } /// Fetches the creation code of a contract from Etherscan and RPC. -/// -/// If present, constructor arguments are appended to the end of the bytecode. pub async fn fetch_creation_code( contract: Address, client: Client,