Skip to content

Commit

Permalink
add link to transactions for mxpy output
Browse files Browse the repository at this point in the history
  • Loading branch information
popenta committed Sep 25, 2023
1 parent c692b1a commit 476a99d
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion multiversx_sdk_cli/cli_shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from multiversx_sdk_cli.ledger.ledger_functions import do_get_ledger_address
from multiversx_sdk_cli.simulation import Simulator
from multiversx_sdk_cli.transactions import send_and_wait_for_result
from multiversx_sdk_cli.utils import log_explorer_transaction
from multiversx_sdk_cli.ux import show_warning


Expand Down Expand Up @@ -274,8 +275,16 @@ def send_or_simulate(tx: ITransaction, args: Any, dump_output: bool = True) -> C
simulation = Simulator(proxy).run(tx)
output_builder.set_simulation_results(simulation)
finally:
output_transaction = output_builder.build()

if dump_output:
utils.dump_out_json(output_builder.build(), outfile=outfile)
utils.dump_out_json(output_transaction, outfile=outfile)

if send_only:
log_explorer_transaction(
chain=output_transaction["emittedTransaction"]["chainID"],
transaction_hash=output_transaction["emittedTransactionHash"]
)

return output_builder

Expand Down

0 comments on commit 476a99d

Please sign in to comment.