Skip to content

Commit

Permalink
chore: bump block explorers (#6709)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jan 5, 2024
1 parent 8bd27fb commit 398c12c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions crates/forge/bin/cmd/verify/etherscan/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,8 +268,7 @@ impl EtherscanVerificationProvider {

let etherscan_api_url = verifier_url
.or_else(|| etherscan_config.as_ref().map(|c| c.api_url.as_str()))
.map(str::to_owned)
.map(|url| if url.ends_with('?') { url } else { url + "?" });
.map(str::to_owned);

let api_url = etherscan_api_url.as_deref();
let base_url = etherscan_config
Expand All @@ -283,6 +282,8 @@ impl EtherscanVerificationProvider {
let mut builder = Client::builder();

builder = if let Some(api_url) = api_url {
// we don't want any trailing slashes because this can cause cloudflare issues: <https://github.com/foundry-rs/foundry/pull/6079>
let api_url = api_url.trim_end_matches('/');
builder.with_api_url(api_url)?.with_url(base_url.unwrap_or(api_url))?
} else {
builder.chain(chain)?
Expand Down

0 comments on commit 398c12c

Please sign in to comment.