Commit 9eca7db
authored
Implements the tagged event indexing feature (SC-24) across all three
layers of the SoroScan stack.
## Soroban Contract (soroban-contracts/soroscan_core)
- Added TaggedEventRecord struct with a ags: Vec<Symbol> field
(max 4 tags, enforced on-chain)
- Added DataKey::LatestTaggedByType(Symbol) storage key so tagged
events occupy a slot independent of the legacy EventRecord slot
- Added MAX_TAGS = 4 constant and ContractError::TooManyTags variant
- Added
ecord_tagged_event() entry-point (auth-gated to registered
indexers) that validates the tag count, stores the record, increments
the global counter, and emits a (soroscan, sc24, event_type) event
- Added latest_tagged_by_type() read-only entry-point
- Added 6 unit tests covering: happy-path, empty tags, too-many-tags
rejection, unauthorized indexer rejection, None-before-first-event,
and legacy/tagged storage independence
## Python SDK (sdk/python)
- Added TaggedEventRequest and TaggedEventResponse Pydantic models
with a ≤4 tag validator
- Added
ecord_tagged_event() (sync) and async counterpart to both
SoroScanClient and AsyncSoroScanClient
- Exported new models from soroscan/__init__.py
- Added ests/test_sc24_tagged_event.py with 16 unit tests covering
sync, async (asyncio + trio), error propagation, and model validation
## TypeScript SDK (sdk/typescript)
- Added RecordTaggedEventParams, RecordTaggedEventResponse, and
MAX_TAGS constant to ypes.ts
- Added GetEventsByContractsParams/Response (SC-23) and
RecordStructuredEventParams/Response (SC-38) to ypes.ts so that
all cross-feature imports resolve on this branch
- Added
ecordTaggedEvent() and getEventsByContracts() methods to
SoroScanClient
- Exported all new types from index.ts
- Added est/sc24-tagged-event.test.ts (2 unit tests: serialization
and default empty-tag behaviour)
- Build (
pm run build) and all tests (46 passed) are green
## Documentation
- Added Tagged Events (SC-24) example snippet to docs/sdk-python.md
- Added Tagged Events (SC-24) example snippet to docs/sdk-typescript.md
Closes #1129
1 parent d5bdbe2 commit 9eca7db
9 files changed
Lines changed: 795 additions & 86 deletions
File tree
- docs
- sdk
- python
- soroscan
- tests
- typescript
- src
- test
- soroban-contracts/soroscan_core/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
47 | 61 | | |
48 | 62 | | |
49 | 63 | | |
| 64 | + | |
50 | 65 | | |
51 | 66 | | |
52 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
65 | 79 | | |
66 | 80 | | |
67 | 81 | | |
| 82 | + | |
68 | 83 | | |
69 | 84 | | |
70 | 85 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
463 | 463 | | |
464 | 464 | | |
465 | 465 | | |
466 | | - | |
467 | | - | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
468 | 525 | | |
469 | 526 | | |
470 | 527 | | |
| |||
0 commit comments