Skip to content

Soroban event reference doc#157

Open
githoboman wants to merge 4 commits into
Miracle656:mainfrom
githoboman:Soroban-event-reference-doc
Open

Soroban event reference doc#157
githoboman wants to merge 4 commits into
Miracle656:mainfrom
githoboman:Soroban-event-reference-doc

Conversation

@githoboman

Copy link
Copy Markdown
Contributor

Summary
Closes #144
Created docs/event-reference.md — a reference of every event the indexer recognizes, grounded in the actual code rather than the task title.

What it documents, one section per event, each with a real worked example:

transfer — from/to/amount (from topics[1], topics[2], value)
mint — to/amount; from is null, admin in topics[1] is intentionally ignored
burn — from/amount; to is null
clawback — same shape as burn
Each section has: the topic/value shape table, how the fields map into a TransferRecord, the base64 XDR (taken verbatim from the test fixtures), and the decoded form. The example XDR and decoded values are verified — I ran them through @stellar/stellar-sdk's scValToNative/Address to confirm the exact addresses and amounts, then removed the temp script.

One correction worth flagging: the task title lists transfer, mint, burn, approve, but the indexer actually recognizes transfer, mint, burn, clawback (src/decoder.ts:7 — KNOWN_EVENT_TYPES). There is no approve handling anywhere. I documented the four real events and added a dedicated "A note on approve" section explaining why it's not indexed (it sets an allowance, not a balance movement; its value is a struct, not an i128) and what it would take to add it.

Gitignore change: per your choice, I removed the docs/ line from .gitignore so the doc is trackable. Side effect: the existing docs/cookbook/ directory is now also no longer ignored — worth a glance before you commit if it contains anything you'd rather keep untracked.

Want me to commit these changes (on this Soroban-event-reference-doc branch), or open a PR?

@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@githoboman 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

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 event reference doc

1 participant