Plutonomicon / cardano-transaction-lib

A Purescript library for building smart contract transactions on Cardano
https://plutonomicon.github.io/cardano-transaction-lib/
MIT License
93 stars 50 forks source link

Tx evaluation error parsing and transport #732

Closed adamczykm closed 2 years ago

adamczykm commented 2 years ago

Currently, properly constructed Tx may fail to balance with a very uninformative error that is being thrown during Ogmios EvaluateTx response parsing. It'd be better to either improve the parsing algorithm so that it can parse all ogmios responses or provide a way to inspect unparsed faulty responses to CTL clients. Such responses may contain details on how validator failed to evaluate the transaction, which is important from a debugging perspective of things and instead users get "balance errors" which is just confusing.

jy14898 commented 2 years ago

When implementing EvaluateTx failure response parsing, ensure EvaluateTx (or a subset of it) is added to https://github.com/Plutonomicon/cardano-transaction-lib/blob/fdcfcb3578eb354bd6ab3ca288d0440be7668d23/test/Ogmios/Aeson.purs