Skip to content

test: cover indexer decoders with real testnet fixtures - #182

Merged
thewealthyplace merged 1 commit into
prism-explorer:mainfrom
aurorabini:test/indexer-decoder-fixtures
Oct 22, 2026
Merged

thewealthyplace merged 1 commit into
prism-explorer:mainfrom
aurorabini:test/indexer-decoder-fixtures

Conversation

@aurorabini

@aurorabini aurorabini commented Oct 22, 2026 •

Copy link
Copy Markdown

Adds captured Stellar testnet envelopes and metas as fixtures and asserts the decoded output of every exported decoder in indexer/src/decode.ts: scValToDisplay, decodeInvocation, extractInvocationReturnValue, decodeContractCreation, extractStorageChanges and extractEvents.

Fixtures cover:

  • a successful contract invocation (return value, 16 storage changes with expanded instance entries, 4 events)
  • a failed invocation
  • createContract and createContractV2 host functions
  • a multi-operation transaction

Verified with npm test (44 passing), npm run lint and npx tsc --noEmit.

Closes #11
closes #12
closes #13
closes #37

The decoders decide what reaches the database but only scValToDisplay had
tests. Add captured testnet envelopes and metas covering a successful
invocation, a failed invocation, both contract-creation host functions and a
multi-operation transaction, so every exported decoder is exercised against
real ledger data.

Closes prism-explorer#11

🤖 Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>
@vercel

vercel Bot commented Oct 22, 2026

Copy link
Copy Markdown

@luciusverus-cyber is attempting to deploy a commit to the thewealthyplace100-8633's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Oct 22, 2026

Copy link
Copy Markdown

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

@thewealthyplace
thewealthyplace merged commit c9eae58 into prism-explorer:main Oct 22, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants