Skip to content

[1131] Soroban contract and SDK feature SC-26 - #1204

Closed
Goodnessukaigwe wants to merge 1 commit into
SoroScan:mainfrom
Goodnessukaigwe:fix/1131-soroban-contract-and-sdk-feature-sc-26
Closed

[1131] Soroban contract and SDK feature SC-26#1204
Goodnessukaigwe wants to merge 1 commit into
SoroScan:mainfrom
Goodnessukaigwe:fix/1131-soroban-contract-and-sdk-feature-sc-26

Conversation

@Goodnessukaigwe

Copy link
Copy Markdown
Contributor

Summary

  • Implements SC-26 indexer per-ledger rate limiting end-to-end: Soroban contract, Django REST API, Python/TypeScript SDKs, and CLI.
  • Contract (soroscan_core): set_indexer_rate_limit / get_indexer_rate_limit / get_indexer_rate_usage with RateLimitExceeded enforcement on record_event, record_events_batch, and record_structured_event. Passing 0 clears a limit. Also defines the missing SC-38 DataKey / StructuredEventRecord / error variants required for the crate to compile after the SC-38 merge.
  • Django: POST /api/ingest/indexers/rate-limit/ and GET /api/ingest/indexers/<indexer>/rate-limit/ plus Soroban client helpers.
  • SDKs/CLI: Python set_indexer_rate_limit / get_indexer_rate_limit (sync+async) and soroscan indexers set-rate-limit|get-rate-limit; TypeScript setIndexerRateLimit / getIndexerRateLimit. Docs updated in contract/SDK READMEs and api_reference.md.

Closes #1131

Test plan

  • cargo test --lib in soroban-contracts/soroscan_core — 32/32 passing with pre-existing broken test_event_decoding_and_types temporarily excluded for local compile (left untouched in the PR; same pre-existing API drift noted in SC-30)
  • Django pytest TestIndexerRateLimitViews + stellar_client rate-limit tests — 11 passed
  • Python SDK tests/test_sc26_*.py — 14 passed
  • TypeScript vitest run test/sc26-rate-limit.test.ts — 11 passed

Made with Cursor

Allow admins to cap how many events an indexer can record per ledger across
the Soroban contract, Django API, and Python/TypeScript SDKs/CLI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@drips-wave

drips-wave Bot commented Jul 30, 2026

Copy link
Copy Markdown

@Goodnessukaigwe 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 closed this Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Soroban contract and sdk feature sc-26

2 participants