Skip to content

Commit

Permalink
feat: enhance GraphQL queries and types to support metrom mining APY …
Browse files Browse the repository at this point in the history
…calculations across liquidity and pool data
  • Loading branch information
yrjkqq committed Jan 15, 2025
1 parent 0d25a6c commit c770671
Show file tree
Hide file tree
Showing 12 changed files with 167 additions and 106 deletions.
4 changes: 2 additions & 2 deletions packages/doc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/components": "^3.0.0-beta.0",
"@dodoex/components": "^3.0.2",
"@emotion/styled": "^11.10.0",
"@storybook/addon-docs": "^8.3.5",
"@web3modal/ethers5": "^3.5.5",
Expand Down Expand Up @@ -48,4 +48,4 @@
"typescript": "^5.6.3",
"webpack": "5"
}
}
}
2 changes: 1 addition & 1 deletion packages/dodoex-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/api",
"version": "3.0.3-morph.6",
"version": "3.0.3-morph.7",
"description": "DODO API Kit",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand Down
12 changes: 6 additions & 6 deletions packages/dodoex-api/src/gql/gql.ts

Large diffs are not rendered by default.

24 changes: 24 additions & 0 deletions packages/dodoex-api/src/gql/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6644,6 +6644,7 @@ export type Liquidator_OrderBy =
| 'updatedAt';

export type LiquidityApyData = {
metromMiningApy?: Maybe<Scalars['BigDecimal']['output']>;
miningBaseApy?: Maybe<Scalars['BigDecimal']['output']>;
miningQuoteApy?: Maybe<Scalars['BigDecimal']['output']>;
transactionBaseApy?: Maybe<Scalars['BigDecimal']['output']>;
Expand Down Expand Up @@ -8123,6 +8124,17 @@ export type Market_Maker_Pool_ApplypoolApplyData = {
name?: InputMaybe<Scalars['String']['input']>;
};

export type MetromChainInput = {
chainId: Scalars['BigDecimal']['input'];
};

export type MetromPool = {
apr: Scalars['BigDecimal']['output'];
apy: Scalars['BigDecimal']['output'];
chainId: Scalars['BigDecimal']['output'];
pool: Scalars['String']['output'];
};

export type MinePool = {
chain: Scalars['String']['output'];
/** creator */
Expand Down Expand Up @@ -12380,6 +12392,8 @@ export type Query = {
/** data url:post(https://host:port/manage/slippage_tolerance_list).data */
manage_slippage_tolerance_list?: Maybe<Array<Maybe<ManageSlippageTolerance>>>;
market_maker_pool_apply_create?: Maybe<Market_Maker_Pool_ApplyData>;
/** 获取Metrom的池子列表 */
metrom_getPools: Array<Maybe<MetromPool>>;
minePool?: Maybe<MinePool>;
minePools: Array<MinePool>;
miningPool?: Maybe<MiningPool>;
Expand Down Expand Up @@ -13756,6 +13770,10 @@ export type QueryMarket_Maker_Pool_Apply_CreateArgs = {
data?: InputMaybe<Market_Maker_Pool_ApplypoolApplyData>;
};

export type QueryMetrom_GetPoolsArgs = {
where?: InputMaybe<MetromChainInput>;
};

export type QueryMinePoolArgs = {
block?: InputMaybe<Block_Height>;
id: Scalars['ID']['input'];
Expand Down Expand Up @@ -20926,6 +20944,7 @@ export type FetchLiquidityListQuery = {
miningQuoteApy?: any | null;
transactionBaseApy?: any | null;
transactionQuoteApy?: any | null;
metromMiningApy?: any | null;
} | null;
} | null;
} | null> | null;
Expand Down Expand Up @@ -21002,6 +21021,7 @@ export type FetchMyLiquidityListQuery = {
miningQuoteApy?: any | null;
transactionBaseApy?: any | null;
transactionQuoteApy?: any | null;
metromMiningApy?: any | null;
} | null;
} | null;
} | null> | null;
Expand Down Expand Up @@ -21090,6 +21110,7 @@ export type FetchPoolQuery = {
miningQuoteApy?: any | null;
transactionBaseApy?: any | null;
transactionQuoteApy?: any | null;
metromMiningApy?: any | null;
} | null;
} | null;
} | null> | null;
Expand Down Expand Up @@ -21775,6 +21796,7 @@ export const FetchLiquidityListDocument = new TypedDocumentString(`
miningQuoteApy
transactionBaseApy
transactionQuoteApy
metromMiningApy
}
miningAddress
volume24H
Expand Down Expand Up @@ -21857,6 +21879,7 @@ export const FetchMyLiquidityListDocument = new TypedDocumentString(`
miningQuoteApy
transactionBaseApy
transactionQuoteApy
metromMiningApy
}
miningAddress
volume24H
Expand Down Expand Up @@ -21949,6 +21972,7 @@ export const FetchPoolDocument = new TypedDocumentString(`
miningQuoteApy
transactionBaseApy
transactionQuoteApy
metromMiningApy
}
miningAddress
}
Expand Down
3 changes: 3 additions & 0 deletions packages/dodoex-api/src/services/pool/graphqlQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ export const poolGraphqlQuery = {
miningQuoteApy
transactionBaseApy
transactionQuoteApy
metromMiningApy
}
miningAddress
volume24H
Expand Down Expand Up @@ -170,6 +171,7 @@ export const poolGraphqlQuery = {
miningQuoteApy
transactionBaseApy
transactionQuoteApy
metromMiningApy
}
miningAddress
volume24H
Expand Down Expand Up @@ -260,6 +262,7 @@ export const poolGraphqlQuery = {
miningQuoteApy
transactionBaseApy
transactionQuoteApy
metromMiningApy
}
miningAddress
}
Expand Down
4 changes: 2 additions & 2 deletions packages/dodoex-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/components",
"version": "3.0.1",
"version": "3.0.2",
"description": "UI component library",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -40,7 +40,7 @@
"license": "GPL-3.0-or-later",
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/icons": "^2.0.1",
"@dodoex/icons": "^2.0.2",
"@emotion/react": "^11.10.0",
"@emotion/styled": "^11.10.0",
"@mui/base": "5.0.0-beta.58",
Expand Down
6 changes: 3 additions & 3 deletions packages/dodoex-widgets/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/widgets",
"version": "3.0.2-beta.5",
"version": "3.0.2-beta.6",
"description": "DODO Widgets",
"source": "src/index.tsx",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -58,8 +58,8 @@
},
"dependencies": {
"@babel/runtime": "^7.17.0",
"@dodoex/api": "3.0.3-morph.6",
"@dodoex/components": "3.0.1",
"@dodoex/api": "3.0.3-morph.7",
"@dodoex/components": "3.0.2",
"@dodoex/contract-request": "^1.3.0",
"@dodoex/dodo-contract-request": "^1.9.0-alpha.3",
"@dodoex/icons": "^2.0.2",
Expand Down
Loading

0 comments on commit c770671

Please sign in to comment.