@dhedge/trading-widget 3.2.0-alpha.0 → 3.3.0-alpha.0
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/README.md +1 -4
- package/core-kit/abi/easy-swapper-v2.d.ts +44 -0
- package/core-kit/const/contracts/base.d.ts +1 -1
- package/core-kit/const/default-data.d.ts +1 -1
- package/core-kit/const/synthetix.d.ts +1 -0
- package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +88 -0
- package/core-kit/hooks/pool/use-pool-fees.d.ts +1 -0
- package/core-kit/hooks/state/action.d.ts +0 -3
- package/core-kit/hooks/state/index.d.ts +1 -2
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +44 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +44 -0
- package/core-kit/hooks/user/multicall/use-user-multicall.d.ts +44 -0
- package/core-kit/types/state.types.d.ts +0 -8
- package/index-486e8b60.cjs +217 -0
- package/{index-97262ee5.js → index-a29190ba.js} +10100 -10406
- package/index.cjs +1 -1
- package/index.d.ts +2 -2
- package/index.js +210 -212
- package/package.json +1 -1
- package/{pyth-adapter-4822ae26.js → pyth-adapter-330946d6.js} +1 -1
- package/{pyth-adapter-3dec6847.cjs → pyth-adapter-a81f3e9c.cjs} +1 -1
- package/style.css +1 -1
- package/trading-widget/components/deposit/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +0 -3
- package/trading-widget/components/widget/widget-buttons/approve-button/approve-button.hooks.d.ts +0 -1
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-deposit-swap-quote-button/reload-deposit-swap-quote-button.hooks.d.ts +1 -2
- package/trading-widget/components/widget/widget-buttons/reload-swap-quote-button/reload-withdraw-swap-quote-button/reload-withdraw-swap-quote-button.hooks.d.ts +1 -2
- package/trading-widget/components/widget/widget-overlay/index.d.ts +0 -1
- package/trading-widget/components/withdraw/init-step/meta/transaction-disclosure/transaction-disclosure.hooks.d.ts +0 -3
- package/trading-widget/providers/translation-provider/translation-provider.types.d.ts +0 -1
- package/core-kit/hooks/state/meta.d.ts +0 -6
- package/index-3ff0a312.cjs +0 -217
- package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.d.ts +0 -2
- package/trading-widget/components/widget/widget-overlay/pending-approval-overlay/pending-approval-overlay.hooks.d.ts +0 -3
- package/trading-widget/components/widget/widget-overlay/trading-overlay/trading-summary/claim-summary.d.ts +0 -7
package/README.md
CHANGED
|
@@ -59,7 +59,6 @@ Top level provider component. Headless part of trading logic. API handles params
|
|
|
59
59
|
> | `onUpdateSendTokenInput` | (payload: Partial\<{ address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }\>) => void | undefined | triggers on send token change |
|
|
60
60
|
> | `onUpdateTradingSettings` | (payload: Partial\<{ slippage: `number \| 'auto'`; minSlippage?: `number` isInfiniteAllowance: `boolean`; isMultiAssetWithdrawalEnabled: `boolean`; isMaxSlippageLoading: `boolean` }\>) => void | undefined | triggers on trading settings change |
|
|
61
61
|
> | `onSetTradingType` | (payload: `'deposit' \| 'withdraw'`) => void | undefined | triggers on trading type change |
|
|
62
|
-
> | `onUpdateTradingMeta` | (payload: Partial\<{ approvingStatus: `'pending' \| 'success'` }\>) => void | undefined | triggers on trading meta change |
|
|
63
62
|
> | `onUpdateTradingModal` | (payload: Partial\<{ isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'` }\>) => void | undefined | triggers on trading modal change |
|
|
64
63
|
> | `onUpdateTransactions` | (payload: AddTransaction \| UpdateTransaction \| RemoveTransaction) => void | undefined | triggers on transaction action change |
|
|
65
64
|
> | `onTradingSettleError` | (error: `Error`) => void | undefined | triggers on trading settle error |
|
|
@@ -90,7 +89,6 @@ Top level provider component. Headless part of trading logic. API handles params
|
|
|
90
89
|
> | `type` | 'deposit' \| 'withdraw' | `'deposit'` | Trading type |
|
|
91
90
|
> | `input` | { sendToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` }; receiveToken: { address: `Address`; symbol: `string`; value: `string`; decimals: `number`; isLoading?: `boolean` } } | `poolConfigMap[poolAddress]` | Send/receive tokens pair |
|
|
92
91
|
> | `entryFee` | { deposit: `number`; depositWithCustomCooldown: `number`; } | { deposit: `0`; depositWithCustomCooldown: `0.1` } | Entry fee config map |
|
|
93
|
-
> | `meta` | { approvingStatus?: `'pending' \| 'success'` } | `{}` | Trading meta info |
|
|
94
92
|
> | `modal` | { isOpen: `boolean`; status: `'Success' \| 'None' \| 'Mining' \| 'Wallet'`; action: `'deposit' \| 'withdraw' \| 'approve \| 'oraclesUpdate'`; link?: `string`; sendToken: TradingToken \| null; receiveToken: TradingToken \| null } | `{ isOpen: `false`,status: `'None'`, receiveToken: `null`, sendToken: `null` }` | Trading modal state |
|
|
95
93
|
> | `transactions` | { action: `'deposit' \| 'withdraw' \| 'approve'`; symbol: `string`; chainId: `ChainId`; txHash?: `Address` }[] | `[]` | Pending transactions |
|
|
96
94
|
> | `poolFallbackData` | { address: `Address`; managerLogicAddress?: `Address`; poolCompositions: `PoolComposition[]`; tokenPrice?: `string`; apy?: { value: `number`; currency: `'USD' \| 'ETH'` } } | { address: `AddressZero` } | Current active pool fallback data to override or extend contract's response |
|
|
@@ -451,7 +449,6 @@ path: `component.meta[name]`
|
|
|
451
449
|
> | `tokenAllowance` | string | Token Allowance | |
|
|
452
450
|
> | `entryFee` | string | Entry Fee | |
|
|
453
451
|
> | `entryFeeExplanation` | string | When you deposit, the token takes a small entry fee. This fee helps cover the costs when we rebalance the underlying funds, and it's shared among all token holders. | |
|
|
454
|
-
> | `amountToBeApproved` | string | Amount of {symbol} tokens to be approved. Can be customized in settings. | |
|
|
455
452
|
> | `minDepositUsd` | string | Minimum deposit in USD. | |
|
|
456
453
|
> | `minDeposit` | string | Minimum Deposit | |
|
|
457
454
|
> | `tokensLockTime` | string | Purchased tokens will have a {lockTime} lock. | |
|
|
@@ -515,7 +512,7 @@ path: `component.meta[name]`
|
|
|
515
512
|
> | `unrollAction` | string | Unroll | |
|
|
516
513
|
> | `unrollAndClaimAction` | string | Claim | |
|
|
517
514
|
> | `claimAction` | string | Claim Without Swap | |
|
|
518
|
-
> | `claimLabel` | string | Claim
|
|
515
|
+
> | `claimLabel` | string | Claim Assets | |
|
|
519
516
|
> | `swapAndClaimTo` | string | Swap and claim assets to | |
|
|
520
517
|
> | `initWithdrawDescription` | string | Unroll | |
|
|
521
518
|
> | `initWithdrawTooltip` | string | Unroll prepares assets for single asset withdrawal | |
|
|
@@ -725,6 +725,50 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
725
725
|
}];
|
|
726
726
|
readonly stateMutability: "nonpayable";
|
|
727
727
|
readonly type: "function";
|
|
728
|
+
}, {
|
|
729
|
+
readonly inputs: readonly [{
|
|
730
|
+
readonly internalType: "address";
|
|
731
|
+
readonly name: "_dHedgeVault";
|
|
732
|
+
readonly type: "address";
|
|
733
|
+
}, {
|
|
734
|
+
readonly internalType: "uint256";
|
|
735
|
+
readonly name: "_amountIn";
|
|
736
|
+
readonly type: "uint256";
|
|
737
|
+
}, {
|
|
738
|
+
readonly components: readonly [{
|
|
739
|
+
readonly internalType: "address";
|
|
740
|
+
readonly name: "supportedAsset";
|
|
741
|
+
readonly type: "address";
|
|
742
|
+
}, {
|
|
743
|
+
readonly internalType: "bytes";
|
|
744
|
+
readonly name: "withdrawData";
|
|
745
|
+
readonly type: "bytes";
|
|
746
|
+
}, {
|
|
747
|
+
readonly internalType: "uint256";
|
|
748
|
+
readonly name: "slippageTolerance";
|
|
749
|
+
readonly type: "uint256";
|
|
750
|
+
}];
|
|
751
|
+
readonly internalType: "struct IPoolLogic.ComplexAsset[]";
|
|
752
|
+
readonly name: "_complexAssetsData";
|
|
753
|
+
readonly type: "tuple[]";
|
|
754
|
+
}];
|
|
755
|
+
readonly name: "unrollAndClaim";
|
|
756
|
+
readonly outputs: readonly [{
|
|
757
|
+
readonly components: readonly [{
|
|
758
|
+
readonly internalType: "address";
|
|
759
|
+
readonly name: "token";
|
|
760
|
+
readonly type: "address";
|
|
761
|
+
}, {
|
|
762
|
+
readonly internalType: "uint256";
|
|
763
|
+
readonly name: "balance";
|
|
764
|
+
readonly type: "uint256";
|
|
765
|
+
}];
|
|
766
|
+
readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
|
|
767
|
+
readonly name: "";
|
|
768
|
+
readonly type: "tuple[]";
|
|
769
|
+
}];
|
|
770
|
+
readonly stateMutability: "nonpayable";
|
|
771
|
+
readonly type: "function";
|
|
728
772
|
}, {
|
|
729
773
|
readonly inputs: readonly [];
|
|
730
774
|
readonly name: "weth";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare const FACTORY_ADDRESS_BASE = "0x49Afe3abCf66CF09Fab86cb1139D8811C8afe56F";
|
|
2
2
|
export declare const SYNTHETIX_V3_CORE_ADDRESS_BASE = "0x32C222A9A159782aFD7529c87FA34b96CA72C696";
|
|
3
3
|
export declare const EASY_SWAPPER_V2_ADDRESS_BASE = "0xf067575Eb60c7587C11e867907AA7284833704d1";
|
|
4
|
-
export declare const AAVE_LENDING_POOL_V3_ADDRESS_BASE = "0xa238dd80c259a72e81d7e4664a9801593f98d1c5";
|
|
5
4
|
export declare const FLATCOIN_POINTS_MODULE_ADDRESS_BASE = "0x59525b9b23adc475ef91d98dae06b568ba574ce5";
|
|
6
5
|
export declare const FLATMONEY_EARLY_DEPOSITOR_VAULT_ADDRESS_BASE = "0xa907504d7a4c415b4e6e1d0866d96afe8202f0e5";
|
|
7
6
|
export declare const FLATMONEY_DHT_STAKING_VAULT_ADDRESS_BASE = "0x1849324228d852a67eb7443e42d967e480ffe95d";
|
|
7
|
+
export declare const AAVE_LENDING_POOL_V3_ADDRESS_BASE = "0xa238dd80c259a72e81d7e4664a9801593f98d1c5";
|
|
@@ -25,4 +25,4 @@ export declare const MANAGER_FEE_DENOMINATOR = 10000;
|
|
|
25
25
|
export declare const DEFAULT_PROMISE_TIMEOUT_MS = 13000;
|
|
26
26
|
export declare const DEFAULT_VISIBLE_ASSETS_LIMIT = 3;
|
|
27
27
|
export declare const SWAP_QUOTE_REFRESH_INTERVAL_MS = 20000;
|
|
28
|
-
export declare const DEFAULT_NOTIFICATION_DURATION_MS =
|
|
28
|
+
export declare const DEFAULT_NOTIFICATION_DURATION_MS = 15000;
|
|
@@ -3,3 +3,4 @@ export declare const DHEDGE_SYNTHETIX_V3_ASSETS_MAP: Record<ChainId, Address>;
|
|
|
3
3
|
export declare const DHEDGE_SYNTHETIX_V3_VAULT_ADDRESSES: Address[];
|
|
4
4
|
export declare const SYNTHETIX_V3_VAULTS_WITHDRAW_ASSET_SYMBOL_MAP: Record<string, string>;
|
|
5
5
|
export declare const SYNTHETIX_V3_POSITION_DEBT_ARGUMENTS: Record<string, string[]>;
|
|
6
|
+
export declare const WITHDRAWAL_FEE_MAP: Map<`0x${string}`, number>;
|
|
@@ -1686,6 +1686,50 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1686
1686
|
}];
|
|
1687
1687
|
readonly stateMutability: "nonpayable";
|
|
1688
1688
|
readonly type: "function";
|
|
1689
|
+
}, {
|
|
1690
|
+
readonly inputs: readonly [{
|
|
1691
|
+
readonly internalType: "address";
|
|
1692
|
+
readonly name: "_dHedgeVault";
|
|
1693
|
+
readonly type: "address";
|
|
1694
|
+
}, {
|
|
1695
|
+
readonly internalType: "uint256";
|
|
1696
|
+
readonly name: "_amountIn";
|
|
1697
|
+
readonly type: "uint256";
|
|
1698
|
+
}, {
|
|
1699
|
+
readonly components: readonly [{
|
|
1700
|
+
readonly internalType: "address";
|
|
1701
|
+
readonly name: "supportedAsset";
|
|
1702
|
+
readonly type: "address";
|
|
1703
|
+
}, {
|
|
1704
|
+
readonly internalType: "bytes";
|
|
1705
|
+
readonly name: "withdrawData";
|
|
1706
|
+
readonly type: "bytes";
|
|
1707
|
+
}, {
|
|
1708
|
+
readonly internalType: "uint256";
|
|
1709
|
+
readonly name: "slippageTolerance";
|
|
1710
|
+
readonly type: "uint256";
|
|
1711
|
+
}];
|
|
1712
|
+
readonly internalType: "struct IPoolLogic.ComplexAsset[]";
|
|
1713
|
+
readonly name: "_complexAssetsData";
|
|
1714
|
+
readonly type: "tuple[]";
|
|
1715
|
+
}];
|
|
1716
|
+
readonly name: "unrollAndClaim";
|
|
1717
|
+
readonly outputs: readonly [{
|
|
1718
|
+
readonly components: readonly [{
|
|
1719
|
+
readonly internalType: "address";
|
|
1720
|
+
readonly name: "token";
|
|
1721
|
+
readonly type: "address";
|
|
1722
|
+
}, {
|
|
1723
|
+
readonly internalType: "uint256";
|
|
1724
|
+
readonly name: "balance";
|
|
1725
|
+
readonly type: "uint256";
|
|
1726
|
+
}];
|
|
1727
|
+
readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
|
|
1728
|
+
readonly name: "";
|
|
1729
|
+
readonly type: "tuple[]";
|
|
1730
|
+
}];
|
|
1731
|
+
readonly stateMutability: "nonpayable";
|
|
1732
|
+
readonly type: "function";
|
|
1689
1733
|
}, {
|
|
1690
1734
|
readonly inputs: readonly [];
|
|
1691
1735
|
readonly name: "weth";
|
|
@@ -2685,6 +2729,50 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2685
2729
|
}];
|
|
2686
2730
|
readonly stateMutability: "nonpayable";
|
|
2687
2731
|
readonly type: "function";
|
|
2732
|
+
}, {
|
|
2733
|
+
readonly inputs: readonly [{
|
|
2734
|
+
readonly internalType: "address";
|
|
2735
|
+
readonly name: "_dHedgeVault";
|
|
2736
|
+
readonly type: "address";
|
|
2737
|
+
}, {
|
|
2738
|
+
readonly internalType: "uint256";
|
|
2739
|
+
readonly name: "_amountIn";
|
|
2740
|
+
readonly type: "uint256";
|
|
2741
|
+
}, {
|
|
2742
|
+
readonly components: readonly [{
|
|
2743
|
+
readonly internalType: "address";
|
|
2744
|
+
readonly name: "supportedAsset";
|
|
2745
|
+
readonly type: "address";
|
|
2746
|
+
}, {
|
|
2747
|
+
readonly internalType: "bytes";
|
|
2748
|
+
readonly name: "withdrawData";
|
|
2749
|
+
readonly type: "bytes";
|
|
2750
|
+
}, {
|
|
2751
|
+
readonly internalType: "uint256";
|
|
2752
|
+
readonly name: "slippageTolerance";
|
|
2753
|
+
readonly type: "uint256";
|
|
2754
|
+
}];
|
|
2755
|
+
readonly internalType: "struct IPoolLogic.ComplexAsset[]";
|
|
2756
|
+
readonly name: "_complexAssetsData";
|
|
2757
|
+
readonly type: "tuple[]";
|
|
2758
|
+
}];
|
|
2759
|
+
readonly name: "unrollAndClaim";
|
|
2760
|
+
readonly outputs: readonly [{
|
|
2761
|
+
readonly components: readonly [{
|
|
2762
|
+
readonly internalType: "address";
|
|
2763
|
+
readonly name: "token";
|
|
2764
|
+
readonly type: "address";
|
|
2765
|
+
}, {
|
|
2766
|
+
readonly internalType: "uint256";
|
|
2767
|
+
readonly name: "balance";
|
|
2768
|
+
readonly type: "uint256";
|
|
2769
|
+
}];
|
|
2770
|
+
readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
|
|
2771
|
+
readonly name: "";
|
|
2772
|
+
readonly type: "tuple[]";
|
|
2773
|
+
}];
|
|
2774
|
+
readonly stateMutability: "nonpayable";
|
|
2775
|
+
readonly type: "function";
|
|
2688
2776
|
}, {
|
|
2689
2777
|
readonly inputs: readonly [];
|
|
2690
2778
|
readonly name: "weth";
|
|
@@ -9,9 +9,6 @@ export declare const useUpdateTradingSettings: () => (payload: Partial<{
|
|
|
9
9
|
isMaxSlippageLoading: boolean;
|
|
10
10
|
}>) => void;
|
|
11
11
|
export declare const useSetTradingType: () => (payload: import("../../types").TradingPanelType) => void;
|
|
12
|
-
export declare const useUpdateTradingMeta: () => (payload: Partial<{
|
|
13
|
-
approvingStatus?: "success" | "pending" | undefined;
|
|
14
|
-
}>) => void;
|
|
15
12
|
export declare const useUpdateTradingModal: () => (payload: Partial<import("../../types").TradingPanelStateModal>) => void;
|
|
16
13
|
export declare const useUpdatePoolFallbackData: () => (payload: import("../../types").PoolFallbackData) => void;
|
|
17
14
|
export declare const useOnTransactionError: () => ((error: Error, action: import("../../types").TransactionAction | undefined, chainId?: number | undefined, txHash?: `0x${string}` | undefined) => void) | undefined;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
export { useSetTradingType,
|
|
1
|
+
export { useSetTradingType, useUpdateTradingModal, useUpdateSendTokenInput, useSetPoolAddress, useUpdateReceiveTokenInput, useUpdateTradingSettings, useOnTransactionError, useOnTransactionSuccess, useOnTransactionEstimationError, useOnTokenSelector, useTradingPanelLogger, useOnSimulateTransaction, useUpdatePoolFallbackData, useOnTradingSettleError, useGetSwapData, } from './action';
|
|
2
2
|
export { useTradingPanelPoolAddress, useTradingPanelPoolConfig, useTradingPanelPoolConfigs, useTradingPanelPoolFallbackData, useIsPoolAddress, } from './pool';
|
|
3
3
|
export { useSendTokenInput, useReceiveTokenInput } from './input';
|
|
4
4
|
export { useTradingPanelSettings } from './settings';
|
|
5
|
-
export { useTradingPanelMeta, useTradingPanelApprovingStatus } from './meta';
|
|
6
5
|
export { useTradingPanelModal } from './modal';
|
|
7
6
|
export { useTradingPanelType, useIsDepositTradingPanelType } from './type';
|
|
8
7
|
export { useTradingPanelTransactions } from './transaction';
|
|
@@ -726,6 +726,50 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
726
726
|
}];
|
|
727
727
|
readonly stateMutability: "nonpayable";
|
|
728
728
|
readonly type: "function";
|
|
729
|
+
}, {
|
|
730
|
+
readonly inputs: readonly [{
|
|
731
|
+
readonly internalType: "address";
|
|
732
|
+
readonly name: "_dHedgeVault";
|
|
733
|
+
readonly type: "address";
|
|
734
|
+
}, {
|
|
735
|
+
readonly internalType: "uint256";
|
|
736
|
+
readonly name: "_amountIn";
|
|
737
|
+
readonly type: "uint256";
|
|
738
|
+
}, {
|
|
739
|
+
readonly components: readonly [{
|
|
740
|
+
readonly internalType: "address";
|
|
741
|
+
readonly name: "supportedAsset";
|
|
742
|
+
readonly type: "address";
|
|
743
|
+
}, {
|
|
744
|
+
readonly internalType: "bytes";
|
|
745
|
+
readonly name: "withdrawData";
|
|
746
|
+
readonly type: "bytes";
|
|
747
|
+
}, {
|
|
748
|
+
readonly internalType: "uint256";
|
|
749
|
+
readonly name: "slippageTolerance";
|
|
750
|
+
readonly type: "uint256";
|
|
751
|
+
}];
|
|
752
|
+
readonly internalType: "struct IPoolLogic.ComplexAsset[]";
|
|
753
|
+
readonly name: "_complexAssetsData";
|
|
754
|
+
readonly type: "tuple[]";
|
|
755
|
+
}];
|
|
756
|
+
readonly name: "unrollAndClaim";
|
|
757
|
+
readonly outputs: readonly [{
|
|
758
|
+
readonly components: readonly [{
|
|
759
|
+
readonly internalType: "address";
|
|
760
|
+
readonly name: "token";
|
|
761
|
+
readonly type: "address";
|
|
762
|
+
}, {
|
|
763
|
+
readonly internalType: "uint256";
|
|
764
|
+
readonly name: "balance";
|
|
765
|
+
readonly type: "uint256";
|
|
766
|
+
}];
|
|
767
|
+
readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
|
|
768
|
+
readonly name: "";
|
|
769
|
+
readonly type: "tuple[]";
|
|
770
|
+
}];
|
|
771
|
+
readonly stateMutability: "nonpayable";
|
|
772
|
+
readonly type: "function";
|
|
729
773
|
}, {
|
|
730
774
|
readonly inputs: readonly [];
|
|
731
775
|
readonly name: "weth";
|
|
@@ -725,6 +725,50 @@ export declare const useWithdrawalVaultAddress: () => import("wagmi").UseReadCon
|
|
|
725
725
|
}];
|
|
726
726
|
readonly stateMutability: "nonpayable";
|
|
727
727
|
readonly type: "function";
|
|
728
|
+
}, {
|
|
729
|
+
readonly inputs: readonly [{
|
|
730
|
+
readonly internalType: "address";
|
|
731
|
+
readonly name: "_dHedgeVault";
|
|
732
|
+
readonly type: "address";
|
|
733
|
+
}, {
|
|
734
|
+
readonly internalType: "uint256";
|
|
735
|
+
readonly name: "_amountIn";
|
|
736
|
+
readonly type: "uint256";
|
|
737
|
+
}, {
|
|
738
|
+
readonly components: readonly [{
|
|
739
|
+
readonly internalType: "address";
|
|
740
|
+
readonly name: "supportedAsset";
|
|
741
|
+
readonly type: "address";
|
|
742
|
+
}, {
|
|
743
|
+
readonly internalType: "bytes";
|
|
744
|
+
readonly name: "withdrawData";
|
|
745
|
+
readonly type: "bytes";
|
|
746
|
+
}, {
|
|
747
|
+
readonly internalType: "uint256";
|
|
748
|
+
readonly name: "slippageTolerance";
|
|
749
|
+
readonly type: "uint256";
|
|
750
|
+
}];
|
|
751
|
+
readonly internalType: "struct IPoolLogic.ComplexAsset[]";
|
|
752
|
+
readonly name: "_complexAssetsData";
|
|
753
|
+
readonly type: "tuple[]";
|
|
754
|
+
}];
|
|
755
|
+
readonly name: "unrollAndClaim";
|
|
756
|
+
readonly outputs: readonly [{
|
|
757
|
+
readonly components: readonly [{
|
|
758
|
+
readonly internalType: "address";
|
|
759
|
+
readonly name: "token";
|
|
760
|
+
readonly type: "address";
|
|
761
|
+
}, {
|
|
762
|
+
readonly internalType: "uint256";
|
|
763
|
+
readonly name: "balance";
|
|
764
|
+
readonly type: "uint256";
|
|
765
|
+
}];
|
|
766
|
+
readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
|
|
767
|
+
readonly name: "";
|
|
768
|
+
readonly type: "tuple[]";
|
|
769
|
+
}];
|
|
770
|
+
readonly stateMutability: "nonpayable";
|
|
771
|
+
readonly type: "function";
|
|
728
772
|
}, {
|
|
729
773
|
readonly inputs: readonly [];
|
|
730
774
|
readonly name: "weth";
|
|
@@ -790,6 +790,50 @@ export declare const useUserMulticall: ({ address, chainId, }: PoolContractCallP
|
|
|
790
790
|
}];
|
|
791
791
|
readonly stateMutability: "nonpayable";
|
|
792
792
|
readonly type: "function";
|
|
793
|
+
}, {
|
|
794
|
+
readonly inputs: readonly [{
|
|
795
|
+
readonly internalType: "address";
|
|
796
|
+
readonly name: "_dHedgeVault";
|
|
797
|
+
readonly type: "address";
|
|
798
|
+
}, {
|
|
799
|
+
readonly internalType: "uint256";
|
|
800
|
+
readonly name: "_amountIn";
|
|
801
|
+
readonly type: "uint256";
|
|
802
|
+
}, {
|
|
803
|
+
readonly components: readonly [{
|
|
804
|
+
readonly internalType: "address";
|
|
805
|
+
readonly name: "supportedAsset";
|
|
806
|
+
readonly type: "address";
|
|
807
|
+
}, {
|
|
808
|
+
readonly internalType: "bytes";
|
|
809
|
+
readonly name: "withdrawData";
|
|
810
|
+
readonly type: "bytes";
|
|
811
|
+
}, {
|
|
812
|
+
readonly internalType: "uint256";
|
|
813
|
+
readonly name: "slippageTolerance";
|
|
814
|
+
readonly type: "uint256";
|
|
815
|
+
}];
|
|
816
|
+
readonly internalType: "struct IPoolLogic.ComplexAsset[]";
|
|
817
|
+
readonly name: "_complexAssetsData";
|
|
818
|
+
readonly type: "tuple[]";
|
|
819
|
+
}];
|
|
820
|
+
readonly name: "unrollAndClaim";
|
|
821
|
+
readonly outputs: readonly [{
|
|
822
|
+
readonly components: readonly [{
|
|
823
|
+
readonly internalType: "address";
|
|
824
|
+
readonly name: "token";
|
|
825
|
+
readonly type: "address";
|
|
826
|
+
}, {
|
|
827
|
+
readonly internalType: "uint256";
|
|
828
|
+
readonly name: "balance";
|
|
829
|
+
readonly type: "uint256";
|
|
830
|
+
}];
|
|
831
|
+
readonly internalType: "struct IWithdrawalVault.TrackedAsset[]";
|
|
832
|
+
readonly name: "";
|
|
833
|
+
readonly type: "tuple[]";
|
|
834
|
+
}];
|
|
835
|
+
readonly stateMutability: "nonpayable";
|
|
836
|
+
readonly type: "function";
|
|
793
837
|
}, {
|
|
794
838
|
readonly inputs: readonly [];
|
|
795
839
|
readonly name: "weth";
|
|
@@ -27,9 +27,6 @@ export interface TradingPanelState {
|
|
|
27
27
|
sendToken: DynamicTradingToken;
|
|
28
28
|
receiveToken: DynamicTradingToken;
|
|
29
29
|
};
|
|
30
|
-
meta: {
|
|
31
|
-
approvingStatus?: 'pending' | 'success';
|
|
32
|
-
};
|
|
33
30
|
modal: TradingPanelStateModal;
|
|
34
31
|
poolAddress: PoolConfig['address'];
|
|
35
32
|
poolConfigMap: Record<PoolConfig['address'], PoolConfig>;
|
|
@@ -43,7 +40,6 @@ export interface TradingPanelSetters {
|
|
|
43
40
|
updateReceiveTokenInput: (payload: Partial<DynamicTradingToken>) => void;
|
|
44
41
|
updateTradingSettings: (payload: Partial<TradingPanelState['settings']>) => void;
|
|
45
42
|
setTradingType: (payload: TradingPanelState['type']) => void;
|
|
46
|
-
updateTradingMeta: (payload: Partial<TradingPanelState['meta']>) => void;
|
|
47
43
|
updateTradingModal: (payload: Partial<TradingPanelState['modal']>) => void;
|
|
48
44
|
updateTransactions: (payload: UpdateTransactionsArguments) => void;
|
|
49
45
|
updatePoolFallbackData: (payload: PoolFallbackData) => void;
|
|
@@ -54,7 +50,6 @@ export interface CallbackConfig {
|
|
|
54
50
|
onUpdateReceiveTokenInput: TradingPanelSetters['updateReceiveTokenInput'];
|
|
55
51
|
onUpdateTradingSettings: TradingPanelSetters['updateTradingSettings'];
|
|
56
52
|
onSetTradingType: TradingPanelSetters['setTradingType'];
|
|
57
|
-
onUpdateTradingMeta: TradingPanelSetters['updateTradingMeta'];
|
|
58
53
|
onUpdateTradingModal: TradingPanelSetters['updateTradingModal'];
|
|
59
54
|
onUpdateTransactions: TradingPanelSetters['updateTransactions'];
|
|
60
55
|
onTradingSettleError: (error: Error) => void;
|
|
@@ -84,9 +79,6 @@ export type TradingPanelAction = {
|
|
|
84
79
|
} | {
|
|
85
80
|
type: 'UPDATE_TRADING_SETTINGS';
|
|
86
81
|
payload: Partial<TradingPanelState['settings']>;
|
|
87
|
-
} | {
|
|
88
|
-
type: 'UPDATE_TRADING_META';
|
|
89
|
-
payload: Partial<TradingPanelState['meta']>;
|
|
90
82
|
} | {
|
|
91
83
|
type: 'UPDATE_TRADING_MODAL';
|
|
92
84
|
payload: Partial<TradingPanelState['modal']>;
|