Skip to content

Commit a221bd1

Browse files
committed
do not println in json mode
1 parent d12f925 commit a221bd1

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

crates/verify/src/bytecode.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ impl VerifyBytecodeArgs {
102102
let config = self.load_config_emit_warnings();
103103
let provider = utils::get_provider(&config)?;
104104

105+
// Get the bytecode at the address, bailing if it doesn't exist.
105106
let code = provider.get_code_at(self.address).await?;
106107
if code.is_empty() {
107108
eyre::bail!("No bytecode found at address {}", self.address);
@@ -115,20 +116,18 @@ impl VerifyBytecodeArgs {
115116
);
116117
}
117118

118-
// If chain is not set, we try to get it from the RPC
119-
// If RPC is not set, the default chain is used
119+
// If chain is not set, we try to get it from the RPC.
120+
// If RPC is not set, the default chain is used.
120121
let chain = match config.get_rpc_url() {
121122
Some(_) => utils::get_chain(config.chain, provider).await?,
122123
None => config.chain.unwrap_or_default(),
123124
};
124125

125-
// Set Etherscan options
126+
// Set Etherscan options.
126127
self.etherscan.chain = Some(chain);
127128
self.etherscan.key = config.get_etherscan_config_with_chain(Some(chain))?.map(|c| c.key);
128129

129130
let verifier_url = self.verifier.verifier_url.clone();
130-
println!("Start verifying contract `{}` deployed on {chain}", self.address);
131-
132131
self.verifier
133132
.verifier
134133
.client(&self.etherscan.key())?

crates/verify/src/verify.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +177,8 @@ impl VerifyArgs {
177177
)
178178
}
179179

180-
// If chain is not set, we try to get it from the RPC
181-
// If RPC is not set, the default chain is used
180+
// If chain is not set, we try to get it from the RPC.
181+
// If RPC is not set, the default chain is used.
182182
let chain = match config.get_rpc_url() {
183183
Some(_) => {
184184
let provider = utils::get_provider(&config)?;
@@ -189,6 +189,7 @@ impl VerifyArgs {
189189

190190
let context = self.resolve_context().await?;
191191

192+
// Set Etherscan options.
192193
self.etherscan.chain = Some(chain);
193194
self.etherscan.key = config.get_etherscan_config_with_chain(Some(chain))?.map(|c| c.key);
194195

0 commit comments

Comments
 (0)