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

Return GYBalancedTx (or similar) when raising BuildTxBodyErrorAutoBalance to have more information #321

Open
TotallyNotChase opened this issue Jul 10, 2024 · 1 comment

Comments

@TotallyNotChase
Copy link
Contributor

Is your feature request related to a problem? Please describe.
Currently, when BuildTxBodyErrorAutoBalance is raised, there is barely any information about what really happened. Especially when a validator error is raised.

Describe the solution you'd like
It'd be useful to return our balanced transaction (as selecting inputs and collateral can indeed influence script behavior) with the error.

Describe alternatives you've considered
N/A

Additional context
The addition is simple. Amend the BuildTxBodyErrorAutoBalance constructor to contain GYBalancedTx and amend attach this data type within makeTransactionBodyAutoBalanceWrapper. It should not prompt any API changes.

@TotallyNotChase
Copy link
Contributor Author

I might have a better idea actually. I've been looking into the ledger and realized that I might be able to add the ability to retrieve the exact ScriptContext used with every plutus script in a transaction into CLB. Which means we can see it during validation failures in the "emulator log".

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

No branches or pull requests

1 participant