From bfc992cc81ec8ca0436df006178536e79a8546b5 Mon Sep 17 00:00:00 2001 From: rodrigopavezi Date: Mon, 8 Jun 2026 12:00:56 -0300 Subject: [PATCH 1/2] chore(smart-contracts): remove unused commerce-payments git dependency 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. --- packages/smart-contracts/package.json | 1 - yarn.lock | 4 ---- 2 files changed, 5 deletions(-) diff --git a/packages/smart-contracts/package.json b/packages/smart-contracts/package.json index 4029e5be6..2cf2bcce7 100644 --- a/packages/smart-contracts/package.json +++ b/packages/smart-contracts/package.json @@ -72,7 +72,6 @@ "tron:deploy:test-token": "node scripts/tron/deploy-test-token.js" }, "dependencies": { - "commerce-payments": "git+https://github.com/base/commerce-payments.git#v1.0.0", "tslib": "2.8.1" }, "devDependencies": { diff --git a/yarn.lock b/yarn.lock index 1808ce415..73a6b1eef 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10158,10 +10158,6 @@ comment-parser@1.1.2: resolved "https://registry.npmjs.org/comment-parser/-/comment-parser-1.1.2.tgz" integrity sha512-AOdq0i8ghZudnYv8RUnHrhTgafUGs61Rdz9jemU5x2lnZwAWyOq7vySo626K59e1fVKH1xSRorJwPVRLSWOoAQ== -"commerce-payments@git+https://github.com/base/commerce-payments.git#v1.0.0": - version "0.0.0" - resolved "git+https://github.com/base/commerce-payments.git#d33b5d5f74fff55f1c0857b1cb6fb4995949330b" - common-ancestor-path@^1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/common-ancestor-path/-/common-ancestor-path-1.0.1.tgz" From 4855bc785e97ee3f931e5274b935deaade7720da Mon Sep 17 00:00:00 2001 From: rodrigopavezi Date: Mon, 8 Jun 2026 12:20:24 -0300 Subject: [PATCH 2/2] fix(payment-detection): use local schema for NEAR GraphQL codegen 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. --- packages/payment-detection/codegen-near.yml | 2 +- .../src/thegraph/queries/near/schema.graphql | 92 +++++++++++++++++++ 2 files changed, 93 insertions(+), 1 deletion(-) create mode 100644 packages/payment-detection/src/thegraph/queries/near/schema.graphql diff --git a/packages/payment-detection/codegen-near.yml b/packages/payment-detection/codegen-near.yml index 4170f8d79..18458708b 100644 --- a/packages/payment-detection/codegen-near.yml +++ b/packages/payment-detection/codegen-near.yml @@ -1,5 +1,5 @@ overwrite: true -schema: 'https://api.studio.thegraph.com/query/67444/request-payments-near-testnet/version/latest' +schema: 'src/thegraph/queries/near/schema.graphql' documents: src/thegraph/queries/near/*.graphql generates: src/thegraph/generated/graphql-near.ts: diff --git a/packages/payment-detection/src/thegraph/queries/near/schema.graphql b/packages/payment-detection/src/thegraph/queries/near/schema.graphql new file mode 100644 index 000000000..906652604 --- /dev/null +++ b/packages/payment-detection/src/thegraph/queries/near/schema.graphql @@ -0,0 +1,92 @@ +# GraphQL schema for Request Network NEAR payments +# This schema is used for generating TypeScript types for The Graph queries + +type Query { + payments( + where: Payment_filter + orderBy: Payment_orderBy + orderDirection: OrderDirection + ): [Payment!]! +} + +enum OrderDirection { + asc + desc +} + +enum Payment_orderBy { + timestamp + block + amount +} + +input Payment_filter { + reference: String + to: String + tokenAddress: String + contractAddress: String + currency: String + maxRateTimespan_gte: Int +} + +type Payment { + "Unique identifier" + id: ID! + + "The payment recipient address" + to: String! + + "The payment amount" + amount: BigInt! + + "The indexed payment reference" + reference: String! + + "The fee amount" + feeAmount: BigInt + + "The fee recipient address" + feeAddress: String + + "The sender address" + from: String! + + "Block number" + block: Int! + + "Block timestamp (Unix seconds)" + timestamp: Int! + + "Receipt ID (NEAR transaction identifier)" + receiptId: String! + + "Transaction hash" + txHash: String + + "Gas price" + gasPrice: String + + "Gas used" + gasUsed: String + + "The contract address" + contractAddress: String! + + "The token address (null for native NEAR payments)" + tokenAddress: String + + "The currency symbol (for conversion payments)" + currency: String + + "Amount in crypto (for conversion payments)" + amountInCrypto: String + + "Fee amount in crypto (for conversion payments)" + feeAmountInCrypto: String + + "Max rate timespan (for conversion payments)" + maxRateTimespan: Int +} + +scalar BigInt +scalar Bytes