@dodoex/widgets 3.0.4-ve33.10 → 3.0.4-ve33.12
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-t_Ye_aBf.js → helper-Ch2thOK-.js} +1 -1
- package/dist/{helper-BPuHWVRM.cjs → helper-Dy75aFem.cjs} +1 -1
- package/dist/{index-BA5HePEm.js → index-B-bIAJN3.js} +1 -1
- package/dist/index-B_KtSyz4.cjs +32 -0
- package/dist/{index-Cg3PeApO.cjs → index-C319dpay.cjs} +1 -1
- package/dist/index-D7TTWKpo.js +32 -0
- package/dist/{index-CTWa5eCR.js → index-DEs49eBG.js} +1 -1
- package/dist/{index-al7nXNyl.cjs → index-JQV571JA.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/CardWidgets.d.ts +2 -1
- package/dist/types/components/SimpleItemInfo.d.ts +4 -0
- package/dist/types/components/Swap/components/Dialog.d.ts +3 -0
- package/dist/types/components/Swap/components/TokenCard/NumberInput.d.ts +1 -0
- package/dist/types/components/Swap/components/TokenCard/TokenLpCard.d.ts +32 -0
- package/dist/types/components/Swap/components/TokenCard/index.d.ts +2 -1
- package/dist/types/components/Token/TokenItem.d.ts +2 -1
- package/dist/types/components/TokenSelect.d.ts +5 -2
- package/dist/types/components/TokenStatusButton.d.ts +1 -1
- package/dist/types/hooks/Submission/types.d.ts +19 -1
- package/dist/types/hooks/Token/usePoolTokenSort.d.ts +24 -0
- package/dist/types/index.d.ts +4 -0
- package/dist/types/utils/fractions/fraction.d.ts +24 -0
- package/dist/types/utils/fractions/index.d.ts +3 -0
- package/dist/types/utils/fractions/percent.d.ts +14 -0
- package/dist/types/utils/fractions/price.d.ts +29 -0
- package/dist/types/utils/fractions/types.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/AddIncentiveDialog.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/Dashboard.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/PoolInfo.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33IncentiveDetail/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/CardList.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/TableList.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33IncentiveList/index.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/CardList.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33LockList/ClaimLockDialog.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/LockManageDialog.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/MergeDialog.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/TableList.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimBribes.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useClaimRebases.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useExtendLock.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useFetchUserLocks.d.ts +282 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useIncreaseLock.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useMergeLock.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33LockList/hooks/useTransferLock.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockList/index.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useCreateLock.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/hooks/useFetchUserTotalVeNFT.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/index.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33LockOperate/utils.d.ts +21 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/MyAssets.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/MyPosition.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/PoolInfo.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33PoolDetail/useVe33V3Positions.d.ts +79 -0
- package/dist/types/widgets/ve33/Ve33PoolList/CardList.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33PoolOperate.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33StakeDialog.d.ts +11 -0
- package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/SliderPercentageCard.d.ts +2 -1
- package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useLiquidityOperateAmount.d.ts +4 -0
- package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useVe33V2BalanceInfo.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V2PoolOperate/index.d.ts +15 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/Ve33V3AddLiquidity.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/Badge/RangeBadge.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ClaimButton.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InRangeDot.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/InputStepCounter.d.ts +17 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Area.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/AxisBottom.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Brush.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Chart.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Line.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/Zoom.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/index.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/svg.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/types.d.ts +50 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/usePrevious.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/LiquidityChartRangeInput/utils.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/MyLiquidity.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionManage.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionPreview.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/PositionSelectedRangePreview.d.ts +11 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeRatioSelect.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RangeSelector.d.ts +21 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RateToggle.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/RemoveButton.d.ts +12 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/ReviewModal.d.ts +18 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenAndEtherscan.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/TokenPairSelect.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/shared.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/components/widgets.d.ts +56 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/constants/misc.d.ts +17 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useAddVe33V3Liquidity.d.ts +15 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePoolActiveLiquidityChartData.d.ts +37 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/usePriceRangeRatioSelect.d.ts +28 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useRemoveVe33V3Liquidity.d.ts +14 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useSetRange.d.ts +36 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Amounts.d.ts +19 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/hooks/useVe33V3Pair.d.ts +58 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/index.d.ts +5 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/types.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/calldata.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/computeSurroundingTicks.d.ts +4 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/constants.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/encodeSqrtRatioX96.d.ts +9 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/formatTickPrice.d.ts +1 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/fullMath.d.ts +8 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmount.d.ts +39 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getPositionAmountWithSlippage.d.ts +23 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/getTickToPrice.d.ts +10 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/maxLiquidityForAmounts.d.ts +22 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/mostSignificantBit.d.ts +2 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/nearestUsableTick.d.ts +6 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/slippage.d.ts +3 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrt.d.ts +7 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/sqrtPriceMath.d.ts +13 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tickMath.d.ts +34 -0
- package/dist/types/widgets/ve33/Ve33V3PoolOperate/utils/tryParseTick.d.ts +4 -0
- package/dist/types/widgets/ve33/VotePoolList/CardList.d.ts +11 -0
- package/dist/types/widgets/ve33/VotePoolList/SetVotePowerDialog.d.ts +12 -0
- package/dist/types/widgets/ve33/VotePoolList/TableList.d.ts +4 -5
- package/dist/types/widgets/ve33/VotePoolList/hooks/useVoteVe33.d.ts +7 -0
- package/dist/types/widgets/ve33/VotePoolList/index.d.ts +4 -1
- package/dist/types/widgets/ve33/VotePoolList/widgets.d.ts +36 -0
- package/dist/types/widgets/ve33/components/LockSlider.d.ts +5 -0
- package/dist/types/widgets/ve33/components/PoolTokenInfo.d.ts +11 -0
- package/dist/types/widgets/ve33/hooks/useVe33PositionAmounts.d.ts +17 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2ClaimEmissions.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2ClaimTradingFees.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2Stake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V2UnStake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3ClaimEmissions.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3ClaimTradingFees.d.ts +4 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3Stake.d.ts +5 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3StakeApproveStatus.d.ts +17 -0
- package/dist/types/widgets/ve33/hooks/useVe33V3UnStake.d.ts +5 -0
- package/package.json +2 -2
- package/dist/index-C8qblH3I.js +0 -32
- package/dist/index-CQTOLjzQ.cjs +0 -32
- package/dist/types/widgets/ve33/Ve33PoolOperate/index.d.ts +0 -23
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/AddPoolOperate.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/RemovePoolOperate.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/ComparePrice.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/OperateBtn.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/SlippageSetting.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/components/V2ConfirmDialog.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useComparePrice.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/usePercentageRemove.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/usePoolOperateTabs.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useVe33V2AddLiquidity.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useVe33V2RemoveLiquidity.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/hooks/useWithdrawInfo.d.ts +0 -0
- /package/dist/types/widgets/ve33/{Ve33PoolOperate → Ve33V2PoolOperate}/types.d.ts +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { TokenInfo } from './type';
|
|
3
|
+
export declare function usePoolTokenSort({ baseToken, quoteToken, }: {
|
|
4
|
+
baseToken: TokenInfo | undefined;
|
|
5
|
+
quoteToken: TokenInfo | undefined;
|
|
6
|
+
}): {
|
|
7
|
+
chainId: undefined;
|
|
8
|
+
isRearTokenA: boolean;
|
|
9
|
+
token0: undefined;
|
|
10
|
+
token1: undefined;
|
|
11
|
+
token0Wrapped: undefined;
|
|
12
|
+
token1Wrapped: undefined;
|
|
13
|
+
isBaseTokenNative: boolean;
|
|
14
|
+
isQuoteTokenNative: boolean;
|
|
15
|
+
} | {
|
|
16
|
+
chainId: ChainId;
|
|
17
|
+
isRearTokenA: boolean;
|
|
18
|
+
token0: TokenInfo;
|
|
19
|
+
token1: TokenInfo;
|
|
20
|
+
token0Wrapped: TokenInfo;
|
|
21
|
+
token1Wrapped: TokenInfo;
|
|
22
|
+
isBaseTokenNative: boolean;
|
|
23
|
+
isQuoteTokenNative: boolean;
|
|
24
|
+
};
|
package/dist/types/index.d.ts
CHANGED
|
@@ -33,6 +33,10 @@ export type { PoolOperateProps } from './widgets/PoolWidget/PoolOperate';
|
|
|
33
33
|
export { Ve33PoolDetail } from './widgets/ve33/Ve33PoolDetail';
|
|
34
34
|
export { Ve33PoolList } from './widgets/ve33/Ve33PoolList';
|
|
35
35
|
export { VotePoolList } from './widgets/ve33/VotePoolList';
|
|
36
|
+
export { default as Ve33LockOperate } from './widgets/ve33/Ve33LockOperate';
|
|
37
|
+
export { default as Ve33LockList } from './widgets/ve33/Ve33LockList';
|
|
38
|
+
export { default as Ve33IncentiveList } from './widgets/ve33/Ve33IncentiveList';
|
|
39
|
+
export { default as Ve33IncentiveDetail } from './widgets/ve33/Ve33IncentiveDetail';
|
|
36
40
|
export type SwapWidgetProps = WidgetProps & SwapProps;
|
|
37
41
|
export { EmptyList } from './components/List/EmptyList';
|
|
38
42
|
export { FailedList } from './components/List/FailedList';
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import JSBI from 'jsbi';
|
|
2
|
+
import { BigintIsh, Rounding } from './types';
|
|
3
|
+
export declare class Fraction {
|
|
4
|
+
readonly numerator: JSBI;
|
|
5
|
+
readonly denominator: JSBI;
|
|
6
|
+
constructor(numerator: BigintIsh, denominator?: BigintIsh);
|
|
7
|
+
private static tryParseFraction;
|
|
8
|
+
get quotient(): JSBI;
|
|
9
|
+
get remainder(): Fraction;
|
|
10
|
+
invert(): Fraction;
|
|
11
|
+
add(other: Fraction | BigintIsh): Fraction;
|
|
12
|
+
subtract(other: Fraction | BigintIsh): Fraction;
|
|
13
|
+
lessThan(other: Fraction | BigintIsh): boolean;
|
|
14
|
+
equalTo(other: Fraction | BigintIsh): boolean;
|
|
15
|
+
greaterThan(other: Fraction | BigintIsh): boolean;
|
|
16
|
+
multiply(other: Fraction | BigintIsh): Fraction;
|
|
17
|
+
divide(other: Fraction | BigintIsh): Fraction;
|
|
18
|
+
toSignificant(significantDigits: number, format?: object, rounding?: Rounding): string;
|
|
19
|
+
toFixed(decimalPlaces: number, format?: object, rounding?: Rounding): string;
|
|
20
|
+
/**
|
|
21
|
+
* Helper method for converting any super class back to a fraction
|
|
22
|
+
*/
|
|
23
|
+
get asFraction(): Fraction;
|
|
24
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { BigintIsh, Rounding } from './types';
|
|
2
|
+
import { Fraction } from './fraction';
|
|
3
|
+
export declare class Percent extends Fraction {
|
|
4
|
+
/**
|
|
5
|
+
* This boolean prevents a fraction from being interpreted as a Percent
|
|
6
|
+
*/
|
|
7
|
+
readonly isPercent: true;
|
|
8
|
+
add(other: Fraction | BigintIsh): Percent;
|
|
9
|
+
subtract(other: Fraction | BigintIsh): Percent;
|
|
10
|
+
multiply(other: Fraction | BigintIsh): Percent;
|
|
11
|
+
divide(other: Fraction | BigintIsh): Percent;
|
|
12
|
+
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
|
|
13
|
+
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { BigintIsh, Rounding } from './types';
|
|
2
|
+
import { Fraction } from './fraction';
|
|
3
|
+
import { TokenInfo } from '../../hooks/Token';
|
|
4
|
+
export declare class Price extends Fraction {
|
|
5
|
+
readonly baseCurrency: TokenInfo;
|
|
6
|
+
readonly quoteCurrency: TokenInfo;
|
|
7
|
+
readonly scalar: Fraction;
|
|
8
|
+
/**
|
|
9
|
+
* Construct a price, either with the base and quote currency amount, or the
|
|
10
|
+
* @param args
|
|
11
|
+
*/
|
|
12
|
+
constructor(...args: [TokenInfo, TokenInfo, BigintIsh, BigintIsh]);
|
|
13
|
+
/**
|
|
14
|
+
* Flip the price, switching the base and quote currency
|
|
15
|
+
*/
|
|
16
|
+
invert(): Price;
|
|
17
|
+
/**
|
|
18
|
+
* Multiply the price by another price, returning a new price. The other price must have the same base currency as this price's quote currency
|
|
19
|
+
* @param other the other price
|
|
20
|
+
*/
|
|
21
|
+
multiply(other: Price): Price;
|
|
22
|
+
/**
|
|
23
|
+
* Get the value scaled by decimals for formatting
|
|
24
|
+
* @private
|
|
25
|
+
*/
|
|
26
|
+
private get adjustedForDecimals();
|
|
27
|
+
toSignificant(significantDigits?: number, format?: object, rounding?: Rounding): string;
|
|
28
|
+
toFixed(decimalPlaces?: number, format?: object, rounding?: Rounding): string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BoxProps } from '@dodoex/components';
|
|
2
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
3
|
+
import { ChainId } from '@dodoex/api';
|
|
4
|
+
interface AddIncentiveProps {
|
|
5
|
+
data?: {
|
|
6
|
+
chainId: ChainId;
|
|
7
|
+
token: TokenInfo;
|
|
8
|
+
};
|
|
9
|
+
onClose: () => void;
|
|
10
|
+
sx?: BoxProps['sx'];
|
|
11
|
+
}
|
|
12
|
+
export default function AddIncentiveDialog(props: AddIncentiveProps): JSX.Element;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Dashboard(): JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
export interface Ve33IncentiveDetailProps {
|
|
3
|
+
id: string;
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
onClickGoBack: () => void;
|
|
6
|
+
}
|
|
7
|
+
export default function Ve33IncentiveDetail({ id, chainId, onClickGoBack, }: Ve33IncentiveDetailProps): JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Ve33PoolInfoI } from '../types';
|
|
2
|
+
export interface CardListProps {
|
|
3
|
+
poolList: Ve33PoolInfoI[];
|
|
4
|
+
onAdd: (pool: Ve33PoolInfoI) => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const CardList: ({ poolList, ...props }: CardListProps) => JSX.Element;
|
|
7
|
+
export declare function CardItem({ item, onAdd, }: {
|
|
8
|
+
item?: Ve33PoolInfoI;
|
|
9
|
+
onAdd?: (pool: Ve33PoolInfoI) => void;
|
|
10
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ChainId } from '@dodoex/api';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export interface TableListProps {
|
|
4
|
+
chainId: ChainId;
|
|
5
|
+
poolList: Ve33PoolInfoI[];
|
|
6
|
+
hasMore?: boolean;
|
|
7
|
+
loadMore?: () => void;
|
|
8
|
+
loadMoreLoading?: boolean;
|
|
9
|
+
onAdd: (pool: Ve33PoolInfoI) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const TableList: ({ chainId, poolList, hasMore, loadMore, loadMoreLoading, onAdd, }: TableListProps) => JSX.Element;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TokenInfo } from '../../../hooks/Token';
|
|
2
|
+
import { Ve33PoolInfoI } from '../types';
|
|
3
|
+
export default function Ve33IncentiveList({ aToken: aTokenProps, bToken: bTokenProps, onGoIncentiveDetail, }: {
|
|
4
|
+
aToken?: TokenInfo | null;
|
|
5
|
+
bToken?: TokenInfo | null;
|
|
6
|
+
onGoIncentiveDetail: (pool: Ve33PoolInfoI) => void;
|
|
7
|
+
}): JSX.Element;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Lock, useFetchUserLocks } from './hooks/useFetchUserLocks';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export interface CardListProps {
|
|
4
|
+
inSelected: boolean;
|
|
5
|
+
selectedId: number[];
|
|
6
|
+
setSelectedId: React.Dispatch<React.SetStateAction<number[]>>;
|
|
7
|
+
fetchUserLocks: ReturnType<typeof useFetchUserLocks>;
|
|
8
|
+
onManage: (lock: Lock) => void;
|
|
9
|
+
onClaim: (lock: Lock) => void;
|
|
10
|
+
}
|
|
11
|
+
export declare const CardList: ({ inSelected, selectedId, setSelectedId, fetchUserLocks, onManage, onClaim, }: CardListProps) => JSX.Element;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Lock, useFetchUserLocks } from './hooks/useFetchUserLocks';
|
|
2
|
+
export interface TableListProps {
|
|
3
|
+
inSelected: boolean;
|
|
4
|
+
selectedId: number[];
|
|
5
|
+
setSelectedId: React.Dispatch<React.SetStateAction<number[]>>;
|
|
6
|
+
fetchUserLocks: ReturnType<typeof useFetchUserLocks>;
|
|
7
|
+
onManage: (lock: Lock) => void;
|
|
8
|
+
onClaim: (lock: Lock) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare const TableList: ({ inSelected, selectedId, setSelectedId, fetchUserLocks, onManage, onClaim, }: TableListProps) => JSX.Element;
|
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
import { getFetchVE33VotingEscrowUserPointHistoryQueryOptions } from '@dodoex/dodo-contract-request';
|
|
2
|
+
export declare function useFetchUserLocks({ account, chainId, }: {
|
|
3
|
+
account: string | undefined;
|
|
4
|
+
chainId?: number;
|
|
5
|
+
}): {
|
|
6
|
+
userLocks: {
|
|
7
|
+
tokenId: number;
|
|
8
|
+
value: string;
|
|
9
|
+
votingPower: any;
|
|
10
|
+
lockedEnd: number;
|
|
11
|
+
isPermanent: boolean;
|
|
12
|
+
isVoted: boolean;
|
|
13
|
+
chainId: number | undefined;
|
|
14
|
+
token: {
|
|
15
|
+
symbol: string;
|
|
16
|
+
address: string;
|
|
17
|
+
name: string;
|
|
18
|
+
decimals: number;
|
|
19
|
+
balance: import("bignumber.js").BigNumber;
|
|
20
|
+
allowance: import("bignumber.js").BigNumber;
|
|
21
|
+
account: string;
|
|
22
|
+
spender: string | undefined;
|
|
23
|
+
chainId: number;
|
|
24
|
+
} | {
|
|
25
|
+
address: string;
|
|
26
|
+
decimals: number;
|
|
27
|
+
symbol: string;
|
|
28
|
+
name: string;
|
|
29
|
+
balance: import("bignumber.js").BigNumber;
|
|
30
|
+
spender: string | undefined;
|
|
31
|
+
allowance: import("bignumber.js").BigNumber;
|
|
32
|
+
chainId: number;
|
|
33
|
+
account?: undefined;
|
|
34
|
+
} | null | undefined;
|
|
35
|
+
}[] | undefined;
|
|
36
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery;
|
|
37
|
+
error: Error;
|
|
38
|
+
isError: true;
|
|
39
|
+
isPending: false;
|
|
40
|
+
isLoading: false;
|
|
41
|
+
isLoadingError: false;
|
|
42
|
+
isRefetchError: true;
|
|
43
|
+
isSuccess: false;
|
|
44
|
+
status: "error";
|
|
45
|
+
dataUpdatedAt: number;
|
|
46
|
+
errorUpdatedAt: number;
|
|
47
|
+
failureCount: number;
|
|
48
|
+
failureReason: Error | null;
|
|
49
|
+
errorUpdateCount: number;
|
|
50
|
+
isFetched: boolean;
|
|
51
|
+
isFetchedAfterMount: boolean;
|
|
52
|
+
isFetching: boolean;
|
|
53
|
+
isInitialLoading: boolean;
|
|
54
|
+
isPaused: boolean;
|
|
55
|
+
isPlaceholderData: boolean;
|
|
56
|
+
isRefetching: boolean;
|
|
57
|
+
isStale: boolean;
|
|
58
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery, Error>>;
|
|
59
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
60
|
+
} | {
|
|
61
|
+
userLocks: {
|
|
62
|
+
tokenId: number;
|
|
63
|
+
value: string;
|
|
64
|
+
votingPower: any;
|
|
65
|
+
lockedEnd: number;
|
|
66
|
+
isPermanent: boolean;
|
|
67
|
+
isVoted: boolean;
|
|
68
|
+
chainId: number | undefined;
|
|
69
|
+
token: {
|
|
70
|
+
symbol: string;
|
|
71
|
+
address: string;
|
|
72
|
+
name: string;
|
|
73
|
+
decimals: number;
|
|
74
|
+
balance: import("bignumber.js").BigNumber;
|
|
75
|
+
allowance: import("bignumber.js").BigNumber;
|
|
76
|
+
account: string;
|
|
77
|
+
spender: string | undefined;
|
|
78
|
+
chainId: number;
|
|
79
|
+
} | {
|
|
80
|
+
address: string;
|
|
81
|
+
decimals: number;
|
|
82
|
+
symbol: string;
|
|
83
|
+
name: string;
|
|
84
|
+
balance: import("bignumber.js").BigNumber;
|
|
85
|
+
spender: string | undefined;
|
|
86
|
+
allowance: import("bignumber.js").BigNumber;
|
|
87
|
+
chainId: number;
|
|
88
|
+
account?: undefined;
|
|
89
|
+
} | null | undefined;
|
|
90
|
+
}[] | undefined;
|
|
91
|
+
data: import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery;
|
|
92
|
+
error: null;
|
|
93
|
+
isError: false;
|
|
94
|
+
isPending: false;
|
|
95
|
+
isLoading: false;
|
|
96
|
+
isLoadingError: false;
|
|
97
|
+
isRefetchError: false;
|
|
98
|
+
isSuccess: true;
|
|
99
|
+
status: "success";
|
|
100
|
+
dataUpdatedAt: number;
|
|
101
|
+
errorUpdatedAt: number;
|
|
102
|
+
failureCount: number;
|
|
103
|
+
failureReason: Error | null;
|
|
104
|
+
errorUpdateCount: number;
|
|
105
|
+
isFetched: boolean;
|
|
106
|
+
isFetchedAfterMount: boolean;
|
|
107
|
+
isFetching: boolean;
|
|
108
|
+
isInitialLoading: boolean;
|
|
109
|
+
isPaused: boolean;
|
|
110
|
+
isPlaceholderData: boolean;
|
|
111
|
+
isRefetching: boolean;
|
|
112
|
+
isStale: boolean;
|
|
113
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery, Error>>;
|
|
114
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
115
|
+
} | {
|
|
116
|
+
userLocks: {
|
|
117
|
+
tokenId: number;
|
|
118
|
+
value: string;
|
|
119
|
+
votingPower: any;
|
|
120
|
+
lockedEnd: number;
|
|
121
|
+
isPermanent: boolean;
|
|
122
|
+
isVoted: boolean;
|
|
123
|
+
chainId: number | undefined;
|
|
124
|
+
token: {
|
|
125
|
+
symbol: string;
|
|
126
|
+
address: string;
|
|
127
|
+
name: string;
|
|
128
|
+
decimals: number;
|
|
129
|
+
balance: import("bignumber.js").BigNumber;
|
|
130
|
+
allowance: import("bignumber.js").BigNumber;
|
|
131
|
+
account: string;
|
|
132
|
+
spender: string | undefined;
|
|
133
|
+
chainId: number;
|
|
134
|
+
} | {
|
|
135
|
+
address: string;
|
|
136
|
+
decimals: number;
|
|
137
|
+
symbol: string;
|
|
138
|
+
name: string;
|
|
139
|
+
balance: import("bignumber.js").BigNumber;
|
|
140
|
+
spender: string | undefined;
|
|
141
|
+
allowance: import("bignumber.js").BigNumber;
|
|
142
|
+
chainId: number;
|
|
143
|
+
account?: undefined;
|
|
144
|
+
} | null | undefined;
|
|
145
|
+
}[] | undefined;
|
|
146
|
+
data: undefined;
|
|
147
|
+
error: Error;
|
|
148
|
+
isError: true;
|
|
149
|
+
isPending: false;
|
|
150
|
+
isLoading: false;
|
|
151
|
+
isLoadingError: true;
|
|
152
|
+
isRefetchError: false;
|
|
153
|
+
isSuccess: false;
|
|
154
|
+
status: "error";
|
|
155
|
+
dataUpdatedAt: number;
|
|
156
|
+
errorUpdatedAt: number;
|
|
157
|
+
failureCount: number;
|
|
158
|
+
failureReason: Error | null;
|
|
159
|
+
errorUpdateCount: number;
|
|
160
|
+
isFetched: boolean;
|
|
161
|
+
isFetchedAfterMount: boolean;
|
|
162
|
+
isFetching: boolean;
|
|
163
|
+
isInitialLoading: boolean;
|
|
164
|
+
isPaused: boolean;
|
|
165
|
+
isPlaceholderData: boolean;
|
|
166
|
+
isRefetching: boolean;
|
|
167
|
+
isStale: boolean;
|
|
168
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery, Error>>;
|
|
169
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
170
|
+
} | {
|
|
171
|
+
userLocks: {
|
|
172
|
+
tokenId: number;
|
|
173
|
+
value: string;
|
|
174
|
+
votingPower: any;
|
|
175
|
+
lockedEnd: number;
|
|
176
|
+
isPermanent: boolean;
|
|
177
|
+
isVoted: boolean;
|
|
178
|
+
chainId: number | undefined;
|
|
179
|
+
token: {
|
|
180
|
+
symbol: string;
|
|
181
|
+
address: string;
|
|
182
|
+
name: string;
|
|
183
|
+
decimals: number;
|
|
184
|
+
balance: import("bignumber.js").BigNumber;
|
|
185
|
+
allowance: import("bignumber.js").BigNumber;
|
|
186
|
+
account: string;
|
|
187
|
+
spender: string | undefined;
|
|
188
|
+
chainId: number;
|
|
189
|
+
} | {
|
|
190
|
+
address: string;
|
|
191
|
+
decimals: number;
|
|
192
|
+
symbol: string;
|
|
193
|
+
name: string;
|
|
194
|
+
balance: import("bignumber.js").BigNumber;
|
|
195
|
+
spender: string | undefined;
|
|
196
|
+
allowance: import("bignumber.js").BigNumber;
|
|
197
|
+
chainId: number;
|
|
198
|
+
account?: undefined;
|
|
199
|
+
} | null | undefined;
|
|
200
|
+
}[] | undefined;
|
|
201
|
+
data: undefined;
|
|
202
|
+
error: null;
|
|
203
|
+
isError: false;
|
|
204
|
+
isPending: true;
|
|
205
|
+
isLoading: true;
|
|
206
|
+
isLoadingError: false;
|
|
207
|
+
isRefetchError: false;
|
|
208
|
+
isSuccess: false;
|
|
209
|
+
status: "pending";
|
|
210
|
+
dataUpdatedAt: number;
|
|
211
|
+
errorUpdatedAt: number;
|
|
212
|
+
failureCount: number;
|
|
213
|
+
failureReason: Error | null;
|
|
214
|
+
errorUpdateCount: number;
|
|
215
|
+
isFetched: boolean;
|
|
216
|
+
isFetchedAfterMount: boolean;
|
|
217
|
+
isFetching: boolean;
|
|
218
|
+
isInitialLoading: boolean;
|
|
219
|
+
isPaused: boolean;
|
|
220
|
+
isPlaceholderData: boolean;
|
|
221
|
+
isRefetching: boolean;
|
|
222
|
+
isStale: boolean;
|
|
223
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery, Error>>;
|
|
224
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
225
|
+
} | {
|
|
226
|
+
userLocks: {
|
|
227
|
+
tokenId: number;
|
|
228
|
+
value: string;
|
|
229
|
+
votingPower: any;
|
|
230
|
+
lockedEnd: number;
|
|
231
|
+
isPermanent: boolean;
|
|
232
|
+
isVoted: boolean;
|
|
233
|
+
chainId: number | undefined;
|
|
234
|
+
token: {
|
|
235
|
+
symbol: string;
|
|
236
|
+
address: string;
|
|
237
|
+
name: string;
|
|
238
|
+
decimals: number;
|
|
239
|
+
balance: import("bignumber.js").BigNumber;
|
|
240
|
+
allowance: import("bignumber.js").BigNumber;
|
|
241
|
+
account: string;
|
|
242
|
+
spender: string | undefined;
|
|
243
|
+
chainId: number;
|
|
244
|
+
} | {
|
|
245
|
+
address: string;
|
|
246
|
+
decimals: number;
|
|
247
|
+
symbol: string;
|
|
248
|
+
name: string;
|
|
249
|
+
balance: import("bignumber.js").BigNumber;
|
|
250
|
+
spender: string | undefined;
|
|
251
|
+
allowance: import("bignumber.js").BigNumber;
|
|
252
|
+
chainId: number;
|
|
253
|
+
account?: undefined;
|
|
254
|
+
} | null | undefined;
|
|
255
|
+
}[] | undefined;
|
|
256
|
+
data: undefined;
|
|
257
|
+
error: null;
|
|
258
|
+
isError: false;
|
|
259
|
+
isPending: true;
|
|
260
|
+
isLoadingError: false;
|
|
261
|
+
isRefetchError: false;
|
|
262
|
+
isSuccess: false;
|
|
263
|
+
status: "pending";
|
|
264
|
+
dataUpdatedAt: number;
|
|
265
|
+
errorUpdatedAt: number;
|
|
266
|
+
failureCount: number;
|
|
267
|
+
failureReason: Error | null;
|
|
268
|
+
errorUpdateCount: number;
|
|
269
|
+
isFetched: boolean;
|
|
270
|
+
isFetchedAfterMount: boolean;
|
|
271
|
+
isFetching: boolean;
|
|
272
|
+
isLoading: boolean;
|
|
273
|
+
isInitialLoading: boolean;
|
|
274
|
+
isPaused: boolean;
|
|
275
|
+
isPlaceholderData: boolean;
|
|
276
|
+
isRefetching: boolean;
|
|
277
|
+
isStale: boolean;
|
|
278
|
+
refetch: (options?: import("@tanstack/react-query").RefetchOptions) => Promise<import("@tanstack/react-query").QueryObserverResult<import("@dodoex/api/dist/types/gql/graphql").Ve33_GetUserLockQuery, Error>>;
|
|
279
|
+
fetchStatus: import("@tanstack/react-query").FetchStatus;
|
|
280
|
+
};
|
|
281
|
+
export type Lock = NonNullable<ReturnType<typeof useFetchUserLocks>['userLocks']>['0'];
|
|
282
|
+
export type Point = Awaited<ReturnType<ReturnType<typeof getFetchVE33VotingEscrowUserPointHistoryQueryOptions>['queryFn']>>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function Ve33LockList(): JSX.Element | undefined;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export declare function useCreateLock({ amount, decimals, symbol, lockDuration, refetch, }: {
|
|
2
|
+
amount: string;
|
|
3
|
+
decimals: number | undefined;
|
|
4
|
+
symbol?: string;
|
|
5
|
+
lockDuration: number;
|
|
6
|
+
refetch?: () => Promise<void> | void;
|
|
7
|
+
}): import("@tanstack/react-query").UseMutationResult<void, Error, void, unknown>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare function useFetchUserTotalVeNFT(chainId: number | undefined, account: string | undefined): {
|
|
2
|
+
totalNFT: bigint;
|
|
3
|
+
isLoading: boolean;
|
|
4
|
+
refetch: () => void;
|
|
5
|
+
fetchBalanceOf: import("@tanstack/react-query").UseQueryResult<bigint, Error>;
|
|
6
|
+
fetchTokenIds: import("@tanstack/react-query").UseQueryResult<bigint, Error>[];
|
|
7
|
+
fetchBalanceOfNFT: import("@tanstack/react-query").UseQueryResult<bigint, Error>[];
|
|
8
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import BigNumber from 'bignumber.js';
|
|
2
|
+
export declare const iMAXTIME: number;
|
|
3
|
+
export declare const WEEK = 604800;
|
|
4
|
+
export declare function getLockDurationRemainder(nowTime: number): number;
|
|
5
|
+
/**
|
|
6
|
+
* @see https://github.com/velodrome-finance/contracts/blob/main/contracts/VotingEscrow.sol#L589
|
|
7
|
+
*/
|
|
8
|
+
export declare function getCreateLockNftPower(amount: string, lockDuration: number): BigNumber;
|
|
9
|
+
export declare function getLockDurationByPointHistory(bias: string | BigNumber | bigint, slope: string | BigNumber | bigint): BigNumber;
|
|
10
|
+
export declare function getAmountByPointHistory(slope: string | BigNumber | bigint): BigNumber;
|
|
11
|
+
/**
|
|
12
|
+
* @see https://github.com/velodrome-finance/contracts/blob/main/contracts/libraries/BalanceLogicLibrary.sol#L90
|
|
13
|
+
*/
|
|
14
|
+
export declare function getVotingPowerByPointHistory(point: {
|
|
15
|
+
bias: bigint;
|
|
16
|
+
slope: bigint;
|
|
17
|
+
ts: bigint;
|
|
18
|
+
permanent: bigint;
|
|
19
|
+
}, nowTime: number): BigNumber;
|
|
20
|
+
export declare function getUnlockTimeTextShort(unlockTime: number): string;
|
|
21
|
+
export declare function getUnlockTimeText(unlockTime: number): string;
|