diff --git a/packages/sdk-core/package.json b/packages/sdk-core/package.json index 476b0ddca7..4dc2cb66d5 100644 --- a/packages/sdk-core/package.json +++ b/packages/sdk-core/package.json @@ -48,9 +48,8 @@ "generate:graphql-types": "graphql-codegen --config subgraph-codegen.yml", "generate-graphql-schema": "yarn generate-graphql-schema:v1", "generate-graphql-schema:local": "get-graphql-schema http://localhost:8000/subgraphs/name/superfluid-test > src/subgraph/schema.graphql", - "generate-graphql-schema:v1": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-v1-optimism-sepolia > src/subgraph/schema.graphql", - "generate-graphql-schema:dev": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-optimism-sepolia > src/subgraph/schema.graphql", - "generate-graphql-schema:feature": "get-graphql-schema https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-feature-matic > src/subgraph/schema.graphql", + "generate-graphql-schema:v1": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1 > src/subgraph/schema.graphql", + "generate-graphql-schema:dev": "get-graphql-schema https://subgraph-endpoints.superfluid.dev/optimism-sepolia/protocol-v1 > src/subgraph/schema.graphql", "cloc": "sh tasks/cloc.sh" }, "bugs": { diff --git a/packages/sdk-core/src/subgraph/.graphqlconfig b/packages/sdk-core/src/subgraph/.graphqlconfig index 5deb8e10e8..09ca050d76 100644 --- a/packages/sdk-core/src/subgraph/.graphqlconfig +++ b/packages/sdk-core/src/subgraph/.graphqlconfig @@ -4,7 +4,7 @@ "extensions": { "endpoints": { "Default GraphQL Endpoint": { - "url": "https://api.thegraph.com/subgraphs/name/superfluid-finance/protocol-dev-optimism-sepolia", + "url": "https://subgraph-endpoints.superfluid.dev/optimism-mainnet/protocol-v1", "headers": { "user-agent": "JS GraphQL" }, diff --git a/packages/sdk-core/src/subgraph/schema.graphql b/packages/sdk-core/src/subgraph/schema.graphql index 7c93eab6f2..fb5e6f06c5 100644 --- a/packages/sdk-core/src/subgraph/schema.graphql +++ b/packages/sdk-core/src/subgraph/schema.graphql @@ -21,9 +21,6 @@ type _Block_ { """Integer representation of the timestamp stored in blocks for the chain""" timestamp: Int - - """The hash of the parent block""" - parentHash: Bytes } """The type for the top-level _meta field""" @@ -176,6 +173,8 @@ type AccountTokenSnapshot { """ id: ID! + createdAtTimestamp: BigInt! + createdAtBlockNumber: BigInt! updatedAtTimestamp: BigInt! updatedAtBlockNumber: BigInt! @@ -419,6 +418,22 @@ input AccountTokenSnapshot_filter { id_lte: ID id_in: [ID!] id_not_in: [ID!] + createdAtTimestamp: BigInt + createdAtTimestamp_not: BigInt + createdAtTimestamp_gt: BigInt + createdAtTimestamp_lt: BigInt + createdAtTimestamp_gte: BigInt + createdAtTimestamp_lte: BigInt + createdAtTimestamp_in: [BigInt!] + createdAtTimestamp_not_in: [BigInt!] + createdAtBlockNumber: BigInt + createdAtBlockNumber_not: BigInt + createdAtBlockNumber_gt: BigInt + createdAtBlockNumber_lt: BigInt + createdAtBlockNumber_gte: BigInt + createdAtBlockNumber_lte: BigInt + createdAtBlockNumber_in: [BigInt!] + createdAtBlockNumber_not_in: [BigInt!] updatedAtTimestamp: BigInt updatedAtTimestamp_not: BigInt updatedAtTimestamp_gt: BigInt @@ -772,6 +787,8 @@ input AccountTokenSnapshot_filter { enum AccountTokenSnapshot_orderBy { id + createdAtTimestamp + createdAtBlockNumber updatedAtTimestamp updatedAtBlockNumber isLiquidationEstimateOptimistic @@ -1546,6 +1563,8 @@ enum AccountTokenSnapshotLog_orderBy { token__underlyingAddress accountTokenSnapshot accountTokenSnapshot__id + accountTokenSnapshot__createdAtTimestamp + accountTokenSnapshot__createdAtBlockNumber accountTokenSnapshot__updatedAtTimestamp accountTokenSnapshot__updatedAtBlockNumber accountTokenSnapshot__isLiquidationEstimateOptimistic @@ -1586,11 +1605,6 @@ enum AccountTokenSnapshotLog_orderBy { accountTokenSnapshot__totalAmountTransferredUntilUpdatedAt } -enum Aggregation_interval { - hour - day -} - type AgreementClassRegisteredEvent implements Event { id: ID! transactionHash: Bytes! @@ -5371,6 +5385,8 @@ enum FlowOperator_orderBy { token__underlyingAddress accountTokenSnapshot accountTokenSnapshot__id + accountTokenSnapshot__createdAtTimestamp + accountTokenSnapshot__createdAtBlockNumber accountTokenSnapshot__updatedAtTimestamp accountTokenSnapshot__updatedAtBlockNumber accountTokenSnapshot__isLiquidationEstimateOptimistic @@ -20346,6 +20362,11 @@ type Token { """ underlyingToken: Token + + """ + If `governanceConfig.id` is the zero address, the token uses the default governance config. + + """ governanceConfig: TokenGovernanceConfig }