@dodoex/widgets 3.0.3-neox.9 → 3.0.4-ve33.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/locales/en-US.js +1 -1
- package/dist/cjs/locales/zh-CN.js +1 -1
- package/dist/{helper-AjnHSFsf.cjs → helper-BPuHWVRM.cjs} +1 -1
- package/dist/{helper-0hzCeJrS.js → helper-t_Ye_aBf.js} +1 -1
- package/dist/{index-Qj9OIRRb.js → index-BA5HePEm.js} +1 -1
- package/dist/index-C8qblH3I.js +32 -0
- package/dist/index-CQTOLjzQ.cjs +32 -0
- package/dist/{index-DjwU4kAc.js → index-CTWa5eCR.js} +1 -1
- package/dist/{index-HyEGLl2q.cjs → index-Cg3PeApO.cjs} +1 -1
- package/dist/{index-BvhDPlnr.cjs → index-al7nXNyl.cjs} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/locales/en-US.js +1 -1
- package/dist/locales/zh-CN.js +1 -1
- package/dist/types/components/AddressWithLinkAndCopy.d.ts +3 -1
- package/dist/types/components/CardWidgets.d.ts +1 -0
- package/dist/types/components/Swap/components/Dialog.d.ts +0 -2
- package/dist/types/components/Swap/components/ReviewDialog.d.ts +1 -2
- package/dist/types/components/Swap/components/SwapSettingsDialog/index.d.ts +1 -4
- package/dist/types/components/Swap/components/TokenCard/BalanceText.d.ts +1 -3
- package/dist/types/components/Swap/components/TokenCard/TokenLogoCollapse.d.ts +1 -5
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +5 -5
- package/dist/types/components/Swap/components/TokenPairPriceWithToggle.d.ts +2 -14
- package/dist/types/components/Swap/index.d.ts +1 -4
- package/dist/types/components/Widget/index.d.ts +3 -0
- package/dist/types/components/WithExecutionDialog/index.d.ts +1 -1
- package/dist/types/constants/api.d.ts +1 -1
- package/dist/types/constants/swap.d.ts +3 -0
- package/dist/types/hooks/Submission/types.d.ts +6 -1
- package/dist/types/hooks/Submission/useExecution.d.ts +2 -0
- package/dist/types/hooks/Swap/useFetchRoutePrice.d.ts +1 -3
- package/dist/types/hooks/Swap/useSlippageLimit.d.ts +1 -1
- package/dist/types/hooks/Swap/useSwapSettingStore.d.ts +1 -0
- package/dist/types/hooks/style/useWidgetDevice.d.ts +0 -2
- package/dist/types/hooks/useGraphQLRequests.d.ts +0 -1
- package/dist/types/index.d.ts +36 -23
- package/dist/types/store/actions/token.d.ts +1 -1
- package/dist/types/store/selectors/token.d.ts +2 -2
- package/dist/types/utils/address.d.ts +1 -1
- package/dist/types/utils/formatter.d.ts +2 -2
- package/dist/types/utils/token.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/addresses.d.ts +0 -14
- package/dist/types/widgets/PoolWidget/AMMV3/sdks/sdk-core/chains.d.ts +6 -0
- package/dist/types/widgets/PoolWidget/PoolList/components/GoPoolDetailBtn.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListFilterTokenAndPool.d.ts +1 -0
- package/dist/types/widgets/PoolWidget/PoolList/hooks/usePoolListTabs.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/AddPoolOperate.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/RemovePoolOperate.d.ts +1 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/LiquidityInfo.d.ts +1 -3
- package/dist/types/widgets/PoolWidget/hooks/contract/getModifyDPPPoolParams.d.ts +2 -1
- package/dist/types/widgets/PoolWidget/utils.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolList/TableList.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33PoolList/index.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/AddPoolOperate.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/RemovePoolOperate.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/ComparePrice.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/OperateBtn.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SliderPercentageCard.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/SlippageSetting.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/components/V2ConfirmDialog.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useComparePrice.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useLiquidityOperateAmount.d.ts +82 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePercentageRemove.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/usePoolOperateTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2AddLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2BalanceInfo.d.ts +34 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useVe33V2RemoveLiquidity.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/hooks/useWithdrawInfo.d.ts +25 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/index.d.ts +23 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate/types.d.ts +22 -0
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +14 -0
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/components/GoBack.d.ts +4 -0
- package/dist/types/widgets/ve33/components/PoolHead.d.ts +8 -0
- package/dist/types/widgets/ve33/components/PoolTypeTag.d.ts +8 -0
- package/dist/types/widgets/ve33/components/widgets.d.ts +5 -0
- package/dist/types/widgets/ve33/config.d.ts +62 -0
- package/dist/types/widgets/ve33/constants.d.ts +21 -0
- package/dist/types/widgets/ve33/hooks/usePoolColors.d.ts +11 -0
- package/dist/types/widgets/ve33/hooks/useVotePoolFilters.d.ts +13 -0
- package/dist/types/widgets/ve33/hooks/useVoteTabs.d.ts +12 -0
- package/dist/types/widgets/ve33/types.d.ts +38 -0
- package/dist/types/widgets/ve33/utils.d.ts +9 -0
- package/package.json +11 -11
- package/dist/9cc2b17a1958d960.svg +0 -3
- package/dist/f7a5110e71722a0c.svg +0 -10
- package/dist/index-C10KoHv_.js +0 -32
- package/dist/index-ClXjNHoy.cjs +0 -32
- package/dist/types/components/Swap/components/SwapInfoCard.d.ts +0 -9
- package/dist/types/hooks/Swap/useFetchRoutePrice.test.d.ts +0 -1
- package/dist/types/widgets/PoolWidget/PoolOperate/components/MyLiquidityInfo.d.ts +0 -15
- package/dist/types/widgets/PoolWidget/PoolOperate/components/PairTitle.d.ts +0 -5
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
export declare function useVe33AddLiquidity({ baseToken, quoteToken, baseAmount, quoteAmount, slippage, stable, fee, successBack, submittedBack, }: {
|
|
3
|
+
baseToken: TokenInfo | undefined;
|
|
4
|
+
quoteToken: TokenInfo | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
slippage: number;
|
|
8
|
+
stable: boolean;
|
|
9
|
+
fee: number | undefined;
|
|
10
|
+
successBack?: () => void;
|
|
11
|
+
submittedBack?: () => void;
|
|
12
|
+
}): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult, Error, void, unknown>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
import { Price, Token } from '@uniswap/sdk-core';
|
|
3
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
4
|
+
export declare function useVe33V2BalanceInfo({ account, pool, }: {
|
|
5
|
+
account?: string;
|
|
6
|
+
pool?: {
|
|
7
|
+
id: string;
|
|
8
|
+
chainId: number;
|
|
9
|
+
baseToken: TokenInfo;
|
|
10
|
+
quoteToken: TokenInfo;
|
|
11
|
+
};
|
|
12
|
+
}): {
|
|
13
|
+
userLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
14
|
+
totalLpQuery: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
15
|
+
reserveQuery: import("@tanstack/react-query").UseQueryResult<{
|
|
16
|
+
_reserve0: bigint;
|
|
17
|
+
_reserve1: bigint;
|
|
18
|
+
_blockTimestampLast: bigint;
|
|
19
|
+
}, Error>;
|
|
20
|
+
userLp: BigNumber | undefined;
|
|
21
|
+
totalLp: BigNumber | undefined;
|
|
22
|
+
token0Reserve: BigNumber | undefined;
|
|
23
|
+
token1Reserve: BigNumber | undefined;
|
|
24
|
+
userLpToToken0: BigNumber | undefined;
|
|
25
|
+
userLpToToken1: BigNumber | undefined;
|
|
26
|
+
isRearTokenA: boolean;
|
|
27
|
+
price: Price<Token, Token> | undefined;
|
|
28
|
+
liquidityMinted: BigNumber | undefined;
|
|
29
|
+
poolTokenPercentage: BigNumber | undefined;
|
|
30
|
+
shareOfPool: string;
|
|
31
|
+
userLpToTokenBalanceLoading: boolean;
|
|
32
|
+
userLpToTokenBalanceErrorRefetch: (() => void) | undefined;
|
|
33
|
+
refetch: () => void;
|
|
34
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../../hooks/Token';
|
|
2
|
+
export declare function useVe33RemoveLiquidity({ baseToken, quoteToken, baseAmount, quoteAmount, liquidityAmount, slippage, stable, submittedBack, successBack, }: {
|
|
3
|
+
baseToken: TokenInfo | undefined;
|
|
4
|
+
quoteToken: TokenInfo | undefined;
|
|
5
|
+
baseAmount: string;
|
|
6
|
+
quoteAmount: string;
|
|
7
|
+
liquidityAmount: string;
|
|
8
|
+
slippage: number;
|
|
9
|
+
stable: boolean;
|
|
10
|
+
submittedBack?: () => void;
|
|
11
|
+
successBack?: () => void;
|
|
12
|
+
}): import("@tanstack/react-query").UseMutationResult<import("../../../../hooks/Submission/types").ExecutionResult, Error, void, unknown>;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
export declare const useWithdrawInfo: ({ pool, baseAmount, quoteAmount, }: {
|
|
3
|
+
pool?: {
|
|
4
|
+
chainId: number;
|
|
5
|
+
address: string;
|
|
6
|
+
baseToken: {
|
|
7
|
+
symbol: string;
|
|
8
|
+
decimals: number;
|
|
9
|
+
};
|
|
10
|
+
quoteToken: {
|
|
11
|
+
symbol: string;
|
|
12
|
+
decimals: number;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
baseAmount: string;
|
|
16
|
+
quoteAmount: string;
|
|
17
|
+
}) => {
|
|
18
|
+
receiveBaseAmount: string;
|
|
19
|
+
receiveQuoteAmount: string;
|
|
20
|
+
receiveAmountBg: BigNumber | undefined;
|
|
21
|
+
receiveList: {
|
|
22
|
+
amount: string;
|
|
23
|
+
symbol: string;
|
|
24
|
+
}[];
|
|
25
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { OperateTypeE, Ve33PoolInfoI } from '../types';
|
|
2
|
+
import { BoxProps } from '@dodoex/components';
|
|
3
|
+
export interface PoolOperateProps {
|
|
4
|
+
sx?: BoxProps['sx'];
|
|
5
|
+
pool?: Ve33PoolInfoI;
|
|
6
|
+
account?: string;
|
|
7
|
+
operate?: OperateTypeE;
|
|
8
|
+
errorRefetch?: () => void;
|
|
9
|
+
submittedBack?: () => void;
|
|
10
|
+
onClose?: () => void;
|
|
11
|
+
}
|
|
12
|
+
export default function PoolOperateDialog({ modal, ...props }: PoolOperateProps & {
|
|
13
|
+
modal?: boolean;
|
|
14
|
+
}): JSX.Element;
|
|
15
|
+
export declare function PoolOperate({ sx, pool, operate, account, errorRefetch, submittedBack, onClose, }: PoolOperateProps): JSX.Element;
|
|
16
|
+
export declare function usePoolOperateTabs(defaultValue?: OperateTypeE): {
|
|
17
|
+
operateTab: OperateTypeE;
|
|
18
|
+
operateTabs: {
|
|
19
|
+
key: OperateTypeE;
|
|
20
|
+
value: string;
|
|
21
|
+
}[];
|
|
22
|
+
handleChangeTab: (poolTab: OperateTypeE) => void;
|
|
23
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ExcludeNone, PoolType } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { FetchMyLiquidityListLqList } from '../utils';
|
|
4
|
+
export type OperatePool = {
|
|
5
|
+
address: string;
|
|
6
|
+
chainId: number;
|
|
7
|
+
baseToken: TokenInfo;
|
|
8
|
+
quoteToken: TokenInfo;
|
|
9
|
+
baseLpToken?: {
|
|
10
|
+
id: string;
|
|
11
|
+
decimals: number;
|
|
12
|
+
};
|
|
13
|
+
quoteLpToken?: {
|
|
14
|
+
id: string;
|
|
15
|
+
decimals: number;
|
|
16
|
+
};
|
|
17
|
+
type: PoolType;
|
|
18
|
+
owner?: string;
|
|
19
|
+
creator: string;
|
|
20
|
+
lpFeeRate?: string;
|
|
21
|
+
liquidityPositions?: ExcludeNone<ExcludeNone<FetchMyLiquidityListLqList>[0]>['liquidityPositions'];
|
|
22
|
+
} | undefined;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { VotePoolInfoI } from '../types';
|
|
3
|
+
export interface TableListProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
poolList: VotePoolInfoI[];
|
|
6
|
+
hasMore?: boolean;
|
|
7
|
+
loadMore?: () => void;
|
|
8
|
+
loadMoreLoading?: boolean;
|
|
9
|
+
onSelectPool: (id: string, selected: boolean) => void;
|
|
10
|
+
selectedPoolList: {
|
|
11
|
+
[key: string]: boolean;
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export declare const TableList: ({ chainId, poolList, hasMore, loadMore, loadMoreLoading, onSelectPool, selectedPoolList, }: TableListProps) => JSX.Element;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const VotePoolList: () => JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export interface PoolHeadProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
poolInfo: Ve33PoolInfoI;
|
|
6
|
+
size?: 'small' | 'medium';
|
|
7
|
+
}
|
|
8
|
+
export declare const PoolHead: ({ chainId, poolInfo, size, }: PoolHeadProps) => JSX.Element;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
/**
|
|
3
|
+
"WETH": "0x5300000000000000000000000000000000000011",
|
|
4
|
+
|
|
5
|
+
{
|
|
6
|
+
"AERO": "0x42EDf453F8483c7168c158d28D610A58308517D1",
|
|
7
|
+
"AirdropDistributor": "0x4c0dC92e49473Ad6691f34a6615FD53f8A0bDC8d",
|
|
8
|
+
"ArtProxy": "0xaf6c1052A1114C7816C24a5e8bC485b180C49Deb",
|
|
9
|
+
"Distributor": "0xBb5a0bF38C0BeA6829fDFef931B7988c8fF00a78",
|
|
10
|
+
"FactoryRegistry": "0x620572bEE4ECF35B2FEBB1F644F939A032cd7044",
|
|
11
|
+
"Forwarder": "0xB6362C3Ef78CDe47446a819B8131eC540a949EF8",
|
|
12
|
+
"GaugeFactory": "0xe77C7e8fE14662e07346A8e2797fee18809aCcEa",
|
|
13
|
+
"ManagedRewardsFactory": "0x69485b9B95df04dDbbF8669A33865C97E9B293B4",
|
|
14
|
+
"Minter": "0xF7d33BB55C74048352DC0413733095Cc8e273A74",
|
|
15
|
+
"PoolFactory": "0x2dA6Bf29baAB9Ac23Bb8E7fB04F6D9a20bbdfC82",
|
|
16
|
+
"Router": "0x468e60B84b11B3B1532D7C41FcBb79DA352aa12d",
|
|
17
|
+
"Voter": "0x74CAd58eD9712e3236D61dea8696B6Dced3da2b6",
|
|
18
|
+
"VotingEscrow": "0x00Fc0223442630e2AaDAB831d2Ee1FD27ee8A6B2",
|
|
19
|
+
"VotingRewardsFactory": "0x64e4a9BDA0670Cdb30664383244dA60158Af847B"
|
|
20
|
+
}
|
|
21
|
+
{
|
|
22
|
+
// https://explorer-holesky.morphl2.io/address/0x64610da3092153a188278815c1f2072009F9Df1e?tab=contract
|
|
23
|
+
// https://github.com/Skyewwww/aerodrome-contracts/blob/deploy-morph/contracts/Pool.sol
|
|
24
|
+
// vAMM-WETH/AERO
|
|
25
|
+
"Pool": "0x98EcC0D3F774a7bDA38918bf5830a476dD5A606C",
|
|
26
|
+
"Gauge": "0x7B156830fDbC76d327a48a19B0143663e16A95ba",
|
|
27
|
+
"FeesVotingReward": "0x0266a69Ed8D4E9ef2781BB7B1BB9437E15Cf5639",
|
|
28
|
+
"BribeVotingReward": "0x6d3dCd05D0576a1379aA9587aBB4D968cF2fD8df"
|
|
29
|
+
}
|
|
30
|
+
{
|
|
31
|
+
"GaugeFactory": "0xd648A03cE42bf7c7F5D4c7885eb76d89daEcB988",
|
|
32
|
+
"GaugeImplementation": "0x054aC9d1DD99C49a4B3A6314717aE49D09606d46",
|
|
33
|
+
"MixedQuoter": "0x9aE45C6566e4c032C119665Cfd38Eaa3f3859D06",
|
|
34
|
+
"NonfungiblePositionManager": "0x2b36c1be2a16ACb71E6F6CccfCd7D20cdfE01867",
|
|
35
|
+
"NonfungibleTokenPositionDescriptor": "0x0d3a1033d9F76A0bC5a444CdFB8fdE85B1290542",
|
|
36
|
+
"PoolFactory": "0x0d1B0d0d709292d35AB7455fF6DBA0Eed40Cc49b",
|
|
37
|
+
"PoolImplementation": "0xE2714F696039Fa207E4Fd1348d0D5bbD27fBe964",
|
|
38
|
+
"Quoter": "0xB725b88b32868266782398ae7Ab6bDCcebe90368",
|
|
39
|
+
"SwapFeeModule": "0x5ffDad8a7D2E9E45FCF88A0C5baDdd80a421f605",
|
|
40
|
+
"SwapRouter": "0xA0abF41a231BaCeB1feB624Dca843B71c10311e8",
|
|
41
|
+
"UnstakedFeeModule": "0xfa1824E71CFF5D315b63CBc91c0b859462B7EA30"
|
|
42
|
+
}
|
|
43
|
+
{
|
|
44
|
+
// CL200-WETH/AERO
|
|
45
|
+
"Pool": "0x2f63A87bf42dc4c021af8BE085CecE16269e3b67",
|
|
46
|
+
"Gauge": "0x640be2253A65740152dC933FAb757606e9c7BD52",
|
|
47
|
+
"FeesVotingReward": "0x87BA1438fa2d2Fd6aD66162B7c1afAAB25b7CE83",
|
|
48
|
+
"BribeVotingReward": "0xA7a1790B8Cd1737278b464c295517408f38b4726"
|
|
49
|
+
}
|
|
50
|
+
*/
|
|
51
|
+
export interface Ve33Config {
|
|
52
|
+
chainId: number;
|
|
53
|
+
/**
|
|
54
|
+
* https://explorer-holesky.morphl2.io/address/0x2dA6Bf29baAB9Ac23Bb8E7fB04F6D9a20bbdfC82?tab=contract
|
|
55
|
+
*/
|
|
56
|
+
PoolFactory: string;
|
|
57
|
+
/**
|
|
58
|
+
* https://explorer-holesky.morphl2.io/address/0x0d1B0d0d709292d35AB7455fF6DBA0Eed40Cc49b
|
|
59
|
+
*/
|
|
60
|
+
CLFactory: string;
|
|
61
|
+
}
|
|
62
|
+
export declare const ve33Config: Map<ChainId, Ve33Config>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The default factory enabled fee amounts, denominated in hundredths of bips.
|
|
3
|
+
* @see https://explorer-holesky.morphl2.io/address/0x0d1B0d0d709292d35AB7455fF6DBA0Eed40Cc49b?tab=read_contract
|
|
4
|
+
*/
|
|
5
|
+
export declare enum FeeAmount {
|
|
6
|
+
LOWEST = 100,
|
|
7
|
+
LOW = 500,
|
|
8
|
+
MEDIUM = 500,
|
|
9
|
+
HIGH = 3000,
|
|
10
|
+
HIGHEST = 10000
|
|
11
|
+
}
|
|
12
|
+
export declare enum TickSpacings {
|
|
13
|
+
LOWEST = 1,
|
|
14
|
+
LOW = 50,
|
|
15
|
+
MEDIUM = 100,
|
|
16
|
+
HIGH = 200,
|
|
17
|
+
HIGHEST = 2000
|
|
18
|
+
}
|
|
19
|
+
export declare const tickSpacingToFee: {
|
|
20
|
+
[amount in TickSpacings]: FeeAmount;
|
|
21
|
+
};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { PoolTypeE } from '../types';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export declare function usePoolColors({ type, stable, fee, }: {
|
|
4
|
+
type: PoolTypeE;
|
|
5
|
+
stable: boolean;
|
|
6
|
+
fee: Ve33PoolInfoI['fee'];
|
|
7
|
+
}): {
|
|
8
|
+
color: string;
|
|
9
|
+
backgroundColor: string;
|
|
10
|
+
name: string;
|
|
11
|
+
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export declare enum VotePoolFilters {
|
|
2
|
+
All = "all",
|
|
3
|
+
V2 = 1,
|
|
4
|
+
V3 = 2
|
|
5
|
+
}
|
|
6
|
+
export declare function useVotePoolFilters(): {
|
|
7
|
+
votePoolFilter: VotePoolFilters;
|
|
8
|
+
filters: {
|
|
9
|
+
key: VotePoolFilters;
|
|
10
|
+
value: string;
|
|
11
|
+
}[];
|
|
12
|
+
handleChangeVotePoolFilter: (votePoolFilter: VotePoolFilters) => void;
|
|
13
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export declare enum VoteTab {
|
|
2
|
+
SelectToVote = "select-to-vote",
|
|
3
|
+
MyVoted = "my-voted"
|
|
4
|
+
}
|
|
5
|
+
export declare function useVoteTabs(): {
|
|
6
|
+
voteTab: VoteTab;
|
|
7
|
+
tabs: {
|
|
8
|
+
key: VoteTab;
|
|
9
|
+
value: string;
|
|
10
|
+
}[];
|
|
11
|
+
handleChangeVoteTab: (voteTab: VoteTab) => void;
|
|
12
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from '../../hooks/Token/type';
|
|
3
|
+
import { FetchVe33PoolList, FetchVotePoolList } from '../PoolWidget/utils';
|
|
4
|
+
export declare enum OperateTypeE {
|
|
5
|
+
Add = 1,
|
|
6
|
+
Remove = 2
|
|
7
|
+
}
|
|
8
|
+
export declare enum PoolTypeE {
|
|
9
|
+
Pool = 1,
|
|
10
|
+
CLPool = 2
|
|
11
|
+
}
|
|
12
|
+
export declare enum FeeE {
|
|
13
|
+
Stable = 5,
|
|
14
|
+
Volatile = 30
|
|
15
|
+
}
|
|
16
|
+
export type FetchVe33PoolItem = FetchVe33PoolList[0];
|
|
17
|
+
export type FetchVotePoolItem = FetchVotePoolList[0];
|
|
18
|
+
export type Ve33PoolInfoI = FetchVe33PoolItem & {
|
|
19
|
+
stable: boolean;
|
|
20
|
+
fee: FeeE | 0 | number;
|
|
21
|
+
type: PoolTypeE;
|
|
22
|
+
chainId: ChainId;
|
|
23
|
+
baseToken: TokenInfo;
|
|
24
|
+
quoteToken: TokenInfo;
|
|
25
|
+
};
|
|
26
|
+
export type VotePoolInfoI = FetchVotePoolItem & {
|
|
27
|
+
stable: boolean;
|
|
28
|
+
fee: FeeE | 0 | number;
|
|
29
|
+
type: PoolTypeE;
|
|
30
|
+
chainId: ChainId;
|
|
31
|
+
baseToken: TokenInfo;
|
|
32
|
+
quoteToken: TokenInfo;
|
|
33
|
+
};
|
|
34
|
+
export interface Ve33PoolOperateProps {
|
|
35
|
+
poolInfo: Ve33PoolInfoI;
|
|
36
|
+
operateType: OperateTypeE;
|
|
37
|
+
chainId: ChainId;
|
|
38
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { FetchVe33PoolItem, FetchVotePoolItem, PoolTypeE, Ve33PoolInfoI, VotePoolInfoI } from './types';
|
|
3
|
+
import { FeeE } from './types';
|
|
4
|
+
export declare const formatFee: ({ type, fee }: {
|
|
5
|
+
type: PoolTypeE;
|
|
6
|
+
fee: FeeE;
|
|
7
|
+
}) => string;
|
|
8
|
+
export declare function compositePoolInfo(pool: NonNullable<FetchVe33PoolItem>, chainId: ChainId): Ve33PoolInfoI;
|
|
9
|
+
export declare function compositeVotePoolInfo(pool: NonNullable<FetchVotePoolItem>, chainId: ChainId): VotePoolInfoI;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dodoex/widgets",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.4-ve33.10",
|
|
4
4
|
"description": "DODO Widgets",
|
|
5
5
|
"source": "src/index.tsx",
|
|
6
6
|
"types": "dist/types/index.d.ts",
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"release": "semantic-release",
|
|
24
24
|
"release:local": "np --any-branch --no-cleanup --no-tests",
|
|
25
25
|
"release.npm-publish": "npm publish --access public",
|
|
26
|
-
"release.npm-publish-beta": "npm publish --tag beta",
|
|
26
|
+
"release.npm-publish-beta": "yarn run build && npm publish --tag beta",
|
|
27
27
|
"test": "jest src",
|
|
28
28
|
"test:e2e": "jest e2e"
|
|
29
29
|
},
|
|
@@ -58,10 +58,10 @@
|
|
|
58
58
|
},
|
|
59
59
|
"dependencies": {
|
|
60
60
|
"@babel/runtime": "^7.17.0",
|
|
61
|
-
"@dodoex/api": "3.0.
|
|
62
|
-
"@dodoex/components": "3.0.
|
|
61
|
+
"@dodoex/api": "3.0.4-ve33.4",
|
|
62
|
+
"@dodoex/components": "3.0.4-ve33.3",
|
|
63
63
|
"@dodoex/contract-request": "^1.3.0",
|
|
64
|
-
"@dodoex/dodo-contract-request": "
|
|
64
|
+
"@dodoex/dodo-contract-request": "1.15.0-morph-holesky.2",
|
|
65
65
|
"@dodoex/icons": "^2.0.2",
|
|
66
66
|
"@emotion/react": "^11.10.0",
|
|
67
67
|
"@emotion/styled": "^11.10.0",
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"@tanstack/react-query": "^5.18.1",
|
|
77
77
|
"@uniswap/sdk-core": "^5.9.0",
|
|
78
78
|
"@uniswap/v2-sdk": "^4.6.2",
|
|
79
|
-
"@web3-react/core": "8.2.
|
|
80
|
-
"@web3-react/eip1193": "8.2.
|
|
81
|
-
"@web3-react/metamask": "8.2.
|
|
82
|
-
"@web3-react/types": "8.2.
|
|
79
|
+
"@web3-react/core": "^8.2.3",
|
|
80
|
+
"@web3-react/eip1193": "^8.2.3",
|
|
81
|
+
"@web3-react/metamask": "^8.2.4",
|
|
82
|
+
"@web3-react/types": "^8.2.3",
|
|
83
83
|
"@web3-react/walletconnect-v2": "8.3.6",
|
|
84
84
|
"axios": "^0.27.2",
|
|
85
85
|
"bignumber.js": "^9.0.2",
|
|
@@ -101,7 +101,7 @@
|
|
|
101
101
|
"rmc-date-picker": "^6.0.10",
|
|
102
102
|
"semantic-release": "^19.0.2",
|
|
103
103
|
"tiny-invariant": "^1.1.0",
|
|
104
|
-
"zustand": "
|
|
104
|
+
"zustand": "4.4.0"
|
|
105
105
|
},
|
|
106
106
|
"peerDependencies": {
|
|
107
107
|
"@babel/runtime": ">=7.17.0",
|
|
@@ -154,4 +154,4 @@
|
|
|
154
154
|
"ts-jest": "^29.0.1",
|
|
155
155
|
"typescript": "^5.6.3"
|
|
156
156
|
}
|
|
157
|
-
}
|
|
157
|
+
}
|