Skip to content

43. [Advanced] Implement "Sandbox Mode" for manual state overrides #95

@dotandev

Description

@dotandev

Description
Allow users to manually override ledger entries (e.g., balance, contract data) before replaying a transaction.

Requirements and Context

  • Background: Enables "What-if" scenarios: "What if I had 1000 XLM instead of 10?".
  • Success Criteria (Done):
    • --override-state ./overrides.json flag supported.
    • Replay uses overridden values instead of chain data.

Suggested Execution

  • Fork/Branch: feature/advanced-sandbox
  • Implementation:
    • Define an override JSON format for LedgerEntries.
    • Merge overrides with fetched chain state before injection into the simulator.

Test and Commit

  • Testing:
    • Override a balance and verify the contract execution reflects the new value.
  • PR Inclusions:
    • State merger logic and override parser.

Example Commit Message
feat(advanced): add sandbox mode for state overrides

Guidelines

  • Must-haves: Log when an override is active to prevent confusion.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions