Skip to content

Commit

Permalink
fetch up to 1000 entries, and use mainnet subgraph
Browse files Browse the repository at this point in the history
  • Loading branch information
tyler17 committed Sep 28, 2024
1 parent d2bf132 commit aa71865
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/gql/queries/subgraph/allDelegations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { gql } from 'graphql-request';

export const allDelegations = gql`
{
delegations {
delegations(first: 1000) {
delegator
delegate {
id
Expand Down
2 changes: 1 addition & 1 deletion modules/gql/queries/subgraph/delegateHistoryArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { gql } from 'graphql-request';

export const delegateHistoryArray = gql`
query delegateHistoryArray($delegates: [String!]!) {
delegates(where: { id_in: $delegates }) {
delegates(first: 1000, where: { id_in: $delegates }) {
delegationHistory {
amount
accumulatedAmount
Expand Down
2 changes: 1 addition & 1 deletion modules/gql/queries/subgraph/delegatorHistory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { gql } from 'graphql-request';

export const delegatorHistory = gql`
query delegatorHistory($address: String!) {
delegationHistories(where: { delegator: $address }) {
delegationHistories(first: 1000, where: { delegator: $address }) {
amount
accumulatedAmount
delegate {
Expand Down
5 changes: 3 additions & 2 deletions modules/web3/constants/networks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ import {
MAINNET_SPOCK_URL,
STAGING_MAINNET_SPOCK_URL,
TENDERLY_SPOCK_URL,
TENDERLY_SUBGRAPH_URL
TENDERLY_SUBGRAPH_URL,
MAINNET_SUBGRAPH_URL
} from 'modules/gql/gql.constants';

export enum SupportedConnectors {
Expand Down Expand Up @@ -62,7 +63,7 @@ export const CHAIN_INFO: ChainInfo = {
defaultRpc: NodeProviders.ALCHEMY,
spockUrl:
process.env.NEXT_PUBLIC_VERCEL_ENV === 'development' ? STAGING_MAINNET_SPOCK_URL : MAINNET_SPOCK_URL,
subgraphUrl: TENDERLY_SUBGRAPH_URL,
subgraphUrl: MAINNET_SUBGRAPH_URL,
rpcs: {
[NodeProviders.INFURA]: `https://mainnet.infura.io/v3/${config.INFURA_KEY}`,
[NodeProviders.ALCHEMY]: `https://eth-mainnet.g.alchemy.com/v2/${config.ALCHEMY_KEY}`
Expand Down

0 comments on commit aa71865

Please sign in to comment.