Parser would probably look like parseTx :: CEMScriptCompiled script => TxBody -> CEMScriptDatum script, where type CEMScriptDatum script = (Params script, State script). Though TxBody from cardano-api might be actually inconvenient for specific indexer interface (#44). But they are nice to have to do roundtrip tests in PSM backend, as it uses cardano-api types.
There should be existent implementation somewhere in old hydra-aucton.
TODO:
[ ] Add parsing function
[ ] Basic build-parse roundtrip test
[ ] Use it in state-machine tests (to check it always works and created Tx are always correct)
Parser would probably look like
parseTx :: CEMScriptCompiled script => TxBody -> CEMScriptDatum script
, wheretype CEMScriptDatum script = (Params script, State script)
. ThoughTxBody
fromcardano-api
might be actually inconvenient for specific indexer interface (#44). But they are nice to have to do roundtrip tests in PSM backend, as it usescardano-api
types.There should be existent implementation somewhere in old
hydra-aucton
.TODO: