diff --git a/packages/payment-detection/codegen-superfluid.yml b/packages/payment-detection/codegen-superfluid.yml index ab28fb695..64379686e 100644 --- a/packages/payment-detection/codegen-superfluid.yml +++ b/packages/payment-detection/codegen-superfluid.yml @@ -1,5 +1,5 @@ overwrite: true -schema: 'https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-goerli' +schema: 'https://subgraph-endpoints.superfluid.dev/eth-sepolia/protocol-v1' documents: src/thegraph/queries/superfluid/*.graphql generates: src/thegraph/generated/graphql-superfluid.ts: diff --git a/packages/payment-detection/src/thegraph/superfluid.ts b/packages/payment-detection/src/thegraph/superfluid.ts index e869dd736..30924f24a 100644 --- a/packages/payment-detection/src/thegraph/superfluid.ts +++ b/packages/payment-detection/src/thegraph/superfluid.ts @@ -2,7 +2,7 @@ import { GraphQLClient } from 'graphql-request'; import { getSdk } from './generated/graphql-superfluid'; import { RequestConfig } from 'graphql-request/src/types'; -const BASE_URL = `https://api.thegraph.com`; +const BASE_URL = `https://subgraph-endpoints.superfluid.dev`; const NETWORK_TO_URL: Record = { optimism: 'optimism-mainnet', avalanche: 'avalanche-c', @@ -31,8 +31,6 @@ export const getTheGraphSuperfluidClient = ( // which is a better security but would require an update of the // library each time the subgraph is updated, which isn't ideal // for early testing. - const url = `${baseUrl}/subgraphs/name/superfluid-finance/protocol-v1-${ - NETWORK_TO_URL[network] || network - }`; + const url = `${baseUrl}/${NETWORK_TO_URL[network] || network}/protocol-v1`; return getSdk(new GraphQLClient(url, clientOptions)); };