Skip to content

[High] Build a cross-contract integration test crate over the real wasm artifacts #416

Description

@james2177

Description:
Each crate tests itself in isolation with mocks. Create an integration-tests crate that contractimport!s the release wasm of all contracts and runs full scenarios: registry tiers affect settlement, proofs gate fills, badges sync, and upgrades preserve state across all of them.

Problem Statement & Context:
The riskiest bugs live at the boundaries: auth of current_contract_address across calls, ABI drift, and resource limits of nested calls. Only tests against the real wasm catch them.

Scope & Acceptance Criteria:

  • At least 15 scenarios, including the happy path, a slash with a tier change, a proof mismatch, a dispute upheld with a registry slash, a badge sync after demotion, a pause of one contract during a flow, and an upgrade mid-flow.
  • Resource-budget assertions on nested calls.
  • A Makefile target that builds the wasms, then runs the tests.
  • Out of scope: testnet deployment.

Implementation Guidelines:

  1. Key Files/Modules: new integration-tests/, Makefile, justfile.
  2. Design/Architecture: Shared fixtures (deploy_protocol()) that return typed clients.
  3. Edge Cases/Constraints: Wasm must be built before the tests run (a build script or Makefile ordering).
  4. Testing: As listed in the scope.

Definition of "Done":

  • Crate merged, and scenarios documented in its README.
  • Reviewed and approved.

Resources:

Complexity: High (200 points)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave programhigh (200 pts)Drips Wave complexity: high, 200 pointssecuritySecurity hardening or audit finding

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions