Skip to content

Commit

Permalink
fix: use print.infoln, etc (#1558)
Browse files Browse the repository at this point in the history
  • Loading branch information
willemneal authored Aug 22, 2024
1 parent 9ad9e8e commit b1c5d5e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions cmd/soroban-cli/src/commands/contract/deploy/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ impl NetworkRunnable for Cmd {
}
})?);

print.info(format!("Using wasm hash {wasm_hash}").as_str());
print.infoln(format!("Using wasm hash {wasm_hash}").as_str());

let network = config.get_network()?;
let salt: [u8; 32] = match &self.salt {
Expand Down Expand Up @@ -230,21 +230,21 @@ impl NetworkRunnable for Cmd {
)?;

if self.fee.build_only {
print.check("Transaction built!");
print.checkln("Transaction built!");
return Ok(TxnResult::Txn(txn));
}

print.info("Simulating deploy transaction…");
print.infoln("Simulating deploy transaction…");

let txn = client.simulate_and_assemble_transaction(&txn).await?;
let txn = self.fee.apply_to_assembled_txn(txn).transaction().clone();

if self.fee.sim_only {
print.check("Done!");
print.checkln("Done!");
return Ok(TxnResult::Txn(txn));
}

print.globe("Submitting deploy transaction…");
print.globeln("Submitting deploy transaction…");
print.log_transaction(&txn, &network, true)?;

let get_txn_resp = client
Expand All @@ -259,10 +259,10 @@ impl NetworkRunnable for Cmd {
let contract_id = stellar_strkey::Contract(contract_id.0).to_string();

if let Some(url) = utils::explorer_url_for_contract(&network, &contract_id) {
print.link(url);
print.linkln(url);
}

print.check("Deployed!");
print.checkln("Deployed!");

Ok(TxnResult::Res(contract_id))
}
Expand Down
6 changes: 3 additions & 3 deletions cmd/soroban-cli/src/commands/contract/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ impl NetworkRunnable for Cmd {
// Skip reupload if this isn't V0 because V1 extension already
// exists.
if code.ext.ne(&ContractCodeEntryExt::V0) {
print.info("Skipping install because wasm already installed");
print.infoln("Skipping install because wasm already installed");
return Ok(TxnResult::Res(hash));
}
}
Expand All @@ -175,7 +175,7 @@ impl NetworkRunnable for Cmd {
}
}

print.info("Simulating install transaction…");
print.infoln("Simulating install transaction…");

let txn = client
.simulate_and_assemble_transaction(&tx_without_preflight)
Expand All @@ -186,7 +186,7 @@ impl NetworkRunnable for Cmd {
return Ok(TxnResult::Txn(txn));
}

print.globe("Submitting install transaction…");
print.globeln("Submitting install transaction…");

let txn_resp = client
.send_transaction_polling(&self.config.sign_with_local_key(txn).await?)
Expand Down

0 comments on commit b1c5d5e

Please sign in to comment.