If we like the pattern then I will roll it out to the rest of the prawns.
Main reason for doing it was to allow us to set start end end block as an env var ... but I didn't want to copy paste it to every processor. I have not yet added that functionality ... wanted to make the first PR a pure refactor.
Things to note:
The processor is still exposed on the Prawn processor - so we can always change things like the default batch size before calling run
If we need additional arguments beyond the chain name in the handlers we can still wrap the handler in another function e.g
In staking we have a reused handler that passes in an event and a corresponding status to the handler in the processor. Instead we can move the mapping to be inside the handler e.g event of type 'cancelled' maps to status 'cancelled'.
If we like the pattern then I will roll it out to the rest of the prawns.
Main reason for doing it was to allow us to set start end end block as an env var ... but I didn't want to copy paste it to every processor. I have not yet added that functionality ... wanted to make the first PR a pure refactor.
Things to note: