Skip to content

Commit

Permalink
fix: respect --offline in etherscan identifier (#6801)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsse authored Jan 15, 2024
1 parent 34d51ff commit 7c9507b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/evm/traces/src/identifier/etherscan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ pub struct EtherscanIdentifier {
impl EtherscanIdentifier {
/// Creates a new Etherscan identifier with the given client
pub fn new(config: &Config, chain: Option<Chain>) -> eyre::Result<Self> {
if config.offline {
// offline mode, don't use etherscan
return Ok(Default::default())
}
if let Some(config) = config.get_etherscan_config_with_chain(chain)? {
trace!(target: "etherscanidentifier", chain=?config.chain, url=?config.api_url, "using etherscan identifier");
Ok(Self {
Expand Down

0 comments on commit 7c9507b

Please sign in to comment.