Scalus offline evaluator#20
Conversation
thanks for the contribution, does the evaluator still require an independent ScriptSupplier (coz previous versions needed it?) |
|
We don't require it, but if your transaction includes reference scripts, then it's going to be used to look those up, see If you are indeed using reference scripts, Scalus provides several types to choose from. Seeing that you are using Bloxbean already, If you aren't using them, then you can just use a constructor that doesn't take ScriptSupplier as a parameter. |
|
Yeah in the tx we have 3 ref inputs, one of which is the tank script: https://github.com/FluidTokens/ft-aquarium-node/blob/main/src/main/java/com/fluidtokens/aquarium/offchain/service/ScheduledTransactionService.java#L190-L192 So I guess we need the ScriptSupplier too. |
|
Yeah, but should be pretty straightforward. Wherever the QuickTxBuilder is created, it probably receives either a |
|
hi! sorry for the delay added the ScriptSupplier @nemo83 |
This PR adds and configures
ScalusTransactionEvaluatortoScheduledTransactionService.When evaluating transactions, it doesn't make a network call for script evaluation, instead using its own cek machine implementation.
I may have configured its dependencies, namely Protocol Parameters and the UTxO supplier, incorrectly, as I'm not Spring-savvy. If you know a better way and would like me to improve this patch -- please share.
The gist of it is pretty simple -- Scalus implements a bloxbean-compatible interface for tx evaluation, and this PR adds it.
Will be happy to help with improvements and further integration!