Skip to content

fix(config): respect custom Etherscan URL in cast/forge commands#14319

Open
FredPhilipy wants to merge 3 commits intofoundry-rs:masterfrom
FredPhilipy:etherscan-url
Open

fix(config): respect custom Etherscan URL in cast/forge commands#14319
FredPhilipy wants to merge 3 commits intofoundry-rs:masterfrom
FredPhilipy:etherscan-url

Conversation

@FredPhilipy
Copy link
Copy Markdown
Contributor

Several commands (cast storage, cast creation-code, cast interface, forge clone) were bypassing the user's custom Etherscan URL configuration in foundry.toml by using Client::new(chain, api_key) directly. Changed these to use get_etherscan_config_with_chain() + into_client() pattern, consistent with the fix in verify module. This enables these commands to work with private chains and custom block explorers.

Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your PR, just a smol nit.

Clippy+fmt :)

Comment thread crates/common/src/abi.rs Outdated
@FredPhilipy
Copy link
Copy Markdown
Contributor Author

Thanks for your PR, just a smol nit.

Clippy+fmt :)

Thanks! fixed.

mablr
mablr previously approved these changes Apr 15, 2026
Copy link
Copy Markdown
Collaborator

@mablr mablr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sgtm 👍 pending another review.

(you just need to remove foundry-block-explorers dep in foundry-cli to make clippy happy)

@FredPhilipy
Copy link
Copy Markdown
Contributor Author

sgtm 👍 pending another review.

(you just need to remove foundry-block-explorers dep in foundry-cli to make clippy happy)

Yeah just realized it, fixed already.

@FredPhilipy FredPhilipy requested a review from mablr April 15, 2026 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

2 participants