Skip to content

Commit

Permalink
Update subgraph endpoints (#1039)
Browse files Browse the repository at this point in the history
  • Loading branch information
medariox authored Jun 1, 2024
1 parent b33dcf0 commit 6a373aa
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 17 deletions.
9 changes: 5 additions & 4 deletions apps/dapp/src/constants/env/local.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,17 @@ const env: Environment = {
// TODO: These need updated to the templedao organization subgraphs once they are deployed
templeCore: 'http://localhost:8000/subgraphs/name/templedao-core',
protocolMetrics:
'https://api.thegraph.com/subgraphs/name/medariox/temple-metrics',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-metrics/api',
protocolMetricsArbitrum:
'https://api.thegraph.com/subgraphs/name/medariox/temple-metrics-arbitrum',
'https://api.studio.thegraph.com/query/76011/temple-metrics-arbitrum/version/latest',
// TODO: This is not used anymore and should be removed
balancerV2:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-balancer-v2',
// TODO: Will be deprecated
ramos: 'https://api.thegraph.com/subgraphs/name/templedao/templedao-ramos',
ramos: 'https://api.studio.thegraph.com/query/76011/temple-ramos/version/latest',
// templeV2: 'https://api.studio.thegraph.com/query/520/v2-sepolia/version/latest',
templeV2:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-v2-mainnet',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-v2-mainnet/api',
templeV2Balances:
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-v2-balances/api',

Expand Down
11 changes: 6 additions & 5 deletions apps/dapp/src/constants/env/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -51,17 +51,18 @@ const env: Environment = {
subgraph: {
// TODO: These need updated to the templedao organization subgraphs once they are deployed
templeCore:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-core',
'https://api.studio.thegraph.com/query/76011/temple-core/version/latest',
protocolMetrics:
'https://api.thegraph.com/subgraphs/name/medariox/temple-metrics',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-metrics/api',
protocolMetricsArbitrum:
'https://api.thegraph.com/subgraphs/name/medariox/temple-metrics-arbitrum',
'https://api.studio.thegraph.com/query/76011/temple-metrics-arbitrum/version/latest',
// TODO: This is not used anymore and should be removed
balancerV2:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-balancer-v2',
// TODO: Will be deprecated
ramos: 'https://api.thegraph.com/subgraphs/name/templedao/templedao-ramos',
ramos: 'https://api.studio.thegraph.com/query/76011/temple-ramos/version/latest',
templeV2:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-v2-mainnet',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-v2-mainnet/api',
templeV2Balances:
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-v2-balances/api',
// Original Balancer Subgraph
Expand Down
11 changes: 6 additions & 5 deletions apps/dapp/src/constants/env/production.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -236,17 +236,18 @@ const env: Environment = {
subgraph: {
// TODO: These need updated to the templedao organization subgraphs once they are deployed
templeCore:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-core',
'https://api.studio.thegraph.com/query/76011/temple-core/version/latest',
protocolMetrics:
'https://api.thegraph.com/subgraphs/name/medariox/temple-metrics',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-metrics/api',
protocolMetricsArbitrum:
'https://api.thegraph.com/subgraphs/name/medariox/temple-metrics-arbitrum',
'https://api.studio.thegraph.com/query/76011/temple-metrics-arbitrum/version/latest',
// TODO: This is not used anymore and should be removed
balancerV2:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-balancer-v2',
// TODO: Will be deprecated
ramos: 'https://api.thegraph.com/subgraphs/name/templedao/templedao-ramos',
ramos: 'https://api.studio.thegraph.com/query/76011/temple-ramos/version/latest',
templeV2:
'https://api.thegraph.com/subgraphs/name/templedao/templedao-v2-mainnet',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-v2-mainnet/api',
templeV2Balances:
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-v2-balances/api',
// Original Balancer Subgraph
Expand Down
4 changes: 2 additions & 2 deletions apps/dapp/src/hooks/use-refreshable-price-metrics.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export default function useRefreshablePriceMetrics(intervalMinutes = 20) {

async function refreshMetrics() {
const hourlyRequest = await fetch(
'https://api.thegraph.com/subgraphs/name/templedao/templedao-metrics',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-metrics/api',
{
method: 'POST',
headers: {
Expand All @@ -40,7 +40,7 @@ export default function useRefreshablePriceMetrics(intervalMinutes = 20) {
);

const dailyRequest = await fetch(
'https://api.thegraph.com/subgraphs/name/templedao/templedao-metrics',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-metrics/api',
{
method: 'POST',
headers: {
Expand Down
2 changes: 1 addition & 1 deletion apps/dapp/src/utils/subgraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export const fetchSubgraph = async <R extends SubGraphResponse<object>>(
query: string
) => {
return fetchGenericSubgraph<R>(
'https://api.thegraph.com/subgraphs/name/templedao/templedao-metrics',
'https://subgraph.satsuma-prod.com/a912521dd162/templedao/temple-metrics/api',
query
);
};
Expand Down

0 comments on commit 6a373aa

Please sign in to comment.