diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index bc48d1adfd..c99cb29c82 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install modules - run: npm install + run: npm install --legacy-peer-deps - name: Run lint check run: npm run lint Unit-tests: @@ -15,7 +15,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install modules - run: npm ci + run: npm ci --legacy-peer-deps - name: Run tests run: npm test -- --coverage # - name: Upload coverage 📤 @@ -28,7 +28,7 @@ jobs: steps: - uses: actions/checkout@v2 - name: Install modules - run: npm ci + run: npm ci --legacy-peer-deps - name: Run build check run: npm run build env: diff --git a/src/graphql/market_data.graphql b/src/graphql/market_data.graphql index 5fafb817e6..13511a96ef 100644 --- a/src/graphql/market_data.graphql +++ b/src/graphql/market_data.graphql @@ -12,6 +12,12 @@ query MarketData ($denom: String) { supply { coins } + adjustedSupply: adjusted_supply(order_by: {height: desc}, limit: 1) { + value + } + apr: apr(order_by: {height: desc}, limit: 1) { + value + } bondedTokens: staking_pool(order_by: {height: desc}, limit: 1) { bonded_tokens } diff --git a/src/graphql/tokenomics.graphql b/src/graphql/tokenomics.graphql index 783cfd99ee..7bd3e85eed 100644 --- a/src/graphql/tokenomics.graphql +++ b/src/graphql/tokenomics.graphql @@ -9,4 +9,7 @@ query Tokenomics{ supply: supply(order_by: {height: desc}, limit: 1) { coins } + adjustedSupply: adjusted_supply(order_by: {height: desc}, limit: 1) { + value + } } diff --git a/src/graphql/types.tsx b/src/graphql/types.tsx index b552d8a5ff..581bc244d0 100644 --- a/src/graphql/types.tsx +++ b/src/graphql/types.tsx @@ -342,6 +342,266 @@ export enum Account_Select_Column { Address = 'address' } +/** columns and relationships of "adjusted_supply" */ +export type Adjusted_Supply = { + __typename?: 'adjusted_supply'; + height: Scalars['bigint']; + value: Scalars['numeric']; +}; + +/** aggregated selection of "adjusted_supply" */ +export type Adjusted_Supply_Aggregate = { + __typename?: 'adjusted_supply_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "adjusted_supply" */ +export type Adjusted_Supply_Aggregate_Fields = { + __typename?: 'adjusted_supply_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "adjusted_supply" */ +export type Adjusted_Supply_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; +}; + +/** aggregate avg on columns */ +export type Adjusted_Supply_Avg_Fields = { + __typename?: 'adjusted_supply_avg_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** Boolean expression to filter rows from the table "adjusted_supply". All fields are combined with a logical 'AND'. */ +export type Adjusted_Supply_Bool_Exp = { + _and?: Maybe>; + _not?: Maybe; + _or?: Maybe>; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate max on columns */ +export type Adjusted_Supply_Max_Fields = { + __typename?: 'adjusted_supply_max_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate min on columns */ +export type Adjusted_Supply_Min_Fields = { + __typename?: 'adjusted_supply_min_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** Ordering options when selecting data from "adjusted_supply". */ +export type Adjusted_Supply_Order_By = { + height?: Maybe; + value?: Maybe; +}; + +/** select columns of table "adjusted_supply" */ +export enum Adjusted_Supply_Select_Column { + /** column name */ + Height = 'height', + /** column name */ + Value = 'value' +} + +/** aggregate stddev on columns */ +export type Adjusted_Supply_Stddev_Fields = { + __typename?: 'adjusted_supply_stddev_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Adjusted_Supply_Stddev_Pop_Fields = { + __typename?: 'adjusted_supply_stddev_pop_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Adjusted_Supply_Stddev_Samp_Fields = { + __typename?: 'adjusted_supply_stddev_samp_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate sum on columns */ +export type Adjusted_Supply_Sum_Fields = { + __typename?: 'adjusted_supply_sum_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Adjusted_Supply_Var_Pop_Fields = { + __typename?: 'adjusted_supply_var_pop_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Adjusted_Supply_Var_Samp_Fields = { + __typename?: 'adjusted_supply_var_samp_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate variance on columns */ +export type Adjusted_Supply_Variance_Fields = { + __typename?: 'adjusted_supply_variance_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** columns and relationships of "apr" */ +export type Apr = { + __typename?: 'apr'; + height: Scalars['bigint']; + value: Scalars['numeric']; +}; + +/** aggregated selection of "apr" */ +export type Apr_Aggregate = { + __typename?: 'apr_aggregate'; + aggregate?: Maybe; + nodes: Array; +}; + +/** aggregate fields of "apr" */ +export type Apr_Aggregate_Fields = { + __typename?: 'apr_aggregate_fields'; + avg?: Maybe; + count: Scalars['Int']; + max?: Maybe; + min?: Maybe; + stddev?: Maybe; + stddev_pop?: Maybe; + stddev_samp?: Maybe; + sum?: Maybe; + var_pop?: Maybe; + var_samp?: Maybe; + variance?: Maybe; +}; + + +/** aggregate fields of "apr" */ +export type Apr_Aggregate_FieldsCountArgs = { + columns?: Maybe>; + distinct?: Maybe; +}; + +/** aggregate avg on columns */ +export type Apr_Avg_Fields = { + __typename?: 'apr_avg_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** Boolean expression to filter rows from the table "apr". All fields are combined with a logical 'AND'. */ +export type Apr_Bool_Exp = { + _and?: Maybe>; + _not?: Maybe; + _or?: Maybe>; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate max on columns */ +export type Apr_Max_Fields = { + __typename?: 'apr_max_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate min on columns */ +export type Apr_Min_Fields = { + __typename?: 'apr_min_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** Ordering options when selecting data from "apr". */ +export type Apr_Order_By = { + height?: Maybe; + value?: Maybe; +}; + +/** select columns of table "apr" */ +export enum Apr_Select_Column { + /** column name */ + Height = 'height', + /** column name */ + Value = 'value' +} + +/** aggregate stddev on columns */ +export type Apr_Stddev_Fields = { + __typename?: 'apr_stddev_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate stddev_pop on columns */ +export type Apr_Stddev_Pop_Fields = { + __typename?: 'apr_stddev_pop_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate stddev_samp on columns */ +export type Apr_Stddev_Samp_Fields = { + __typename?: 'apr_stddev_samp_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate sum on columns */ +export type Apr_Sum_Fields = { + __typename?: 'apr_sum_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate var_pop on columns */ +export type Apr_Var_Pop_Fields = { + __typename?: 'apr_var_pop_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate var_samp on columns */ +export type Apr_Var_Samp_Fields = { + __typename?: 'apr_var_samp_fields'; + height?: Maybe; + value?: Maybe; +}; + +/** aggregate variance on columns */ +export type Apr_Variance_Fields = { + __typename?: 'apr_variance_fields'; + height?: Maybe; + value?: Maybe; +}; + /** columns and relationships of "average_block_time_from_genesis" */ export type Average_Block_Time_From_Genesis = { __typename?: 'average_block_time_from_genesis'; @@ -6203,6 +6463,14 @@ export type Query_Root = { action_validator_delegations?: Maybe; action_validator_redelegations_from?: Maybe; action_validator_unbonding_delegations?: Maybe; + /** fetch data from the table: "adjusted_supply" */ + adjusted_supply: Array; + /** fetch aggregated fields from the table: "adjusted_supply" */ + adjusted_supply_aggregate: Adjusted_Supply_Aggregate; + /** fetch data from the table: "apr" */ + apr: Array; + /** fetch aggregated fields from the table: "apr" */ + apr_aggregate: Apr_Aggregate; /** fetch data from the table: "average_block_time_from_genesis" */ average_block_time_from_genesis: Array; /** fetch aggregated fields from the table: "average_block_time_from_genesis" */ @@ -6577,6 +6845,42 @@ export type Query_RootAction_Validator_Unbonding_DelegationsArgs = { }; +export type Query_RootAdjusted_SupplyArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +export type Query_RootAdjusted_Supply_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +export type Query_RootAprArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +export type Query_RootApr_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + export type Query_RootAverage_Block_Time_From_GenesisArgs = { distinct_on?: Maybe>; limit?: Maybe; @@ -8078,6 +8382,14 @@ export type Subscription_Root = { account_aggregate: Account_Aggregate; /** fetch data from the table: "account" using primary key columns */ account_by_pk?: Maybe; + /** fetch data from the table: "adjusted_supply" */ + adjusted_supply: Array; + /** fetch aggregated fields from the table: "adjusted_supply" */ + adjusted_supply_aggregate: Adjusted_Supply_Aggregate; + /** fetch data from the table: "apr" */ + apr: Array; + /** fetch aggregated fields from the table: "apr" */ + apr_aggregate: Apr_Aggregate; /** fetch data from the table: "average_block_time_from_genesis" */ average_block_time_from_genesis: Array; /** fetch aggregated fields from the table: "average_block_time_from_genesis" */ @@ -8366,6 +8678,42 @@ export type Subscription_RootAccount_By_PkArgs = { }; +export type Subscription_RootAdjusted_SupplyArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +export type Subscription_RootAdjusted_Supply_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +export type Subscription_RootAprArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + +export type Subscription_RootApr_AggregateArgs = { + distinct_on?: Maybe>; + limit?: Maybe; + offset?: Maybe; + order_by?: Maybe>; + where?: Maybe; +}; + + export type Subscription_RootAverage_Block_Time_From_GenesisArgs = { distinct_on?: Maybe>; limit?: Maybe; @@ -13107,6 +13455,12 @@ export type MarketDataQuery = { communityPool: Array<( )>, supply: Array<( { __typename?: 'supply' } & Pick + )>, adjustedSupply: Array<( + { __typename?: 'adjusted_supply' } + & Pick + )>, apr: Array<( + { __typename?: 'apr' } + & Pick )>, bondedTokens: Array<( { __typename?: 'staking_pool' } & Pick @@ -13279,6 +13633,9 @@ export type TokenomicsQuery = { stakingParams: Array<( )>, supply: Array<( { __typename?: 'supply' } & Pick + )>, adjustedSupply: Array<( + { __typename?: 'adjusted_supply' } + & Pick )> }; export type TransactionDetailsQueryVariables = Exact<{ @@ -14239,6 +14596,12 @@ export const MarketDataDocument = gql` supply { coins } + adjustedSupply: adjusted_supply(order_by: {height: desc}, limit: 1) { + value + } + apr: apr(order_by: {height: desc}, limit: 1) { + value + } bondedTokens: staking_pool(order_by: {height: desc}, limit: 1) { bonded_tokens } @@ -14690,6 +15053,9 @@ export const TokenomicsDocument = gql` supply: supply(order_by: {height: desc}, limit: 1) { coins } + adjustedSupply: adjusted_supply(order_by: {height: desc}, limit: 1) { + value + } } `; diff --git a/src/pages/_document.tsx b/src/pages/_document.tsx index 3d00bfe389..06ecfa4160 100644 --- a/src/pages/_document.tsx +++ b/src/pages/_document.tsx @@ -19,6 +19,11 @@ export default class MyDocument extends Document { 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-NWBZN9R');` }} /> +