Skip to content

feat: implement SDK codegen, bulk dead-letter replay, and ContractEvent partitioning - #1397

Merged
DokaIzk merged 1 commit into
SoroScan:devfrom
Izebby:dev
Aug 31, 2026
Merged

feat: implement SDK codegen, bulk dead-letter replay, and ContractEvent partitioning#1397
DokaIzk merged 1 commit into
SoroScan:devfrom
Izebby:dev

Conversation

@Izebby

@Izebby Izebby commented Aug 31, 2026

Copy link
Copy Markdown

This PR addresses three distinct enhancements across the backend, SDK, and database layers to improve data lifecycle management, API usability, and developer experience.

Closes #1278
Closes #1279
Closes #1280

Changes Made

  1. SDK Type Definitions Auto-Generation (SDK Type Definitions Auto-Generation #1280)

TypeScript SDK: Integrated @graphql-codegen/cli and @graphql-codegen/typescript to automatically generate types from the backend GraphQL schema. Added a generate script to package.json.

Python SDK: Integrated ariadne-codegen into pyproject.toml to dynamically generate Pydantic models/types based on the schema.

CI Pipeline: Updated .github/workflows/sdk-release.yml to run generation scripts during the build process and fail the build if the generated SDK types drift from the current backend schema.

  1. Bulk Replay for Dead-Letter Webhooks (feat(webhooks): add REST API endpoint for bulk replaying failed dead-letter webhooks #1279)

Created a new REST endpoint (POST /v1/webhooks/dead-letters/bulk-replay) in django-backend/soroscan/v1/views.py.

Wired the endpoint to the existing create_replay_job logic to iterate over an array of dead_letter_ids and spawn asynchronous replay tasks.

Updated route definitions in django-backend/soroscan/v1/urls.py.

  1. Postgres Range Partitioning for ContractEvent (feat(db): implement range table partitioning for ContractEvent table #1278)

Added a custom raw SQL migration (0054_contractevent_partitioning.py) to convert the ingest_contractevent table into a partitioned table.

Partitioning is implemented using the RANGE strategy on the timestamp and ledger_sequence columns.

Created initial month-bound partitions to ensure seamless event ingestion without downtime.

How to Test / Verify
Database:

Run python manage.py migrate in the django-backend directory. Verify that the table ingest_contractevent is successfully converted to a partitioned table in your local Postgres instance.

API:

Make a POST request to /v1/webhooks/dead-letters/bulk-replay with a payload of {"dead_letter_ids": [1, 2, 3]} and verify that WebhookReplayJob instances are created in the database.

SDK Codegen:

Navigate to sdk/typescript and run npm run generate.

Navigate to sdk/python and run ariadne-codegen.

Verify that both commands execute without errors and produce the expected type definition files.

Checklist
[x] I have performed a self-review of my own code.

[x] I have added/updated necessary migrations.

[x] I have verified that SDK type generation works locally.

[x] I have updated the CI/CD workflows to enforce codegen synchronization.

@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@Izebby Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@DokaIzk
DokaIzk merged commit 2339266 into SoroScan:dev Aug 31, 2026
2 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants