Skip to content

Commit

Permalink
Update comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pawurb committed Oct 10, 2024
1 parent de63657 commit c224c30
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion crates/cast/bin/cmd/creation_args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions crates/cast/bin/cmd/creation_code.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit c224c30

Please sign in to comment.