General Description
As a developer I want to create an onchain event listener on the resource provider when a deal is saved by the solver so that I can react and begin running the job.
Which system(s) or functionality does this affect
This can be one or many. Please also include this in the title
protocol-smart-contracts, resource-provider
Describe the changes, and how this affects/ interacts with each system.
- Create a web3 listener for the
LilypadPayment__ActiveEscrowLockedForJob event emitted from the LilypadPaymentEngine contract which signals when the job creator and resource provider have locked their escrow in active collateral. (note: prior to this call, a deal will be save on chain but it's safer to listen on the event from the paymentEngine since it will revert if either party don't have enough escrow to preform the job)
- Business logic added to fetch the deal object from the solver using the
dealId in the event and begin running the job