Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use print.infoln, etc #1558

Merged
merged 1 commit into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading