This PR introduces a function, that given a CEM-script instance will generate config for Oura, such that Oura will index all spendings from the CEM-script validator.
The change is tested against the SimpleAuction example.
It feeds Oura with two transactions one of which spends from the validator address, and expect Oura to catch exactly that transaction.
If the need to extend this functionality will arise, it can be handy to revert this commit: 7494b2878ed1cc699daf02e9bca680f4ed6d3888
There was the WIP on making indexer to listen for a particular state transitions.
This PR introduces a function, that given a CEM-script instance will generate config for Oura, such that Oura will index all spendings from the CEM-script validator.
API
https://github.com/mlabs-haskell/cem-script/blob/ae302686587b5529de4ccbbe6d10f4afe18058df/src/Cardano/CEM/OuraConfig.hs#L51
The only variable section of the config is filters, the rest can be safely overwritten by the user.
The generated filter have a shape:
Testing
The change is tested against the
SimpleAuction
example. It feeds Oura with two transactions one of which spends from the validator address, and expect Oura to catch exactly that transaction.The tests use oura github.com/Renegatto/oura/commit/bfcac25065719f9e3405acbbdf5fe782846ddf32 that can use unix socket in a datagram mode as a source of Txs. This has been made to simplify the testing process and avoid the need of spinning cardano node for it.
Maintenance
If the need to extend this functionality will arise, it can be handy to revert this commit: 7494b2878ed1cc699daf02e9bca680f4ed6d3888 There was the WIP on making indexer to listen for a particular state transitions.