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

Chore: transfer logging to CLI #8

Open
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

BlaineHeffron
Copy link
Contributor

@BlaineHeffron BlaineHeffron commented Jul 26, 2024

What

JSON decoded diagnostic event string is being added to log in the CLI. See stellar/stellar-cli#1447 Currently it is being logged in the RPC client, which should not be the RPC client's job. I am removing it here and will be adding more detailed logging in the CLI.

This PR also modifies the output of the simulate_and_assemble_transaction to return both the AssembledTransaction and the SimulateTransactionResult. This will allow the CLI and other tools to log any events attached to the result. It also transfers the responsibility of throwing the error to the CLI.

Why

CLI should be responsible for logging, see stellar/stellar-cli#1447 (comment)

Known limitations

Breaking change since it removes a log statement when simulations fail. Additionally, simulate_and_assemble_transaction will not return an Error when the simulation fails; instead the AssembledTransaction will be None and the CLI will need to throw the error based on the SimulateTransactionResult which is now being returned alongside the AssembledTransaction.

@BlaineHeffron BlaineHeffron changed the title Feat/diagnostic events decode Chore: transfer logging to CLI Jul 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants