Skip to content
Open
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
15 changes: 15 additions & 0 deletions packages/doc/src/stories/widgets/Pool.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,4 +89,19 @@ Primary.args = {
// onlyChainId: 688689,
showSubmissionSubmittedDialog: true,
// onlyChainId: 1,
// LP fee reward (liquidity mining) activity demo config.
// The per-pool 🔥 badge / "Mining Only" filter is driven by the liquidity
// list's `apy.lpFeeRewardApy`; the banner reward comes from
// `lp_fee_reward_getUserReward` (needs a connected wallet).
lpFeeRewardActivity: {
activity: 'pharos_amm_v3_lp_fee_reward',
title: 'FBTC Liquidity Mining',
description: 'Earn extra $PROS from Jul 01 to Jul 25.',
viewMoreLink: 'https://dodoex.io',
rewardTokenSymbol: 'PROS',
rewardTokenLogo:
'https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48/logo.png',
myRewardsTooltip:
'Rewards are settled daily and can be claimed once the activity ends.',
},
};
5 changes: 3 additions & 2 deletions packages/dodoex-api/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dodoex/api",
"version": "3.8.0",
"version": "3.9.0-alpha.3",
"description": "DODO API Kit",
"source": "src/index.ts",
"types": "dist/types/index.d.ts",
Expand Down Expand Up @@ -103,4 +103,5 @@
"ts-jest": "^29.0.1",
"typescript": "^5.6.3"
}
}
}

11 changes: 11 additions & 0 deletions packages/dodoex-api/src/chainConfig/basicToken.ts
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,10 @@ export const basicTokenMap: {
...DEFAULT_BASIC_TOKEN,
wrappedTokenAddress: '0x4200000000000000000000000000000000000006',
},
[ChainId.RISE]: {
...DEFAULT_BASIC_TOKEN,
wrappedTokenAddress: '0x4200000000000000000000000000000000000006',
},
[ChainId.NEROCHAIN]: {
...DEFAULT_BASIC_TOKEN,
symbol: 'NERO',
Expand Down Expand Up @@ -203,6 +207,13 @@ export const basicTokenMap: {
wrappedTokenSymbol: 'WPHRS',
wrappedTokenAddress: '0x838800b758277cc111b2d48ab01e5e164f8e9471',
},
[ChainId.PHAROS]: {
...DEFAULT_BASIC_TOKEN,
symbol: 'PROS',
name: 'PROS',
wrappedTokenSymbol: 'WPROS',
wrappedTokenAddress: '0x52c48d4213107b20bc583832b0d951fb9ca8f0b0',
},
[ChainId.STABLE_TESTNET]: {
...DEFAULT_BASIC_TOKEN,
symbol: 'gUSDT',
Expand Down
3 changes: 3 additions & 0 deletions packages/dodoex-api/src/chainConfig/chain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ export enum ChainId {

RISE_TESTNET = 11155931,

RISE = 4153,

NEROCHAIN = 1689,

BITLAYER = 200901,
Expand All @@ -61,6 +63,7 @@ export enum ChainId {

PHAROS_TESTNET = 688688,
PHAROS_ATLANTIC_TESTNET = 688689,
PHAROS = 1672,

STABLE_TESTNET = 2201,
STABLE = 988,
Expand Down
32 changes: 31 additions & 1 deletion packages/dodoex-api/src/chainConfig/contractConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import {
pharosAtlanticTestnet,
stableTestnet,
stable,
eni
eni,
rise,
pharos
} from '@dodoex/dodo-contract-request';
import { ChainId } from './chain';

Expand Down Expand Up @@ -390,6 +392,20 @@ const contractMap: {
DODO_DPP_PROXY: riseTestnet.DODODppProxy,
DODO_MINEV3_PROXY: riseTestnet.DODOMineV3Proxy,
},
[ChainId.RISE]: {
MULTI_CALL: rise.MulticallWithValid,
DODO_APPROVE: rise.DODOApprove,
ERC20_HELPER: rise.ERC20Helper,

ROUTE_V2_DATA_FETCH: rise.DODOV2RouteHelper,
ROUTE_V1_DATA_FETCH: rise.DODOV1PmmHelper,
CALLEE_HELPER: rise.DODOCalleeHelper,

DODO_PROXY: rise.DODOV2Proxy02,
DODO_DSP_PROXY: rise.DODODspProxy,
DODO_DPP_PROXY: rise.DODODppProxy,
DODO_MINEV3_PROXY: rise.DODOMineV3Proxy,
},
[ChainId.NEROCHAIN]: {
MULTI_CALL: nero.MulticallWithValid,
DODO_APPROVE: nero.DODOApprove,
Expand Down Expand Up @@ -516,6 +532,20 @@ const contractMap: {
DODO_DPP_PROXY: pharosAtlanticTestnet.DODODppProxy,
DODO_MINEV3_PROXY: pharosAtlanticTestnet.DODOMineV3Proxy,
},
[ChainId.PHAROS]: {
MULTI_CALL: pharos.MulticallWithValid,
DODO_APPROVE: pharos.DODOApprove,
ERC20_HELPER: pharos.ERC20Helper,

ROUTE_V2_DATA_FETCH: pharos.DODOV2RouteHelper,
ROUTE_V1_DATA_FETCH: pharos.DODOV1PmmHelper,
CALLEE_HELPER: pharos.DODOCalleeHelper,

DODO_PROXY: pharos.DODOV2Proxy02,
DODO_DSP_PROXY: pharos.DODODspProxy,
DODO_DPP_PROXY: pharos.DODODppProxy,
DODO_MINEV3_PROXY: pharos.DODOMineV3Proxy,
},
[ChainId.STABLE_TESTNET]: {
MULTI_CALL: stableTestnet.MulticallWithValid,
DODO_APPROVE: stableTestnet.DODOApprove,
Expand Down
2 changes: 2 additions & 0 deletions packages/dodoex-api/src/chainConfig/platform.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export const platformIdMap: {
[ChainId.NEOX]: 'neox',
[ChainId.MORPH]: 'morph',
[ChainId.RISE_TESTNET]: 'rise-testnet',
[ChainId.RISE]: 'rise',
[ChainId.NEROCHAIN]: 'nero',
[ChainId.BITLAYER]: 'btr',
[ChainId.ZIRCUIT]: 'zircuit-mainnet',
Expand All @@ -36,6 +37,7 @@ export const platformIdMap: {
[ChainId.HEMI]: 'hemi',
[ChainId.PHAROS_TESTNET]: 'pharos-testnet',
[ChainId.PHAROS_ATLANTIC_TESTNET]: 'pharos-atlantic-testnet',
[ChainId.PHAROS]: 'pharos',
[ChainId.STABLE_TESTNET]: 'stable-testnet',
[ChainId.STABLE]: 'stable',
[ChainId.ENI]: 'eni',
Expand Down
29 changes: 27 additions & 2 deletions packages/dodoex-api/src/gql/fragment-masking.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/* eslint-disable */
import {
ResultOf,
DocumentTypeDecoration,
Expand All @@ -20,7 +21,17 @@ export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>>,
): TType;
// return nullable if `fragmentType` is undefined
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | undefined,
): TType | undefined;
// return nullable if `fragmentType` is nullable
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType: FragmentType<DocumentTypeDecoration<TType, any>> | null,
): TType | null;
// return nullable if `fragmentType` is nullable or undefined
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType:
Expand All @@ -29,11 +40,24 @@ export function useFragment<TType>(
| undefined,
): TType | null | undefined;
// return array of non-nullable if `fragmentType` is array of non-nullable
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType: Array<FragmentType<DocumentTypeDecoration<TType, any>>>,
): Array<TType>;
// return array of nullable if `fragmentType` is array of nullable
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType:
| Array<FragmentType<DocumentTypeDecoration<TType, any>>>
| null
| undefined,
): Array<TType> | null | undefined;
// return readonly array of non-nullable if `fragmentType` is array of non-nullable
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType: ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>,
): ReadonlyArray<TType>;
// return array of nullable if `fragmentType` is array of nullable
// return readonly array of nullable if `fragmentType` is array of nullable
export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType:
Expand All @@ -45,10 +69,11 @@ export function useFragment<TType>(
_documentNode: DocumentTypeDecoration<TType, any>,
fragmentType:
| FragmentType<DocumentTypeDecoration<TType, any>>
| Array<FragmentType<DocumentTypeDecoration<TType, any>>>
| ReadonlyArray<FragmentType<DocumentTypeDecoration<TType, any>>>
| null
| undefined,
): TType | ReadonlyArray<TType> | null | undefined {
): TType | Array<TType> | ReadonlyArray<TType> | null | undefined {
return fragmentType as any;
}

Expand Down
Loading
Loading