Skip to content

Commit

Permalink
add warning
Browse files Browse the repository at this point in the history
  • Loading branch information
leighmcculloch committed Aug 9, 2024
1 parent 918bf7f commit eb56bb1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/soroban-cli/src/commands/contract/invoke.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ use super::super::events;
use crate::commands::txn_result::{TxnEnvelopeResult, TxnResult};
use crate::commands::NetworkRunnable;
use crate::get_spec::{self, get_remote_contract_spec};
use crate::print;
use crate::{
commands::global,
config::{self, data, locator, network},
Expand Down Expand Up @@ -386,6 +387,8 @@ impl NetworkRunnable for Cmd {
.unwrap_or_default();
(res.return_value()?, events)
} else {
let print = print::Print::new(global_args.map_or(false, |g| g.quiet));
print.infoln("Invoke simulated only because simulation identified a read-only transaction. To send invoke to network in a transaction use --send=yes.");
(sim_res.results()?[0].xdr.clone(), sim_res.events()?)
};
crate::log::events(&events);
Expand Down

0 comments on commit eb56bb1

Please sign in to comment.