Skip to content

chore(smart-contracts): remove unused commerce-payments git dependency#1734

Merged
rodrigopavezi merged 2 commits into
masterfrom
chore/remove-commerce-payments-dep
Jun 8, 2026
Merged

chore(smart-contracts): remove unused commerce-payments git dependency#1734
rodrigopavezi merged 2 commits into
masterfrom
chore/remove-commerce-payments-dep

Conversation

@rodrigopavezi

@rodrigopavezi rodrigopavezi commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Removes the commerce-payments git dependency (git+https://github.com/base/commerce-payments.git#v1.0.0) from @requestnetwork/smart-contracts
  • Fixes a broken CI build caused by the NEAR testnet subgraph no longer existing on The Graph Studio

commerce-payments removal

The package is a Solidity-only repo with no npm publication; it was listed as a runtime dependency but has zero TypeScript/JavaScript imports anywhere in the codebase. All interfaces needed by ERC20CommerceEscrowWrapper.sol are already copied locally at src/contracts/interfaces/IAuthCaptureEscrow.sol. Removing it allows re-enabling blockExoticSubdeps for stronger supply-chain attack protection.

NEAR GraphQL codegen fix

codegen-near.yml was fetching the GraphQL schema live from https://api.studio.thegraph.com/query/67444/request-payments-near-testnet/version/latest, which no longer exists. This caused codegen to fail, graphql-near.ts to never be generated, and the TypeScript build for @requestnetwork/payment-detection to break.

Fix follows the existing pattern used by the TRON codegen: a local schema.graphql SDL file is committed to the repo (src/thegraph/queries/near/schema.graphql) so the build is fully offline and not gated on an external endpoint being live.

Test plan

  • yarn workspace @requestnetwork/smart-contracts build:sol — 81 Solidity files compiled successfully
  • yarn workspace @requestnetwork/payment-detection codegen — all four codegen targets pass (graphql.ts, graphql-superfluid.ts, graphql-near.ts, graphql-tron.ts)
  • yarn workspace @requestnetwork/payment-detection build — TypeScript build passes cleanly
  • yarn install — lockfile updates cleanly

The commerce-payments package (git+https://github.com/base/commerce-payments.git) is a Solidity-only package with no TypeScript/JavaScript imports anywhere in the codebase. All needed interfaces are already copied locally in src/contracts/interfaces/. Removing it allows re-enabling blockExoticSubdeps for stronger supply-chain attack protection.
@greptile-apps

greptile-apps Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR removes the unused commerce-payments git dependency from @requestnetwork/smart-contracts and, separately, snapshots the NEAR subgraph schema locally so the payment-detection codegen no longer requires network access to the remote Studio URL.

  • Dependency removal: commerce-payments had zero TypeScript/JS imports and its only Solidity interface (IAuthCaptureEscrow) is already copied to src/contracts/interfaces/IAuthCaptureEscrow.sol, making the git dep a no-op. Removing it allows re-enabling blockExoticSubdeps in Yarn, tightening supply-chain protection for the whole monorepo.
  • NEAR schema snapshot: codegen-near.yml now points at a new local schema.graphql instead of the remote The Graph Studio URL, mirroring the pattern already in use by codegen-tron.yml. All filter inputs, scalars, enums, and return-type fields in the new schema align exactly with the three existing NEAR query documents.

Confidence Score: 5/5

Safe to merge — removes a genuinely unused git dependency and snapshots the NEAR GraphQL schema locally with no behavioral changes at runtime.

The commerce-payments package had no TypeScript imports and its Solidity interface was already copied locally, so the removal cannot break any existing build or runtime path. The NEAR schema snapshot follows the identical pattern already proven by codegen-tron.yml, and every field used by the three NEAR query documents is present in the new schema. No logic changes were made.

No files require special attention.

Important Files Changed

Filename Overview
packages/smart-contracts/package.json Removes the commerce-payments git dependency; the locally copied IAuthCaptureEscrow.sol interface confirms no Solidity source depends on the package, and no TypeScript imports were found.
yarn.lock Removes the commerce-payments lock entry corresponding to the dependency removal; no other lock changes.
packages/payment-detection/codegen-near.yml Switches the NEAR codegen schema source from a remote Studio URL to a local schema.graphql file, matching the same approach already used in codegen-tron.yml.
packages/payment-detection/src/thegraph/queries/near/schema.graphql New local GraphQL schema covering all fields used by the three NEAR query files; all filter inputs, return types, scalars, and enums match the existing query documents.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[yarn install] -->|before| B[Resolves commerce-payments\ngit+https://github.com/base/commerce-payments.git#v1.0.0]
    A -->|after| C[No exotic git dep\nblockExoticSubdeps re-enabled]

    D[build:sol - Hardhat compile] -->|before & after| E[Reads IAuthCaptureEscrow.sol\nfrom local src/contracts/interfaces/]
    E --> F[81 contracts compile cleanly]

    G[graphql-codegen NEAR] -->|before| H[Fetches schema from\nremote Studio URL]
    G -->|after| I[Reads schema from\nsrc/thegraph/queries/near/schema.graphql]
    I --> J[Generates graphql-near.ts\nwith correct types]
Loading

Reviews (2): Last reviewed commit: "fix(payment-detection): use local schema..." | Re-trigger Greptile

The hosted subgraph at api.studio.thegraph.com/query/67444/request-payments-near-testnet no longer exists, breaking codegen and the TypeScript build. Switch to a local schema SDL file (matching the existing pattern used by the TRON codegen) so the build is not gated on an external endpoint being live.
@rodrigopavezi rodrigopavezi merged commit f220532 into master Jun 8, 2026
9 checks passed
@rodrigopavezi rodrigopavezi deleted the chore/remove-commerce-payments-dep branch June 8, 2026 15:45
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.

3 participants