Skip to content
Draft

V3 ormi #2521

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/gold-worms-shop.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'backend': patch
---

v3 subgraphs to ormi
2 changes: 1 addition & 1 deletion codegen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ const files = {
...defaults.types,
},
['modules/subgraphs/reliquary-subgraph/generated/reliquary-subgraph-types.ts']: {
schema: config.FANTOM.subgraphs.reliquary,
schema: config.SONIC.subgraphs.reliquary,
documents: 'modules/subgraphs/reliquary-subgraph/reliquary-subgraph-queries.graphql',
...defaults.types,
config: {
Expand Down
4 changes: 2 additions & 2 deletions config/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2021-08-23',
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-arbitrum-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmWYjRi4vSRZnf6wEAzYPvCYyS6rh4JnEbuYEDKHwKEuJw`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/Qmf4TBCMerVSxnAB6ByM2b73eAAEGyCzGM61yxu74UjLsG`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-arbitrum-one-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-arbitrum-one-smol/latest/gn`,
cowAmm: `https://gateway-arbitrum.network.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmUDGSJXdMzG4ezDzf1LvXVb2igwY6rnaNFLC62ZJZ3Pbv`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-arbitrum/latest/gn`,
aura: 'https://data.aura.finance/graphql',
Expand Down
4 changes: 2 additions & 2 deletions config/avalanche.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2023-06-06',
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-avalanche-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmSj437ejL2f1pMP2r5E2m5GjhqJa3rmbvFD5kyscmq7u2`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmPxfzF4eo5vcy887jjug4pP1dSdQ17eq6cWBvKisVEngz`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-avalanche-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-avalanche-smol/latest/gn`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-avalanche/latest/gn`,
aura: 'https://data.aura.finance/graphql',
},
Expand Down
2 changes: 1 addition & 1 deletion config/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export default <NetworkData>{
startDate: '2023-07-10',
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-base-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmXs2bcH91cbcC8Sz7qW8SFWpDRWbDvZzsz6RmAX5wgxj3`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmcjhEzoEeNFs4QCEyfPgNXASAR8YdckuS2jNieMBwzv2w`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-base-smol/latest/gn`,
cowAmm: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmVRCjhFz7XXJoeJ5t4FdysN2JaBVdUCvpTVoMzXRNjA87`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-base/latest/gn`,
aura: 'https://data.aura.finance/graphql',
Expand Down
4 changes: 2 additions & 2 deletions config/gnosis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2021-08-23',
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-gnosis-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmcQUxfK2rEVSbRBBEd4PimcuVBA8LJttF1pgvTYS5k9bh`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmWmFp3wRq7vYmTCPFbvWFRw8hADmHr1zfo4K1cGCW81B7`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-gnosis-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-gnosis-smol/latest/gn`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-gnosis/latest/gn`,
aura: 'https://data.aura.finance/graphql',
cowAmm: `https://gateway-arbitrum.network.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/Qmb9jmxb2EVWHk7NryKCAbsq2WAZaCV4CmnZne59EbADeh`,
Expand Down
4 changes: 2 additions & 2 deletions config/hyperevm.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2025-06-18',
balancer: ``,
balancerV3: `https://api.goldsky.com/api/public/project_cmcigparivg3z01yhbv14ddl8/subgraphs/balancer-v3-hyperevm/latest/gn`,
balancerPoolsV3: `https://api.goldsky.com/api/public/project_cmcigparivg3z01yhbv14ddl8/subgraphs/balancer-pools-v3-hyperevm/latest/gn`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-hyperevm-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-hyperevm-smol/latest/gn`,
gauge: ``,
},
hooks: {
Expand Down
4 changes: 2 additions & 2 deletions config/mainnet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ export default <NetworkData>{
startDate: '2019-04-20',
cowAmm: `https://gateway-arbitrum.network.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmQ3c9CTJBZdgy3uTLB929ARZucMUCf6piZBDxSgBKnf6m`,
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-mainnet-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmUUDd95Pj2ijZn9NwmxuAd4ApVGtsZCEYLHE6U19dWoSm`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmWGugpAkdbw5CZLdCxmDzZCDNRik2bj4N9RYvuYiX7Mxs`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-mainnet-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-mainnet-smol/latest/gn`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-mainnet/latest/gn`,
aura: 'https://data.aura.finance/graphql',
},
Expand Down
4 changes: 2 additions & 2 deletions config/monad.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2025-09-12',
balancer: ``,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmUjY6FNcecCopHx5sWWMqWCq6yKEXsB2DAPryyBuAYKnT`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmcJsNHBKWWBfF4ma8rMKjwBa1bwdsJdjvLEaKFzEdqP2q`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-monad-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-monad-smol/latest/gn`,
gauge: ``,
},
hooks: {
Expand Down
4 changes: 2 additions & 2 deletions config/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2022-01-01',
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-optimism-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmecD1yHQqmY11rx997C2e4TMP1EGCaX4shZ8AT959bo6Z`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmYcor9K3P83W5q3KxE6SHwbDD7v16hqD9BZdzcF4KUkBu`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-optimism-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-optimism-smol/latest/gn`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-optimism/latest/gn`,
aura: 'https://data.aura.finance/graphql',
},
Expand Down
4 changes: 2 additions & 2 deletions config/plasma.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2025-09-12',
balancer: ``,
balancerV3: `https://api.goldsky.com/api/public/project_cmcigparivg3z01yhbv14ddl8/subgraphs/balancer-v3-plasma/latest/gn`,
balancerPoolsV3: `https://api.goldsky.com/api/public/project_cmcigparivg3z01yhbv14ddl8/subgraphs/balancer-pools-v3-plasma/latest/gn`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-plasma-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-plasma-smol/latest/gn`,
gauge: ``,
},
hooks: {
Expand Down
4 changes: 2 additions & 2 deletions config/sepolia.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
startDate: '2023-05-03',
cowAmm: `https://gateway-arbitrum.network.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmeqeR1YL7xfB2Z7DaykE5Xh1YGGS1AGuoF4qUxSa58K2D`,
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-sepolia-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmQDGZWbqMkjfQeBSCZKcNzGQagoje6BbTdEMESosoTGqq`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmUgs7oFMYjrN2pEb7LEBugZBpHwkfPEZMLkK2TFr1GbbY`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-sepolia-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-sepolia-smol/latest/gn`,
gauge: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/Qme7qpLpcR6VhzfJrCVsRxxRrLj9TqH6Skrg6EUWnRmTzU`,
},
eth: {
Expand Down
4 changes: 2 additions & 2 deletions config/sonic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2024-12-12',
balancer: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v2-sonic-smol/latest/gn`,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmUgRWkb5JUocGkVidpKtZFMHjexJzkBiSbjufURsXwn9X`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmXhuf3ZJn515R1rtvnV9ufwsSZ5j3e2bQnr68GefsJk3K`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-sonic-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-sonic-smol/latest/gn`,
gauge: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/balancer-gauges-sonic/latest/gn`,
reliquary: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/mabeets-sonic/latest/gn`,
sts: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/staked-sonic/latest/gn`,
Expand Down
4 changes: 2 additions & 2 deletions config/xlayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ export default <NetworkData>{
subgraphs: {
startDate: '2025-10-30',
balancer: ``,
balancerV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmX8LawQrPRVywFnjwZG57MomECJRZDw4nNBvwdEHJ3dS3`,
balancerPoolsV3: `https://gateway.thegraph.com/api/${env.THEGRAPH_API_KEY_BALANCER}/deployments/id/QmUDXYphhmEJJSZij5ZwjgLXfz2bnS4Mwr8ZDhfrvbsBYf`,
balancerV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-vault-xlayer-smol/latest/gn`,
balancerPoolsV3: `https://api.subgraph.ormilabs.com/api/public/717cf785-de57-4761-94dd-9ac51b019902/subgraphs/v3-pools-xlayer-smol/latest/gn`,
gauge: ``,
},
hooks: {
Expand Down
4 changes: 2 additions & 2 deletions modules/actions/cow-amm/sync-join-exits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { prisma } from '../../../prisma/prisma-client';
import { CowAmmSubgraphClient } from '../../sources/subgraphs';
import { AddRemove_OrderBy, OrderDirection } from '../../sources/subgraphs/cow-amm/generated/types';
import { joinExitsUsd } from '../../sources/enrichers/join-exits-usd';
import { joinExitV3Transformer } from '../../sources/transformers/join-exit-v3-transformer';
import { eventsRepository, EventStoreRepository } from '../../repositories/events';
import { joinExitCowTransformer } from '../../sources/transformers/join-exit-cow-transformer';

/**
* Get the join and exit events from the subgraph and store them in the database
Expand Down Expand Up @@ -35,7 +35,7 @@ export const syncJoinExits = async (
});

// Prepare DB entries
const dbEntries = await joinExitV3Transformer(addRemoves, chain, 1);
const dbEntries = await joinExitCowTransformer(addRemoves, chain, 1);

console.log(`Syncing Cow AMM ${dbEntries.length} join/exit events`);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1804,6 +1804,7 @@ export type _Meta_ = {
* will be null if the _meta field has a block constraint that asks for
* a block number. It will be filled if the _meta field has no block constraint
* and therefore asks for the latest block
*
*/
block: _Block_;
/** The deployment ID */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ fragment AddRemove on AddRemove {
address
}
}
user {
id
}
user
blockNumber
logIndex
blockTimestamp
Expand Down
Loading