Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[resource-provider/protocol-smart-contract] Create event listener for Deal creation for Resource Provider #534

Open
narbs91 opened this issue Mar 6, 2025 · 0 comments

Comments

@narbs91
Copy link
Collaborator

narbs91 commented Mar 6, 2025

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.

  1. 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)
  2. Business logic added to fetch the deal object from the solver using the dealId in the event and begin running the job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant