Skip to content

[BUG] Shared test fixtures for escrow scenarios hardcode a specific testnet contract ID that's no longer deployed, breaking tests that don't mock the RPC #792

Open

Description

@meshackyaro

Description

Several integration test files reference a specific contract ID constant that pointed at a testnet deployment which has since been redeployed elsewhere, so any test accidentally hitting the real network (vs. a mock) fails with a contract-not-found error unrelated to what's actually being tested.

Component

testing

Steps to Reproduce

  1. Run the integration test suite (jest.e2e.config.js) against testnet.
  2. Identify any test relying on the hardcoded legacy contract ID constant.
  3. Observe the failure and compare the error to the actual intent of the test.

Expected Behavior

Test fixtures should reference the current, actively-deployed test contract ID, ideally sourced from an env var rather than hardcoded, so redeployments don't silently break tests.

Actual Behavior

Tests fail with a confusing contract-not-found error that has nothing to do with the behavior actually being tested, wasting debugging time.

Environment

  • SDK version: 0.3.x
  • Node version: 20.x, 22.x
  • OS: macOS / Linux
  • Network: TESTNET

Code Example

// Not applicable — reproduced via API inspection, not a standalone snippet.

Error Output

N/A — no thrown error; behavior is incorrect but silent.

Difficulty

🟢 Easy

Additional Context

The constant was hardcoded at some point and never updated after a subsequent contract redeployment.

Activity

  1. added
    bug
    good first issue
    difficulty: easy
    priority: medium
    on Oct 29, 2026
  2. maxx-GENIUS commented on Nov 6, 2026

    @maxx-GENIUS
    Contributor

    Hey @trustflow-protocol team,

    I reviewed the issue for Shared test fixtures for escrow scenarios hardcode a specific testnet contract ID that's no longer deployed, breaking tests that don't mock the RPC. The documentation has discrepancies with the current codebase regarding shared test fixtures for escrow scenarios hardcode a specific testnet contract id that's no longer deployed, breaking tests that don't mock the rpc.

    Proposed Implementation:

    1. Audit the source definitions and identify the exact missing methods, types, or deprecation notices.
    2. Update the documentation files with accurate code signatures, examples, and migration guides.
    3. Verify that all markdown anchors, cross-links, and formatting render cleanly without lint warnings.

    Testing & Verification:
    I will run the documentation / markdown linter and verify all code snippets compile against the current API.

    Would be glad to take this on if you can assign it over. Ready to submit a verified patch.

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

    bugdifficulty: easygood first issuepriority: mediumsdktesting

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions