Skip to content

Add SDK transaction simulation result mapper - #438

Merged
El-swaggerito merged 1 commit into
Axionvera:mainfrom
panditdhamdhere:feat/simulation-result-mapper-337
Jul 29, 2026
Merged

Add SDK transaction simulation result mapper#438
El-swaggerito merged 1 commit into
Axionvera:mainfrom
panditdhamdhere:feat/simulation-result-mapper-337

Conversation

@panditdhamdhere

Copy link
Copy Markdown
Contributor

Summary

  • Implements mapSimulationResult to classify Soroban simulateTransaction responses as success | warning | failed | unsupported | unknown
  • Wires ContractClient (readOnly / invoke / auth sim) and simulateContractCall through the mapper before assemble/sign
  • Adds typed error codes (SOROBAN_SIMULATION_FAILED / _UNSUPPORTED / _UNKNOWN), fixtures, tests, and docs

Closes #337

Acceptance criteria

  • Simulation result mapper is implemented
  • Success, warning, failed, unsupported, and unknown states are represented
  • Soroban client uses the mapper
  • Tests cover representative simulation responses
  • Errors are typed and safe
  • Documentation explains simulation handling

Test plan

  • npx vitest run tests/simulation-mapper.test.ts tests/contract-client-factory.test.ts
  • Confirm invoke returns simulation_error and does not sign on failed/unsupported
  • Confirm docs/simulation-result-mapping.md matches behaviour

Map simulateTransaction responses to typed success/warning/failed/unsupported/unknown states and wire ContractClient through the mapper.
@El-swaggerito
El-swaggerito merged commit 10ded6f into Axionvera:main Jul 29, 2026
1 check 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

Development

Successfully merging this pull request may close these issues.

Add SDK transaction simulation result mapper

2 participants