@dhedge/trading-widget 5.7.4 → 5.9.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 +88 -13
- package/{complex-withdraw-asset-data-CSbXrln9.js → complex-withdraw-asset-data-D8GMw8ql.js} +55 -54
- package/complex-withdraw-asset-data-DSjzOaBD.cjs +1 -0
- package/const.cjs +1 -1
- package/const.js +62 -61
- package/core-kit/abi/easy-swapper-v2.d.ts +32 -0
- package/core-kit/abi/index.d.ts +1 -1
- package/core-kit/const/default-data.d.ts +2 -2
- package/core-kit/const/gmx.d.ts +1 -1
- package/core-kit/const/network.d.ts +1 -0
- package/core-kit/hooks/pool/multicall/use-pool.static.d.ts +74 -0
- package/core-kit/hooks/pool/use-has-single-asset-withdraw-blockers.d.ts +10 -0
- package/core-kit/hooks/referral/index.d.ts +2 -1
- package/core-kit/hooks/referral/use-legacy-referral-program.d.ts +2 -0
- package/core-kit/hooks/referral/use-referral-address.d.ts +15 -0
- package/core-kit/hooks/state/action.d.ts +4 -0
- package/core-kit/hooks/state/aggregators.d.ts +11 -0
- package/core-kit/hooks/state/index.d.ts +2 -1
- package/core-kit/hooks/trading/deposit-v2/use-deposit-quote-contract-read.d.ts +32 -0
- package/core-kit/hooks/trading/use-easy-swapper-tracked-assets.d.ts +32 -0
- package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-tracked-assets.d.ts +10 -0
- package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-estimated-receive-assets.d.ts +10 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdraw-assets-info.d.ts +10 -0
- package/core-kit/hooks/trading/withdraw-v2/use-withdrawal-vault-address.d.ts +32 -0
- package/core-kit/types/referral.types.d.ts +6 -1
- package/core-kit/types/state.types.d.ts +5 -0
- package/core-kit/utils/deposit.d.ts +4 -3
- package/index.cjs +1 -1
- package/index.d.ts +4 -4
- package/index.js +2907 -2827
- package/package.json +1 -1
- package/storage-B9jNfIvl.cjs +1 -0
- package/{storage-C-fGORin.js → storage-C0zg_Mfy.js} +393 -338
- package/trading-widget/components/widget/widget-settings/slippage-selector/slippage-selector.hooks.d.ts +3 -0
- package/trading-widget/providers/config-provider/config-provider.types.d.ts +1 -1
- package/trading-widget/providers/config-provider/index.d.ts +1 -0
- package/trading-widget/providers/config-provider/use-resolved-default-withdraw-slippage.d.ts +1 -0
- package/utils.cjs +1 -1
- package/utils.js +1 -1
- package/complex-withdraw-asset-data-PUJePMgr.cjs +0 -1
- package/core-kit/abi/pool-factory.d.ts +0 -57
- package/core-kit/hooks/referral/use-referral-program.d.ts +0 -2
- package/storage-DpKnvEM4.cjs +0 -1
|
@@ -457,6 +457,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
457
457
|
readonly internalType: "uint256";
|
|
458
458
|
readonly name: "_expectedAmountReceived";
|
|
459
459
|
readonly type: "uint256";
|
|
460
|
+
}, {
|
|
461
|
+
readonly internalType: "bytes";
|
|
462
|
+
readonly name: "_referralData";
|
|
463
|
+
readonly type: "bytes";
|
|
460
464
|
}];
|
|
461
465
|
readonly name: "deposit";
|
|
462
466
|
readonly outputs: readonly [];
|
|
@@ -501,6 +505,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
501
505
|
readonly internalType: "uint256";
|
|
502
506
|
readonly name: "_expectedAmountReceived";
|
|
503
507
|
readonly type: "uint256";
|
|
508
|
+
}, {
|
|
509
|
+
readonly internalType: "bytes";
|
|
510
|
+
readonly name: "_referralData";
|
|
511
|
+
readonly type: "bytes";
|
|
504
512
|
}];
|
|
505
513
|
readonly name: "depositWithCustomCooldown";
|
|
506
514
|
readonly outputs: readonly [];
|
|
@@ -717,6 +725,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
717
725
|
readonly internalType: "uint256";
|
|
718
726
|
readonly name: "_expectedAmountReceived";
|
|
719
727
|
readonly type: "uint256";
|
|
728
|
+
}, {
|
|
729
|
+
readonly internalType: "bytes";
|
|
730
|
+
readonly name: "_referralData";
|
|
731
|
+
readonly type: "bytes";
|
|
720
732
|
}];
|
|
721
733
|
readonly name: "nativeDeposit";
|
|
722
734
|
readonly outputs: readonly [];
|
|
@@ -731,6 +743,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
731
743
|
readonly internalType: "uint256";
|
|
732
744
|
readonly name: "_expectedAmountReceived";
|
|
733
745
|
readonly type: "uint256";
|
|
746
|
+
}, {
|
|
747
|
+
readonly internalType: "bytes";
|
|
748
|
+
readonly name: "_referralData";
|
|
749
|
+
readonly type: "bytes";
|
|
734
750
|
}];
|
|
735
751
|
readonly name: "nativeDepositWithCustomCooldown";
|
|
736
752
|
readonly outputs: readonly [];
|
|
@@ -995,6 +1011,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
995
1011
|
readonly internalType: "uint256";
|
|
996
1012
|
readonly name: "_expectedAmountReceived";
|
|
997
1013
|
readonly type: "uint256";
|
|
1014
|
+
}, {
|
|
1015
|
+
readonly internalType: "bytes";
|
|
1016
|
+
readonly name: "_referralData";
|
|
1017
|
+
readonly type: "bytes";
|
|
998
1018
|
}];
|
|
999
1019
|
readonly name: "zapDeposit";
|
|
1000
1020
|
readonly outputs: readonly [];
|
|
@@ -1053,6 +1073,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
1053
1073
|
readonly internalType: "uint256";
|
|
1054
1074
|
readonly name: "_expectedAmountReceived";
|
|
1055
1075
|
readonly type: "uint256";
|
|
1076
|
+
}, {
|
|
1077
|
+
readonly internalType: "bytes";
|
|
1078
|
+
readonly name: "_referralData";
|
|
1079
|
+
readonly type: "bytes";
|
|
1056
1080
|
}];
|
|
1057
1081
|
readonly name: "zapDepositWithCustomCooldown";
|
|
1058
1082
|
readonly outputs: readonly [];
|
|
@@ -1111,6 +1135,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
1111
1135
|
readonly internalType: "uint256";
|
|
1112
1136
|
readonly name: "_expectedAmountReceived";
|
|
1113
1137
|
readonly type: "uint256";
|
|
1138
|
+
}, {
|
|
1139
|
+
readonly internalType: "bytes";
|
|
1140
|
+
readonly name: "_referralData";
|
|
1141
|
+
readonly type: "bytes";
|
|
1114
1142
|
}];
|
|
1115
1143
|
readonly name: "zapNativeDeposit";
|
|
1116
1144
|
readonly outputs: readonly [];
|
|
@@ -1169,6 +1197,10 @@ export declare const EasySwapperV2Abi: readonly [{
|
|
|
1169
1197
|
readonly internalType: "uint256";
|
|
1170
1198
|
readonly name: "_expectedAmountReceived";
|
|
1171
1199
|
readonly type: "uint256";
|
|
1200
|
+
}, {
|
|
1201
|
+
readonly internalType: "bytes";
|
|
1202
|
+
readonly name: "_referralData";
|
|
1203
|
+
readonly type: "bytes";
|
|
1172
1204
|
}];
|
|
1173
1205
|
readonly name: "zapNativeDepositWithCustomCooldown";
|
|
1174
1206
|
readonly outputs: readonly [];
|
package/core-kit/abi/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export { erc20Abi } from '../abi/erc20';
|
|
2
2
|
export { AaveLendingPoolAbi } from '../abi/aave/aave-lending-pool';
|
|
3
3
|
export { AaveAssetGuardAbi } from '../abi/aave/aave-asset-guard';
|
|
4
|
-
export { PoolFactoryAbi } from '
|
|
4
|
+
export { PoolFactoryAbi } from '@shared/constants/abi';
|
|
5
5
|
export { PoolLogicAbi, ComplexWithdrawalAssetSrcDataAbiItem, ComplexWithdrawalDataAbiItem, } from '../abi/pool-logic';
|
|
6
6
|
export { PoolManagerLogicAbi } from '../abi/pool-manager-logic';
|
|
7
7
|
export { RewardDistributionAbi } from '../abi/reward-distribution';
|
|
@@ -11,11 +11,11 @@ export declare const EXTENDED_DEBOUNCE_TIME: number;
|
|
|
11
11
|
export declare const DEFAULT_LOCK_TIME: string;
|
|
12
12
|
export declare const EMPTY_POOL_CONFIG: PoolConfig;
|
|
13
13
|
export declare const DEFAULT_DEPOSIT_METHOD: DepositMethodName;
|
|
14
|
-
export declare const DEFAULT_WITHDRAW_SLIPPAGE =
|
|
14
|
+
export declare const DEFAULT_WITHDRAW_SLIPPAGE = 0.5;
|
|
15
15
|
export declare const DEFAULT_DEPOSIT_SLIPPAGE = 0;
|
|
16
16
|
export declare const DEFAULT_NO_SWAP_MIN_DEPOSIT_AMOUNT_GAP = 0.5;
|
|
17
17
|
export declare const DEFAULT_RECEIVED_VALUE_GAP = 0.02;
|
|
18
|
-
export declare const DEFAULT_SWAP_TRANSACTION_SLIPPAGE = 0.
|
|
18
|
+
export declare const DEFAULT_SWAP_TRANSACTION_SLIPPAGE = 0.5;
|
|
19
19
|
export declare const DEFAULT_DEPOSIT_SLIPPAGE_SCALE: number[];
|
|
20
20
|
export declare const DEFAULT_MULTI_ASSET_WITHDRAW_METHOD = "withdrawSafe";
|
|
21
21
|
export declare const EASY_SWAPPER_V2_INITIATE_WITHDRAW_METHOD = "initWithdrawal";
|
package/core-kit/const/gmx.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ export declare const GMX_MARKET_ASSETS_MAP: {
|
|
|
10
10
|
readonly CRV_ARBITRUM: "0x0e46941f9bff8d0784bffa3d0d7883cdb82d7ae7";
|
|
11
11
|
readonly HYPE_ARBITRUM: "0xbcb8fe13d02b023e8f94f6881cc0192fd918a5c0";
|
|
12
12
|
readonly BNB_ARBITRUM: "0x2d340912aa47e33c90efb078e69e70efe2b34b9b";
|
|
13
|
-
readonly BNB_WBTC_USDC_ARBITRUM: "
|
|
13
|
+
readonly BNB_WBTC_USDC_ARBITRUM: "0x065577d05c3d4c11505ed7bc97bbf85d462a6a6f";
|
|
14
14
|
readonly LINK_ARBITRUM: "0x7f1fa204bb700853d36994da19f830b6ad18455c";
|
|
15
15
|
readonly PUMP_ARBITRUM: "0x4c0bb704529fa49a26bd854802d70206982c6f1b";
|
|
16
16
|
readonly GOLD_ARBITRUM: "0xeb28ad1a2e497f4acc5d9b87e7b496623c93061e";
|
|
@@ -911,6 +911,7 @@ export declare const CHAIN_MAP: {
|
|
|
911
911
|
};
|
|
912
912
|
};
|
|
913
913
|
export declare const CHAIN_NATIVE_TOKENS: ChainNativeTokenMap;
|
|
914
|
+
export declare const DEFAULT_MAX_GAS_LIMIT = 29900000;
|
|
914
915
|
export declare const MAX_GAS_LIMIT_MAP: Record<ChainId, number>;
|
|
915
916
|
export declare const ALCHEMY_RPC_URL_MAP: Record<number, string>;
|
|
916
917
|
export { polygon, optimism, arbitrum, base, mainnet, hyperEvm };
|
|
@@ -731,6 +731,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
731
731
|
readonly internalType: "uint256";
|
|
732
732
|
readonly name: "_expectedAmountReceived";
|
|
733
733
|
readonly type: "uint256";
|
|
734
|
+
}, {
|
|
735
|
+
readonly internalType: "bytes";
|
|
736
|
+
readonly name: "_referralData";
|
|
737
|
+
readonly type: "bytes";
|
|
734
738
|
}];
|
|
735
739
|
readonly name: "deposit";
|
|
736
740
|
readonly outputs: readonly [];
|
|
@@ -775,6 +779,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
775
779
|
readonly internalType: "uint256";
|
|
776
780
|
readonly name: "_expectedAmountReceived";
|
|
777
781
|
readonly type: "uint256";
|
|
782
|
+
}, {
|
|
783
|
+
readonly internalType: "bytes";
|
|
784
|
+
readonly name: "_referralData";
|
|
785
|
+
readonly type: "bytes";
|
|
778
786
|
}];
|
|
779
787
|
readonly name: "depositWithCustomCooldown";
|
|
780
788
|
readonly outputs: readonly [];
|
|
@@ -991,6 +999,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
991
999
|
readonly internalType: "uint256";
|
|
992
1000
|
readonly name: "_expectedAmountReceived";
|
|
993
1001
|
readonly type: "uint256";
|
|
1002
|
+
}, {
|
|
1003
|
+
readonly internalType: "bytes";
|
|
1004
|
+
readonly name: "_referralData";
|
|
1005
|
+
readonly type: "bytes";
|
|
994
1006
|
}];
|
|
995
1007
|
readonly name: "nativeDeposit";
|
|
996
1008
|
readonly outputs: readonly [];
|
|
@@ -1005,6 +1017,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1005
1017
|
readonly internalType: "uint256";
|
|
1006
1018
|
readonly name: "_expectedAmountReceived";
|
|
1007
1019
|
readonly type: "uint256";
|
|
1020
|
+
}, {
|
|
1021
|
+
readonly internalType: "bytes";
|
|
1022
|
+
readonly name: "_referralData";
|
|
1023
|
+
readonly type: "bytes";
|
|
1008
1024
|
}];
|
|
1009
1025
|
readonly name: "nativeDepositWithCustomCooldown";
|
|
1010
1026
|
readonly outputs: readonly [];
|
|
@@ -1269,6 +1285,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1269
1285
|
readonly internalType: "uint256";
|
|
1270
1286
|
readonly name: "_expectedAmountReceived";
|
|
1271
1287
|
readonly type: "uint256";
|
|
1288
|
+
}, {
|
|
1289
|
+
readonly internalType: "bytes";
|
|
1290
|
+
readonly name: "_referralData";
|
|
1291
|
+
readonly type: "bytes";
|
|
1272
1292
|
}];
|
|
1273
1293
|
readonly name: "zapDeposit";
|
|
1274
1294
|
readonly outputs: readonly [];
|
|
@@ -1327,6 +1347,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1327
1347
|
readonly internalType: "uint256";
|
|
1328
1348
|
readonly name: "_expectedAmountReceived";
|
|
1329
1349
|
readonly type: "uint256";
|
|
1350
|
+
}, {
|
|
1351
|
+
readonly internalType: "bytes";
|
|
1352
|
+
readonly name: "_referralData";
|
|
1353
|
+
readonly type: "bytes";
|
|
1330
1354
|
}];
|
|
1331
1355
|
readonly name: "zapDepositWithCustomCooldown";
|
|
1332
1356
|
readonly outputs: readonly [];
|
|
@@ -1385,6 +1409,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1385
1409
|
readonly internalType: "uint256";
|
|
1386
1410
|
readonly name: "_expectedAmountReceived";
|
|
1387
1411
|
readonly type: "uint256";
|
|
1412
|
+
}, {
|
|
1413
|
+
readonly internalType: "bytes";
|
|
1414
|
+
readonly name: "_referralData";
|
|
1415
|
+
readonly type: "bytes";
|
|
1388
1416
|
}];
|
|
1389
1417
|
readonly name: "zapNativeDeposit";
|
|
1390
1418
|
readonly outputs: readonly [];
|
|
@@ -1443,6 +1471,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1443
1471
|
readonly internalType: "uint256";
|
|
1444
1472
|
readonly name: "_expectedAmountReceived";
|
|
1445
1473
|
readonly type: "uint256";
|
|
1474
|
+
}, {
|
|
1475
|
+
readonly internalType: "bytes";
|
|
1476
|
+
readonly name: "_referralData";
|
|
1477
|
+
readonly type: "bytes";
|
|
1446
1478
|
}];
|
|
1447
1479
|
readonly name: "zapNativeDepositWithCustomCooldown";
|
|
1448
1480
|
readonly outputs: readonly [];
|
|
@@ -1913,6 +1945,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1913
1945
|
readonly internalType: "uint256";
|
|
1914
1946
|
readonly name: "_expectedAmountReceived";
|
|
1915
1947
|
readonly type: "uint256";
|
|
1948
|
+
}, {
|
|
1949
|
+
readonly internalType: "bytes";
|
|
1950
|
+
readonly name: "_referralData";
|
|
1951
|
+
readonly type: "bytes";
|
|
1916
1952
|
}];
|
|
1917
1953
|
readonly name: "deposit";
|
|
1918
1954
|
readonly outputs: readonly [];
|
|
@@ -1957,6 +1993,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
1957
1993
|
readonly internalType: "uint256";
|
|
1958
1994
|
readonly name: "_expectedAmountReceived";
|
|
1959
1995
|
readonly type: "uint256";
|
|
1996
|
+
}, {
|
|
1997
|
+
readonly internalType: "bytes";
|
|
1998
|
+
readonly name: "_referralData";
|
|
1999
|
+
readonly type: "bytes";
|
|
1960
2000
|
}];
|
|
1961
2001
|
readonly name: "depositWithCustomCooldown";
|
|
1962
2002
|
readonly outputs: readonly [];
|
|
@@ -2173,6 +2213,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2173
2213
|
readonly internalType: "uint256";
|
|
2174
2214
|
readonly name: "_expectedAmountReceived";
|
|
2175
2215
|
readonly type: "uint256";
|
|
2216
|
+
}, {
|
|
2217
|
+
readonly internalType: "bytes";
|
|
2218
|
+
readonly name: "_referralData";
|
|
2219
|
+
readonly type: "bytes";
|
|
2176
2220
|
}];
|
|
2177
2221
|
readonly name: "nativeDeposit";
|
|
2178
2222
|
readonly outputs: readonly [];
|
|
@@ -2187,6 +2231,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2187
2231
|
readonly internalType: "uint256";
|
|
2188
2232
|
readonly name: "_expectedAmountReceived";
|
|
2189
2233
|
readonly type: "uint256";
|
|
2234
|
+
}, {
|
|
2235
|
+
readonly internalType: "bytes";
|
|
2236
|
+
readonly name: "_referralData";
|
|
2237
|
+
readonly type: "bytes";
|
|
2190
2238
|
}];
|
|
2191
2239
|
readonly name: "nativeDepositWithCustomCooldown";
|
|
2192
2240
|
readonly outputs: readonly [];
|
|
@@ -2451,6 +2499,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2451
2499
|
readonly internalType: "uint256";
|
|
2452
2500
|
readonly name: "_expectedAmountReceived";
|
|
2453
2501
|
readonly type: "uint256";
|
|
2502
|
+
}, {
|
|
2503
|
+
readonly internalType: "bytes";
|
|
2504
|
+
readonly name: "_referralData";
|
|
2505
|
+
readonly type: "bytes";
|
|
2454
2506
|
}];
|
|
2455
2507
|
readonly name: "zapDeposit";
|
|
2456
2508
|
readonly outputs: readonly [];
|
|
@@ -2509,6 +2561,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2509
2561
|
readonly internalType: "uint256";
|
|
2510
2562
|
readonly name: "_expectedAmountReceived";
|
|
2511
2563
|
readonly type: "uint256";
|
|
2564
|
+
}, {
|
|
2565
|
+
readonly internalType: "bytes";
|
|
2566
|
+
readonly name: "_referralData";
|
|
2567
|
+
readonly type: "bytes";
|
|
2512
2568
|
}];
|
|
2513
2569
|
readonly name: "zapDepositWithCustomCooldown";
|
|
2514
2570
|
readonly outputs: readonly [];
|
|
@@ -2567,6 +2623,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2567
2623
|
readonly internalType: "uint256";
|
|
2568
2624
|
readonly name: "_expectedAmountReceived";
|
|
2569
2625
|
readonly type: "uint256";
|
|
2626
|
+
}, {
|
|
2627
|
+
readonly internalType: "bytes";
|
|
2628
|
+
readonly name: "_referralData";
|
|
2629
|
+
readonly type: "bytes";
|
|
2570
2630
|
}];
|
|
2571
2631
|
readonly name: "zapNativeDeposit";
|
|
2572
2632
|
readonly outputs: readonly [];
|
|
@@ -2625,6 +2685,10 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2625
2685
|
readonly internalType: "uint256";
|
|
2626
2686
|
readonly name: "_expectedAmountReceived";
|
|
2627
2687
|
readonly type: "uint256";
|
|
2688
|
+
}, {
|
|
2689
|
+
readonly internalType: "bytes";
|
|
2690
|
+
readonly name: "_referralData";
|
|
2691
|
+
readonly type: "bytes";
|
|
2628
2692
|
}];
|
|
2629
2693
|
readonly name: "zapNativeDepositWithCustomCooldown";
|
|
2630
2694
|
readonly outputs: readonly [];
|
|
@@ -2693,6 +2757,16 @@ export declare const usePoolStatic: ({ address, chainId }: PoolContractCallParam
|
|
|
2693
2757
|
}];
|
|
2694
2758
|
readonly stateMutability: "view";
|
|
2695
2759
|
readonly type: "function";
|
|
2760
|
+
}, {
|
|
2761
|
+
readonly inputs: readonly [];
|
|
2762
|
+
readonly name: "referralManager";
|
|
2763
|
+
readonly outputs: readonly [{
|
|
2764
|
+
readonly internalType: "address";
|
|
2765
|
+
readonly name: "";
|
|
2766
|
+
readonly type: "address";
|
|
2767
|
+
}];
|
|
2768
|
+
readonly stateMutability: "view";
|
|
2769
|
+
readonly type: "function";
|
|
2696
2770
|
}];
|
|
2697
2771
|
readonly functionName: "getAssetGuard";
|
|
2698
2772
|
readonly args: readonly [`0x${string}`];
|
|
@@ -57,6 +57,16 @@ export declare const useHasSingleAssetWithdrawBlockers: ({ address, chainId, }:
|
|
|
57
57
|
}];
|
|
58
58
|
readonly stateMutability: "view";
|
|
59
59
|
readonly type: "function";
|
|
60
|
+
}, {
|
|
61
|
+
readonly inputs: readonly [];
|
|
62
|
+
readonly name: "referralManager";
|
|
63
|
+
readonly outputs: readonly [{
|
|
64
|
+
readonly internalType: "address";
|
|
65
|
+
readonly name: "";
|
|
66
|
+
readonly type: "address";
|
|
67
|
+
}];
|
|
68
|
+
readonly stateMutability: "view";
|
|
69
|
+
readonly type: "function";
|
|
60
70
|
}];
|
|
61
71
|
functionName: string;
|
|
62
72
|
chainId: number;
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { useLegacyReferralProgram } from '../../hooks/referral/use-legacy-referral-program';
|
|
2
|
+
export { useReferralAddress } from '../../hooks/referral/use-referral-address';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { ReferralData } from '../../types';
|
|
2
|
+
/**
|
|
3
|
+
* Returns ABI-encoded referral data for use in EasySwapperV2 deposit calls.
|
|
4
|
+
*
|
|
5
|
+
* Calls the async `getReferrerAddress(userAddress)` callback provided by the
|
|
6
|
+
* consuming app (e.g. to read URL query params or fetch from Firebase) when a
|
|
7
|
+
* wallet is connected.
|
|
8
|
+
*
|
|
9
|
+
* Returns `undefined` when no valid referrer is available or the referrer
|
|
10
|
+
* matches the connected account (self-referral prevention).
|
|
11
|
+
*
|
|
12
|
+
* The encoded bytes match the contract's `_decodeReferrer()` expectation:
|
|
13
|
+
* `abi.decode(_referralData, (address))`.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useReferralAddress: () => ReferralData;
|
|
@@ -11,7 +11,10 @@ export declare const useUpdateTradingSettings: () => (payload: Partial<{
|
|
|
11
11
|
isMaxSlippageLoading: boolean;
|
|
12
12
|
availableAggregators: string[];
|
|
13
13
|
selectedAggregators: string[];
|
|
14
|
+
aggregatorLimitPerChain?: Partial<Record<number, string[]>> | undefined;
|
|
14
15
|
isBatchTransactionsEnabled: boolean;
|
|
16
|
+
isForceSendEnabled?: boolean | undefined;
|
|
17
|
+
forceSendGas?: number | undefined;
|
|
15
18
|
}>) => void;
|
|
16
19
|
export declare const useSetTradingType: () => (payload: import("../../types").TradingPanelType) => void;
|
|
17
20
|
export declare const useUpdateTradingModal: () => (payload: Partial<import("../../types").TradingPanelStateModal>) => void;
|
|
@@ -37,3 +40,4 @@ export declare const useUpdatePoolConfig: () => (payload: Record<`0x${string}`,
|
|
|
37
40
|
export declare const useAddPoolConfig: () => (payload: import("../../types").PoolConfig) => void;
|
|
38
41
|
export declare const useUpdateCustomDepositTokensPerChain: () => (payload: Record<number, import("@shared/types").TradingToken[]>) => void;
|
|
39
42
|
export declare const useSetSwapQuoteRefreshTriggered: () => (payload: "deposit" | "withdraw" | null) => void;
|
|
43
|
+
export declare const useGetReferrerAddress: () => ((userAddress: `0x${string}`) => Promise<`0x${string}` | undefined>) | undefined;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Resolves effective available and selected aggregators for the current pool's chain.
|
|
3
|
+
*
|
|
4
|
+
* When `aggregatorLimitPerChain[chainId]` is set, both lists are filtered
|
|
5
|
+
* to include only the aggregators in that allow-list.
|
|
6
|
+
* Otherwise the global flat lists are returned unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export declare const useEffectiveAggregators: () => {
|
|
9
|
+
effectiveAvailableAggregators: string[];
|
|
10
|
+
effectiveSelectedAggregators: string[];
|
|
11
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
export { useSetTradingType, useUpdateTradingModal, useUpdateSendTokenInput, useSetPoolAddress, useUpdateReceiveTokenInput, useUpdateTradingSettings, useOnTransactionError, useOnTransactionSuccess, useOnTransactionEstimationError, useOnTokenSelector, useTradingPanelLogger, useOnSimulateTransaction, useUpdatePoolFallbackData, useOnTradingSettleError, useUpdatePoolConfig, useAddPoolConfig, useUpdateCustomDepositTokensPerChain, useGetSwapQuotes, useSetSwapQuoteRefreshTriggered, } from '../../hooks/state/action';
|
|
1
|
+
export { useSetTradingType, useUpdateTradingModal, useUpdateSendTokenInput, useSetPoolAddress, useUpdateReceiveTokenInput, useUpdateTradingSettings, useOnTransactionError, useOnTransactionSuccess, useOnTransactionEstimationError, useOnTokenSelector, useTradingPanelLogger, useOnSimulateTransaction, useUpdatePoolFallbackData, useOnTradingSettleError, useUpdatePoolConfig, useAddPoolConfig, useUpdateCustomDepositTokensPerChain, useGetSwapQuotes, useSetSwapQuoteRefreshTriggered, useGetReferrerAddress, } from '../../hooks/state/action';
|
|
2
2
|
export { useTradingPanelPoolAddress, useTradingPanelPoolConfig, useTradingPanelPoolConfigs, useTradingPanelPoolFallbackData, useIsPoolAddress, } from '../../hooks/state/pool';
|
|
3
3
|
export { useSendTokenInput, useReceiveTokenInput, } from '../../hooks/state/input';
|
|
4
4
|
export { useTradingPanelSettings, useCustomDepositTokensPerChain, } from '../../hooks/state/settings';
|
|
5
|
+
export { useEffectiveAggregators } from '../../hooks/state/aggregators';
|
|
5
6
|
export { useTradingPanelModal } from '../../hooks/state/modal';
|
|
6
7
|
export { useWithdrawAction } from '../../hooks/state/active-action';
|
|
7
8
|
export { useTradingPanelType, useIsDepositTradingPanelType, } from '../../hooks/state/type';
|
|
@@ -458,6 +458,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
458
458
|
readonly internalType: "uint256";
|
|
459
459
|
readonly name: "_expectedAmountReceived";
|
|
460
460
|
readonly type: "uint256";
|
|
461
|
+
}, {
|
|
462
|
+
readonly internalType: "bytes";
|
|
463
|
+
readonly name: "_referralData";
|
|
464
|
+
readonly type: "bytes";
|
|
461
465
|
}];
|
|
462
466
|
readonly name: "deposit";
|
|
463
467
|
readonly outputs: readonly [];
|
|
@@ -502,6 +506,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
502
506
|
readonly internalType: "uint256";
|
|
503
507
|
readonly name: "_expectedAmountReceived";
|
|
504
508
|
readonly type: "uint256";
|
|
509
|
+
}, {
|
|
510
|
+
readonly internalType: "bytes";
|
|
511
|
+
readonly name: "_referralData";
|
|
512
|
+
readonly type: "bytes";
|
|
505
513
|
}];
|
|
506
514
|
readonly name: "depositWithCustomCooldown";
|
|
507
515
|
readonly outputs: readonly [];
|
|
@@ -718,6 +726,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
718
726
|
readonly internalType: "uint256";
|
|
719
727
|
readonly name: "_expectedAmountReceived";
|
|
720
728
|
readonly type: "uint256";
|
|
729
|
+
}, {
|
|
730
|
+
readonly internalType: "bytes";
|
|
731
|
+
readonly name: "_referralData";
|
|
732
|
+
readonly type: "bytes";
|
|
721
733
|
}];
|
|
722
734
|
readonly name: "nativeDeposit";
|
|
723
735
|
readonly outputs: readonly [];
|
|
@@ -732,6 +744,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
732
744
|
readonly internalType: "uint256";
|
|
733
745
|
readonly name: "_expectedAmountReceived";
|
|
734
746
|
readonly type: "uint256";
|
|
747
|
+
}, {
|
|
748
|
+
readonly internalType: "bytes";
|
|
749
|
+
readonly name: "_referralData";
|
|
750
|
+
readonly type: "bytes";
|
|
735
751
|
}];
|
|
736
752
|
readonly name: "nativeDepositWithCustomCooldown";
|
|
737
753
|
readonly outputs: readonly [];
|
|
@@ -996,6 +1012,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
996
1012
|
readonly internalType: "uint256";
|
|
997
1013
|
readonly name: "_expectedAmountReceived";
|
|
998
1014
|
readonly type: "uint256";
|
|
1015
|
+
}, {
|
|
1016
|
+
readonly internalType: "bytes";
|
|
1017
|
+
readonly name: "_referralData";
|
|
1018
|
+
readonly type: "bytes";
|
|
999
1019
|
}];
|
|
1000
1020
|
readonly name: "zapDeposit";
|
|
1001
1021
|
readonly outputs: readonly [];
|
|
@@ -1054,6 +1074,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
1054
1074
|
readonly internalType: "uint256";
|
|
1055
1075
|
readonly name: "_expectedAmountReceived";
|
|
1056
1076
|
readonly type: "uint256";
|
|
1077
|
+
}, {
|
|
1078
|
+
readonly internalType: "bytes";
|
|
1079
|
+
readonly name: "_referralData";
|
|
1080
|
+
readonly type: "bytes";
|
|
1057
1081
|
}];
|
|
1058
1082
|
readonly name: "zapDepositWithCustomCooldown";
|
|
1059
1083
|
readonly outputs: readonly [];
|
|
@@ -1112,6 +1136,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
1112
1136
|
readonly internalType: "uint256";
|
|
1113
1137
|
readonly name: "_expectedAmountReceived";
|
|
1114
1138
|
readonly type: "uint256";
|
|
1139
|
+
}, {
|
|
1140
|
+
readonly internalType: "bytes";
|
|
1141
|
+
readonly name: "_referralData";
|
|
1142
|
+
readonly type: "bytes";
|
|
1115
1143
|
}];
|
|
1116
1144
|
readonly name: "zapNativeDeposit";
|
|
1117
1145
|
readonly outputs: readonly [];
|
|
@@ -1170,6 +1198,10 @@ export declare const useDepositQuoteContractRead: ({ address, chainId, }: Pick<P
|
|
|
1170
1198
|
readonly internalType: "uint256";
|
|
1171
1199
|
readonly name: "_expectedAmountReceived";
|
|
1172
1200
|
readonly type: "uint256";
|
|
1201
|
+
}, {
|
|
1202
|
+
readonly internalType: "bytes";
|
|
1203
|
+
readonly name: "_referralData";
|
|
1204
|
+
readonly type: "bytes";
|
|
1173
1205
|
}];
|
|
1174
1206
|
readonly name: "zapNativeDepositWithCustomCooldown";
|
|
1175
1207
|
readonly outputs: readonly [];
|
|
@@ -458,6 +458,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
458
458
|
readonly internalType: "uint256";
|
|
459
459
|
readonly name: "_expectedAmountReceived";
|
|
460
460
|
readonly type: "uint256";
|
|
461
|
+
}, {
|
|
462
|
+
readonly internalType: "bytes";
|
|
463
|
+
readonly name: "_referralData";
|
|
464
|
+
readonly type: "bytes";
|
|
461
465
|
}];
|
|
462
466
|
readonly name: "deposit";
|
|
463
467
|
readonly outputs: readonly [];
|
|
@@ -502,6 +506,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
502
506
|
readonly internalType: "uint256";
|
|
503
507
|
readonly name: "_expectedAmountReceived";
|
|
504
508
|
readonly type: "uint256";
|
|
509
|
+
}, {
|
|
510
|
+
readonly internalType: "bytes";
|
|
511
|
+
readonly name: "_referralData";
|
|
512
|
+
readonly type: "bytes";
|
|
505
513
|
}];
|
|
506
514
|
readonly name: "depositWithCustomCooldown";
|
|
507
515
|
readonly outputs: readonly [];
|
|
@@ -718,6 +726,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
718
726
|
readonly internalType: "uint256";
|
|
719
727
|
readonly name: "_expectedAmountReceived";
|
|
720
728
|
readonly type: "uint256";
|
|
729
|
+
}, {
|
|
730
|
+
readonly internalType: "bytes";
|
|
731
|
+
readonly name: "_referralData";
|
|
732
|
+
readonly type: "bytes";
|
|
721
733
|
}];
|
|
722
734
|
readonly name: "nativeDeposit";
|
|
723
735
|
readonly outputs: readonly [];
|
|
@@ -732,6 +744,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
732
744
|
readonly internalType: "uint256";
|
|
733
745
|
readonly name: "_expectedAmountReceived";
|
|
734
746
|
readonly type: "uint256";
|
|
747
|
+
}, {
|
|
748
|
+
readonly internalType: "bytes";
|
|
749
|
+
readonly name: "_referralData";
|
|
750
|
+
readonly type: "bytes";
|
|
735
751
|
}];
|
|
736
752
|
readonly name: "nativeDepositWithCustomCooldown";
|
|
737
753
|
readonly outputs: readonly [];
|
|
@@ -996,6 +1012,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
996
1012
|
readonly internalType: "uint256";
|
|
997
1013
|
readonly name: "_expectedAmountReceived";
|
|
998
1014
|
readonly type: "uint256";
|
|
1015
|
+
}, {
|
|
1016
|
+
readonly internalType: "bytes";
|
|
1017
|
+
readonly name: "_referralData";
|
|
1018
|
+
readonly type: "bytes";
|
|
999
1019
|
}];
|
|
1000
1020
|
readonly name: "zapDeposit";
|
|
1001
1021
|
readonly outputs: readonly [];
|
|
@@ -1054,6 +1074,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
1054
1074
|
readonly internalType: "uint256";
|
|
1055
1075
|
readonly name: "_expectedAmountReceived";
|
|
1056
1076
|
readonly type: "uint256";
|
|
1077
|
+
}, {
|
|
1078
|
+
readonly internalType: "bytes";
|
|
1079
|
+
readonly name: "_referralData";
|
|
1080
|
+
readonly type: "bytes";
|
|
1057
1081
|
}];
|
|
1058
1082
|
readonly name: "zapDepositWithCustomCooldown";
|
|
1059
1083
|
readonly outputs: readonly [];
|
|
@@ -1112,6 +1136,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
1112
1136
|
readonly internalType: "uint256";
|
|
1113
1137
|
readonly name: "_expectedAmountReceived";
|
|
1114
1138
|
readonly type: "uint256";
|
|
1139
|
+
}, {
|
|
1140
|
+
readonly internalType: "bytes";
|
|
1141
|
+
readonly name: "_referralData";
|
|
1142
|
+
readonly type: "bytes";
|
|
1115
1143
|
}];
|
|
1116
1144
|
readonly name: "zapNativeDeposit";
|
|
1117
1145
|
readonly outputs: readonly [];
|
|
@@ -1170,6 +1198,10 @@ export declare const useEasySwapperTrackedAssets: ({ account, chainId, }: Omit<P
|
|
|
1170
1198
|
readonly internalType: "uint256";
|
|
1171
1199
|
readonly name: "_expectedAmountReceived";
|
|
1172
1200
|
readonly type: "uint256";
|
|
1201
|
+
}, {
|
|
1202
|
+
readonly internalType: "bytes";
|
|
1203
|
+
readonly name: "_referralData";
|
|
1204
|
+
readonly type: "bytes";
|
|
1173
1205
|
}];
|
|
1174
1206
|
readonly name: "zapNativeDepositWithCustomCooldown";
|
|
1175
1207
|
readonly outputs: readonly [];
|
package/core-kit/hooks/trading/withdraw-v2/complete-step/use-complete-withdraw-tracked-assets.d.ts
CHANGED
|
@@ -196,6 +196,16 @@ export declare const useCompleteWithdrawTrackedAssets: () => import("wagmi").Use
|
|
|
196
196
|
}];
|
|
197
197
|
readonly stateMutability: "view";
|
|
198
198
|
readonly type: "function";
|
|
199
|
+
}, {
|
|
200
|
+
readonly inputs: readonly [];
|
|
201
|
+
readonly name: "referralManager";
|
|
202
|
+
readonly outputs: readonly [{
|
|
203
|
+
readonly internalType: "address";
|
|
204
|
+
readonly name: "";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}];
|
|
207
|
+
readonly stateMutability: "view";
|
|
208
|
+
readonly type: "function";
|
|
199
209
|
}];
|
|
200
210
|
functionName: string;
|
|
201
211
|
chainId: number;
|
package/core-kit/hooks/trading/withdraw-v2/init-step/use-init-withdraw-estimated-receive-assets.d.ts
CHANGED
|
@@ -196,6 +196,16 @@ export declare const useInitWithdrawEstimatedReceiveAssets: () => import("wagmi"
|
|
|
196
196
|
}];
|
|
197
197
|
readonly stateMutability: "view";
|
|
198
198
|
readonly type: "function";
|
|
199
|
+
}, {
|
|
200
|
+
readonly inputs: readonly [];
|
|
201
|
+
readonly name: "referralManager";
|
|
202
|
+
readonly outputs: readonly [{
|
|
203
|
+
readonly internalType: "address";
|
|
204
|
+
readonly name: "";
|
|
205
|
+
readonly type: "address";
|
|
206
|
+
}];
|
|
207
|
+
readonly stateMutability: "view";
|
|
208
|
+
readonly type: "function";
|
|
199
209
|
}];
|
|
200
210
|
functionName: string;
|
|
201
211
|
chainId: number;
|
|
@@ -204,6 +204,16 @@ export declare const useWithdrawAssetsInfo: ({ assets, chainId, }: UseWithdrawAs
|
|
|
204
204
|
}];
|
|
205
205
|
readonly stateMutability: "view";
|
|
206
206
|
readonly type: "function";
|
|
207
|
+
}, {
|
|
208
|
+
readonly inputs: readonly [];
|
|
209
|
+
readonly name: "referralManager";
|
|
210
|
+
readonly outputs: readonly [{
|
|
211
|
+
readonly internalType: "address";
|
|
212
|
+
readonly name: "";
|
|
213
|
+
readonly type: "address";
|
|
214
|
+
}];
|
|
215
|
+
readonly stateMutability: "view";
|
|
216
|
+
readonly type: "function";
|
|
207
217
|
}];
|
|
208
218
|
functionName: string;
|
|
209
219
|
chainId: number;
|