Skip to content

Blockchain Event Listener for SafeGig Contract #33

@f-aminu

Description

@f-aminu

Implement a service to listen to SafeGig smart contract events and update the backend database in real-time.

Tasks:

Load ABI + contract address from deployment config.

Create EventListenerService to subscribe to events (GigCreated, PaymentReleased, etc.).

Update Postgres tables (jobs, escrow) when events fire.

Implement error handling for blockchain reorgs (retry sync).

Add logging for received events.

Acceptance Criteria:

✅ Events from the blockchain are detected.

✅ Relevant DB entries are created/updated in sync.

✅ Service can recover from downtime by resyncing missed blocks.

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