Skip to content

Index all escrow events in the indexer #1355

@bogdanfazakas

Description

@bogdanfazakas

The Escrow contract is fully implemented and used for C2D job payment flows, but none of its events are indexed.

The indexer should listen for and process all events emitted by the Escrow contract:

Event Signature
Auth Auth(address indexed payer, address indexed payee, uint256 maxLockedAmount, uint256 maxLockSeconds, uint256 maxLockCounts)
Lock Lock(address payer, address payee, uint256 jobId, uint256 amount, uint256 expiry, address token)
Claimed Claimed(address indexed payee, uint256 jobId, address token, address indexed payer, uint256 amount, bytes proof)
Canceled Canceled(address indexed payee, uint256 jobId, address token, address indexed payer, uint256 amount)
Deposit Deposit(address indexed payer, address token, uint256 amount)
Withdraw Withdraw(address indexed payer, address token, uint256 amount)
  1. Register all 6 event signatures in the EVENTS and EVENT_HASHES constants
  2. Add Escrow contract address resolution per chain
  3. Implement event processor classes for each event type
  4. Register all new processors in EVENT_PROCESSOR_MAP in processor.ts
  5. Define database schema and storage logic for indexed escrow events so they are queryable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions