Skip to content

Commit febd245

Browse files
yipu3yash-atreyaDaniPopes
authored
chore: clearer error message when function signature does not contain parentheses (#9478)
* chore: clearer error message when function signature does not contain parentheses * Update crates/cli/src/utils/abi.rs Co-authored-by: Yash Atreya <[email protected]> * info log * fmt --------- Co-authored-by: Yash Atreya <[email protected]> Co-authored-by: DaniPopes <[email protected]>
1 parent 76d6084 commit febd245

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

crates/cli/src/utils/abi.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,11 @@ pub async fn parse_function_args<P: Provider<AnyNetwork>>(
4848
// a regular function signature with parentheses
4949
get_func(sig)?
5050
} else {
51+
info!(
52+
"function signature does not contain parentheses, fetching function data from Etherscan"
53+
);
5154
let etherscan_api_key = etherscan_api_key.ok_or_eyre(
52-
"If you wish to fetch function data from Etherscan, please provide an Etherscan API key.",
55+
"Function signature does not contain parentheses. If you wish to fetch function data from Etherscan, please provide an API key.",
5356
)?;
5457
let to = to.ok_or_eyre("A 'to' address must be provided to fetch function data.")?;
5558
get_func_etherscan(sig, to, &args, chain, etherscan_api_key, etherscan_api_version).await?

0 commit comments

Comments
 (0)