@paraswap/dex-lib 4.8.14 → 4.8.15
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/build/abi/{apex-defi/ApexDefiRouter.abi.json → BProtocol.json} +573 -538
- package/build/abi/Jarvis.json +1172 -0
- package/build/abi/{apex-defi/ApexDefiFactory.abi.json → MStableAsset.json} +781 -985
- package/build/abi/{apex-defi/ApexDefiWrapperFactory.abi.json → OneInchLp.json} +766 -569
- package/build/abi/Onebit.json +736 -0
- package/build/abi/Shell.json +1294 -0
- package/build/abi/TraderJoeV2Router.json +50 -0
- package/build/abi/wUSDM.json +757 -0
- package/build/abi/zrx.v2.json +1967 -0
- package/build/abi/zrx.v3.json +3454 -0
- package/build/abi/zrx.v4.json +2193 -0
- package/build/dex/OneInchLp.d.ts +24 -0
- package/build/dex/OneInchLp.js +43 -0
- package/build/dex/OneInchLp.js.map +1 -0
- package/build/dex/algebra/algebra.d.ts +4 -0
- package/build/dex/algebra/algebra.js +39 -14
- package/build/dex/algebra/algebra.js.map +1 -1
- package/build/dex/bProtocol/bProtocol.d.ts +15 -0
- package/build/dex/bProtocol/bProtocol.js +56 -0
- package/build/dex/bProtocol/bProtocol.js.map +1 -0
- package/build/dex/bProtocol/types.d.ts +11 -0
- package/build/dex/bProtocol/types.js +8 -0
- package/build/dex/bProtocol/types.js.map +1 -0
- package/build/dex/infusion/infusion-stable-pool.d.ts +1 -1
- package/build/dex/infusion/infusion-stable-pool.js +1 -1
- package/build/dex/infusion/infusion-stable-pool.js.map +1 -1
- package/build/dex/infusion/infusion.d.ts +3 -3
- package/build/dex/infusion/infusion.js +104 -65
- package/build/dex/infusion/infusion.js.map +1 -1
- package/build/dex/jarvis.d.ts +56 -0
- package/build/dex/jarvis.js +163 -0
- package/build/dex/jarvis.js.map +1 -0
- package/build/dex/mStable.d.ts +44 -0
- package/build/dex/mStable.js +75 -0
- package/build/dex/mStable.js.map +1 -0
- package/build/dex/onebit/onebit.d.ts +16 -0
- package/build/dex/onebit/onebit.js +61 -0
- package/build/dex/onebit/onebit.js.map +1 -0
- package/build/dex/onebit/types.d.ts +14 -0
- package/build/dex/onebit/types.js +8 -0
- package/build/dex/onebit/types.js.map +1 -0
- package/build/dex/pancakeswap-v3/pancakeswap-v3.d.ts +4 -0
- package/build/dex/pancakeswap-v3/pancakeswap-v3.js +40 -17
- package/build/dex/pancakeswap-v3/pancakeswap-v3.js.map +1 -1
- package/build/dex/{yo → se-vlr}/config.d.ts +1 -1
- package/build/dex/se-vlr/config.js +24 -0
- package/build/dex/se-vlr/config.js.map +1 -0
- package/build/dex/{stabull/stabull-pool.d.ts → se-vlr/se-vlr-pool.d.ts} +6 -13
- package/build/dex/se-vlr/se-vlr-pool.js +70 -0
- package/build/dex/se-vlr/se-vlr-pool.js.map +1 -0
- package/build/dex/se-vlr/se-vlr.d.ts +35 -0
- package/build/dex/se-vlr/se-vlr.js +131 -0
- package/build/dex/se-vlr/se-vlr.js.map +1 -0
- package/build/dex/se-vlr/types.d.ts +6 -0
- package/build/dex/{yo → se-vlr}/types.js.map +1 -1
- package/build/dex/shell.d.ts +25 -0
- package/build/dex/shell.js +41 -0
- package/build/dex/shell.js.map +1 -0
- package/build/dex/solidly/forks-override/aerodrome.d.ts +1 -1
- package/build/dex/solidly/forks-override/aerodrome.js +14 -18
- package/build/dex/solidly/forks-override/aerodrome.js.map +1 -1
- package/build/dex/trader-joe-v2.d.ts +40 -0
- package/build/dex/trader-joe-v2.js +74 -0
- package/build/dex/trader-joe-v2.js.map +1 -0
- package/build/dex/uniswap-v2/uniswap-v2.js +1 -4
- package/build/dex/uniswap-v2/uniswap-v2.js.map +1 -1
- package/build/dex/uniswap-v3/uniswap-v3-new.d.ts +94 -0
- package/build/dex/uniswap-v3/uniswap-v3-new.js +923 -0
- package/build/dex/uniswap-v3/uniswap-v3-new.js.map +1 -0
- package/build/dex/uniswap-v4/contract-math/Position.d.ts +0 -6
- package/build/dex/uniswap-v4/contract-math/Position.js +0 -29
- package/build/dex/uniswap-v4/contract-math/Position.js.map +1 -1
- package/build/dex/{stabull → usual-bond}/config.d.ts +1 -1
- package/build/dex/usual-bond/config.js +13 -0
- package/build/dex/usual-bond/config.js.map +1 -0
- package/build/dex/usual-bond/types.d.ts +7 -0
- package/build/dex/{stabull → usual-bond}/types.js.map +1 -1
- package/build/dex/{aave-pt-to-underlying/aave-pt-to-underlying.d.ts → usual-bond/usual-bond.d.ts} +18 -23
- package/build/dex/usual-bond/usual-bond.js +176 -0
- package/build/dex/usual-bond/usual-bond.js.map +1 -0
- package/build/dex/wusdm/config.d.ts +3 -0
- package/build/dex/wusdm/config.js +43 -0
- package/build/dex/wusdm/config.js.map +1 -0
- package/build/dex/wusdm/constants.d.ts +2 -0
- package/build/dex/wusdm/constants.js +6 -0
- package/build/dex/wusdm/constants.js.map +1 -0
- package/build/dex/wusdm/types.d.ts +18 -0
- package/build/dex/wusdm/types.js +11 -0
- package/build/dex/wusdm/types.js.map +1 -0
- package/build/dex/wusdm/wusdm-pool.d.ts +21 -0
- package/build/dex/wusdm/wusdm-pool.js +74 -0
- package/build/dex/wusdm/wusdm-pool.js.map +1 -0
- package/build/dex/wusdm/wusdm.d.ts +46 -0
- package/build/dex/wusdm/wusdm.js +243 -0
- package/build/dex/wusdm/wusdm.js.map +1 -0
- package/build/dex/zerox/config.d.ts +2 -0
- package/build/dex/zerox/config.js +33 -0
- package/build/dex/zerox/config.js.map +1 -0
- package/build/dex/zerox/index.d.ts +22 -0
- package/build/dex/zerox/index.js +225 -0
- package/build/dex/zerox/index.js.map +1 -0
- package/build/dex/zerox/order.d.ts +88 -0
- package/build/dex/zerox/order.js +53 -0
- package/build/dex/zerox/order.js.map +1 -0
- package/build/dex/zerox/types.d.ts +73 -0
- package/build/dex/zerox/types.js +21 -0
- package/build/dex/zerox/types.js.map +1 -0
- package/package.json +1 -1
- package/build/abi/PendleRouterStatic.json +0 -19
- package/build/abi/apex-defi/ApexDefiToken.abi.json +0 -229
- package/build/abi/apex-defi/ApexDefiWrapper.abi.json +0 -92
- package/build/abi/clear/ClearFactory.json +0 -71
- package/build/abi/clear/ClearSwap.json +0 -334
- package/build/abi/clear/ClearVault.json +0 -20
- package/build/abi/ekubo-v3/boosted-fees-data-fetcher.json +0 -108
- package/build/abi/ekubo-v3/boosted-fees.json +0 -538
- package/build/abi/pangolin-v3/PangolinV3StateMulticall.abi.json +0 -796
- package/build/abi/pendle/pendle-deployer.abi.json +0 -520
- package/build/abi/pendle/pendle-oracle.abi.json +0 -413
- package/build/abi/ring-v2/few-wrapped-token.json +0 -587
- package/build/abi/ring-v2/ring-v2-factory.json +0 -125
- package/build/abi/ring-v2/ring-v2-pool.json +0 -461
- package/build/abi/ring-v2/ring-v2-router.json +0 -332
- package/build/abi/stabull/stabull-curve.json +0 -738
- package/build/abi/stabull/stabull-router.json +0 -76
- package/build/abi/uniswap-v4/hooks/SpotDynamicFeeManager.json +0 -26
- package/build/abi/uniswap-v4/hooks/SpotHook.json +0 -54
- package/build/abi/uniswap-v4/hooks/SpotPolicyManager.json +0 -45
- package/build/abi/uniswap-v4/hooks/cabalcoin-hook.abi.json +0 -682
- package/build/abi/uniswap-v4/hooks/fee-hook.abi.json +0 -1335
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.d.ts +0 -29
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js +0 -153
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying-factory.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js +0 -323
- package/build/dex/aave-pt-to-underlying/aave-pt-to-underlying.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/config.d.ts +0 -3
- package/build/dex/aave-pt-to-underlying/config.js +0 -24
- package/build/dex/aave-pt-to-underlying/config.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/constants.d.ts +0 -2
- package/build/dex/aave-pt-to-underlying/constants.js +0 -6
- package/build/dex/aave-pt-to-underlying/constants.js.map +0 -1
- package/build/dex/aave-pt-to-underlying/types.d.ts +0 -24
- package/build/dex/aave-pt-to-underlying/types.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.d.ts +0 -39
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js +0 -244
- package/build/dex/aave-pt-to-usdc/aave-pt-to-usdc.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/config.d.ts +0 -3
- package/build/dex/aave-pt-to-usdc/config.js +0 -47
- package/build/dex/aave-pt-to-usdc/config.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/constants.d.ts +0 -2
- package/build/dex/aave-pt-to-usdc/constants.js +0 -6
- package/build/dex/aave-pt-to-usdc/constants.js.map +0 -1
- package/build/dex/aave-pt-to-usdc/types.d.ts +0 -22
- package/build/dex/aave-pt-to-usdc/types.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-factory.d.ts +0 -26
- package/build/dex/apex-defi/apex-defi-factory.js +0 -53
- package/build/dex/apex-defi/apex-defi-factory.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-pool.d.ts +0 -55
- package/build/dex/apex-defi/apex-defi-pool.js +0 -247
- package/build/dex/apex-defi/apex-defi-pool.js.map +0 -1
- package/build/dex/apex-defi/apex-defi-wrapper-factory.d.ts +0 -57
- package/build/dex/apex-defi/apex-defi-wrapper-factory.js +0 -250
- package/build/dex/apex-defi/apex-defi-wrapper-factory.js.map +0 -1
- package/build/dex/apex-defi/apex-defi.d.ts +0 -97
- package/build/dex/apex-defi/apex-defi.js +0 -1021
- package/build/dex/apex-defi/apex-defi.js.map +0 -1
- package/build/dex/apex-defi/config.d.ts +0 -4
- package/build/dex/apex-defi/config.js +0 -138
- package/build/dex/apex-defi/config.js.map +0 -1
- package/build/dex/apex-defi/types.d.ts +0 -32
- package/build/dex/apex-defi/types.js +0 -3
- package/build/dex/apex-defi/types.js.map +0 -1
- package/build/dex/apex-defi/utils.d.ts +0 -46
- package/build/dex/apex-defi/utils.js +0 -133
- package/build/dex/apex-defi/utils.js.map +0 -1
- package/build/dex/clear/clear-factory.d.ts +0 -33
- package/build/dex/clear/clear-factory.js +0 -123
- package/build/dex/clear/clear-factory.js.map +0 -1
- package/build/dex/clear/clear.d.ts +0 -53
- package/build/dex/clear/clear.js +0 -311
- package/build/dex/clear/clear.js.map +0 -1
- package/build/dex/clear/config.d.ts +0 -3
- package/build/dex/clear/config.js +0 -14
- package/build/dex/clear/config.js.map +0 -1
- package/build/dex/clear/types.d.ts +0 -18
- package/build/dex/clear/types.js +0 -3
- package/build/dex/clear/types.js.map +0 -1
- package/build/dex/ekubo-v3/extension-type.d.ts +0 -9
- package/build/dex/ekubo-v3/extension-type.js +0 -36
- package/build/dex/ekubo-v3/extension-type.js.map +0 -1
- package/build/dex/ekubo-v3/pools/boosted-fees.d.ts +0 -39
- package/build/dex/ekubo-v3/pools/boosted-fees.js +0 -189
- package/build/dex/ekubo-v3/pools/boosted-fees.js.map +0 -1
- package/build/dex/ekubo-v3/pools/concentrated.d.ts +0 -47
- package/build/dex/ekubo-v3/pools/concentrated.js +0 -324
- package/build/dex/ekubo-v3/pools/concentrated.js.map +0 -1
- package/build/dex/ekubo-v3/pools/timed.d.ts +0 -25
- package/build/dex/ekubo-v3/pools/timed.js +0 -91
- package/build/dex/ekubo-v3/pools/timed.js.map +0 -1
- package/build/dex/maker-psm/maker-psm-event-pool.d.ts +0 -43
- package/build/dex/maker-psm/maker-psm-event-pool.js +0 -132
- package/build/dex/maker-psm/maker-psm-event-pool.js.map +0 -1
- package/build/dex/miro-migrator/miro-migrator-state.d.ts +0 -27
- package/build/dex/miro-migrator/miro-migrator-state.js +0 -89
- package/build/dex/miro-migrator/miro-migrator-state.js.map +0 -1
- package/build/dex/stabull/config.js +0 -177
- package/build/dex/stabull/config.js.map +0 -1
- package/build/dex/stabull/stabull-pool.js +0 -113
- package/build/dex/stabull/stabull-pool.js.map +0 -1
- package/build/dex/stabull/stabull.d.ts +0 -55
- package/build/dex/stabull/stabull.js +0 -286
- package/build/dex/stabull/stabull.js.map +0 -1
- package/build/dex/stabull/types.d.ts +0 -21
- package/build/dex/stabull/types.js +0 -3
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.d.ts +0 -4
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js +0 -56
- package/build/dex/uniswap-v3/forks/pangolin-v3/utils.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/arena.d.ts +0 -6
- package/build/dex/uniswap-v4/hooks/arena.js +0 -10
- package/build/dex/uniswap-v4/hooks/arena.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.js +0 -2
- package/build/dex/uniswap-v4/hooks/base-fee/base-fee-hook.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.d.ts +0 -7
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js +0 -28
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/cabalcoin-hook-pool.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js +0 -2
- package/build/dex/uniswap-v4/hooks/cabalcoin-hook/types.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.d.ts +0 -7
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js +0 -28
- package/build/dex/uniswap-v4/hooks/fee-hook/fee-hook-pool.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/fee-hook/types.d.ts +0 -0
- package/build/dex/uniswap-v4/hooks/fee-hook/types.js +0 -2
- package/build/dex/uniswap-v4/hooks/fee-hook/types.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/index.d.ts +0 -1
- package/build/dex/uniswap-v4/hooks/index.js +0 -18
- package/build/dex/uniswap-v4/hooks/index.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/spot.d.ts +0 -15
- package/build/dex/uniswap-v4/hooks/spot.js +0 -109
- package/build/dex/uniswap-v4/hooks/spot.js.map +0 -1
- package/build/dex/uniswap-v4/hooks/template.d.ts +0 -150
- package/build/dex/uniswap-v4/hooks/template.js +0 -104
- package/build/dex/uniswap-v4/hooks/template.js.map +0 -1
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.d.ts +0 -26
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.js +0 -75
- package/build/dex/usdc-transmuter/usdc-transmuter-pool.js.map +0 -1
- package/build/dex/usual/usual-usdc-usdc.d.ts +0 -17
- package/build/dex/usual/usual-usdc-usdc.js +0 -59
- package/build/dex/usual/usual-usdc-usdc.js.map +0 -1
- package/build/dex/yo/config.js +0 -21
- package/build/dex/yo/config.js.map +0 -1
- package/build/dex/yo/types.d.ts +0 -13
- package/build/dex/yo/types.js +0 -3
- package/build/dex/yo/yo-pool.d.ts +0 -13
- package/build/dex/yo/yo-pool.js +0 -26
- package/build/dex/yo/yo-pool.js.map +0 -1
- package/build/dex/yo/yo.d.ts +0 -39
- package/build/dex/yo/yo.js +0 -248
- package/build/dex/yo/yo.js.map +0 -1
- package/build/implementations/api-paraswap-sdk.d.ts +0 -25
- package/build/implementations/api-paraswap-sdk.js +0 -102
- package/build/implementations/api-paraswap-sdk.js.map +0 -1
- /package/build/dex/{aave-pt-to-underlying → se-vlr}/types.js +0 -0
- /package/build/dex/{aave-pt-to-usdc → usual-bond}/types.js +0 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { ZeroXSignedOrder, ZeroXSignedOrderV2, ZeroXSignedOrderV4 } from './types';
|
|
2
|
+
export declare class ZeroXOrder {
|
|
3
|
+
static formatOrderV4(order: ZeroXSignedOrderV4, version: number): {
|
|
4
|
+
makerToken: string;
|
|
5
|
+
takerToken: string;
|
|
6
|
+
makerAmount: string | number;
|
|
7
|
+
takerAmount: string | number;
|
|
8
|
+
maker: string;
|
|
9
|
+
taker: string;
|
|
10
|
+
txOrigin: string;
|
|
11
|
+
pool: string;
|
|
12
|
+
expiry: string | number;
|
|
13
|
+
salt: string | number;
|
|
14
|
+
};
|
|
15
|
+
static formatOrderV23(order: ZeroXSignedOrderV2, version: number): {
|
|
16
|
+
makerFeeAssetData: string;
|
|
17
|
+
takerFeeAssetData: string;
|
|
18
|
+
makerAddress: string;
|
|
19
|
+
takerAddress: string;
|
|
20
|
+
feeRecipientAddress: string;
|
|
21
|
+
senderAddress: string;
|
|
22
|
+
makerAssetAmount: string | number;
|
|
23
|
+
takerAssetAmount: string | number;
|
|
24
|
+
makerFee: string | number;
|
|
25
|
+
takerFee: string | number;
|
|
26
|
+
expirationTimeSeconds: string | number;
|
|
27
|
+
salt: string | number;
|
|
28
|
+
makerAssetData: string;
|
|
29
|
+
takerAssetData: string;
|
|
30
|
+
} | {
|
|
31
|
+
makerFeeAssetData?: undefined;
|
|
32
|
+
takerFeeAssetData?: undefined;
|
|
33
|
+
makerAddress: string;
|
|
34
|
+
takerAddress: string;
|
|
35
|
+
feeRecipientAddress: string;
|
|
36
|
+
senderAddress: string;
|
|
37
|
+
makerAssetAmount: string | number;
|
|
38
|
+
takerAssetAmount: string | number;
|
|
39
|
+
makerFee: string | number;
|
|
40
|
+
takerFee: string | number;
|
|
41
|
+
expirationTimeSeconds: string | number;
|
|
42
|
+
salt: string | number;
|
|
43
|
+
makerAssetData: string;
|
|
44
|
+
takerAssetData: string;
|
|
45
|
+
};
|
|
46
|
+
static formatOrders(order: ZeroXSignedOrder, version?: number): {
|
|
47
|
+
makerToken: string;
|
|
48
|
+
takerToken: string;
|
|
49
|
+
makerAmount: string | number;
|
|
50
|
+
takerAmount: string | number;
|
|
51
|
+
maker: string;
|
|
52
|
+
taker: string;
|
|
53
|
+
txOrigin: string;
|
|
54
|
+
pool: string;
|
|
55
|
+
expiry: string | number;
|
|
56
|
+
salt: string | number;
|
|
57
|
+
} | {
|
|
58
|
+
makerFeeAssetData: string;
|
|
59
|
+
takerFeeAssetData: string;
|
|
60
|
+
makerAddress: string;
|
|
61
|
+
takerAddress: string;
|
|
62
|
+
feeRecipientAddress: string;
|
|
63
|
+
senderAddress: string;
|
|
64
|
+
makerAssetAmount: string | number;
|
|
65
|
+
takerAssetAmount: string | number;
|
|
66
|
+
makerFee: string | number;
|
|
67
|
+
takerFee: string | number;
|
|
68
|
+
expirationTimeSeconds: string | number;
|
|
69
|
+
salt: string | number;
|
|
70
|
+
makerAssetData: string;
|
|
71
|
+
takerAssetData: string;
|
|
72
|
+
} | {
|
|
73
|
+
makerFeeAssetData?: undefined;
|
|
74
|
+
takerFeeAssetData?: undefined;
|
|
75
|
+
makerAddress: string;
|
|
76
|
+
takerAddress: string;
|
|
77
|
+
feeRecipientAddress: string;
|
|
78
|
+
senderAddress: string;
|
|
79
|
+
makerAssetAmount: string | number;
|
|
80
|
+
takerAssetAmount: string | number;
|
|
81
|
+
makerFee: string | number;
|
|
82
|
+
takerFee: string | number;
|
|
83
|
+
expirationTimeSeconds: string | number;
|
|
84
|
+
salt: string | number;
|
|
85
|
+
makerAssetData: string;
|
|
86
|
+
takerAssetData: string;
|
|
87
|
+
};
|
|
88
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZeroXOrder = void 0;
|
|
4
|
+
class ZeroXOrder {
|
|
5
|
+
static formatOrderV4(order, version) {
|
|
6
|
+
return {
|
|
7
|
+
makerToken: order.makerToken,
|
|
8
|
+
takerToken: order.takerToken,
|
|
9
|
+
makerAmount: order.makerAmount,
|
|
10
|
+
takerAmount: order.takerAmount,
|
|
11
|
+
maker: order.maker,
|
|
12
|
+
taker: order.taker,
|
|
13
|
+
txOrigin: order.txOrigin,
|
|
14
|
+
pool: order.pool,
|
|
15
|
+
expiry: order.expiry,
|
|
16
|
+
salt: order.salt,
|
|
17
|
+
};
|
|
18
|
+
}
|
|
19
|
+
static formatOrderV23(order, version) {
|
|
20
|
+
const feeAssetData = version === 3
|
|
21
|
+
? {
|
|
22
|
+
makerFeeAssetData: order.makerFeeAssetData,
|
|
23
|
+
takerFeeAssetData: order.takerFeeAssetData,
|
|
24
|
+
}
|
|
25
|
+
: {};
|
|
26
|
+
return {
|
|
27
|
+
makerAddress: order.makerAddress,
|
|
28
|
+
takerAddress: order.takerAddress,
|
|
29
|
+
feeRecipientAddress: order.feeRecipientAddress,
|
|
30
|
+
senderAddress: order.senderAddress,
|
|
31
|
+
makerAssetAmount: order.makerAssetAmount,
|
|
32
|
+
takerAssetAmount: order.takerAssetAmount,
|
|
33
|
+
makerFee: order.makerFee,
|
|
34
|
+
takerFee: order.takerFee,
|
|
35
|
+
expirationTimeSeconds: order.expirationTimeSeconds,
|
|
36
|
+
salt: order.salt,
|
|
37
|
+
makerAssetData: order.makerAssetData,
|
|
38
|
+
takerAssetData: order.takerAssetData,
|
|
39
|
+
...feeAssetData,
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
static formatOrders(order, version = 2) {
|
|
43
|
+
if (isV4Order(order, version)) {
|
|
44
|
+
return ZeroXOrder.formatOrderV4(order, version);
|
|
45
|
+
}
|
|
46
|
+
return ZeroXOrder.formatOrderV23(order, version);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
exports.ZeroXOrder = ZeroXOrder;
|
|
50
|
+
function isV4Order(order, version = 2) {
|
|
51
|
+
return version === 4;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=order.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"order.js","sourceRoot":"","sources":["../../../src/dex/zerox/order.ts"],"names":[],"mappings":";;;AAMA,MAAa,UAAU;IACrB,MAAM,CAAC,aAAa,CAAC,KAAyB,EAAE,OAAe;QAC7D,OAAO;YACL,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,WAAW,EAAE,KAAK,CAAC,WAAW;YAC9B,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,MAAM,EAAE,KAAK,CAAC,MAAM;YACpB,IAAI,EAAE,KAAK,CAAC,IAAI;SACjB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,cAAc,CAAC,KAAyB,EAAE,OAAe;QAC9D,MAAM,YAAY,GAChB,OAAO,KAAK,CAAC;YACX,CAAC,CAAC;gBACE,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;gBAC1C,iBAAiB,EAAE,KAAK,CAAC,iBAAiB;aAC3C;YACH,CAAC,CAAC,EAAE,CAAC;QAET,OAAO;YACL,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,YAAY,EAAE,KAAK,CAAC,YAAY;YAChC,mBAAmB,EAAE,KAAK,CAAC,mBAAmB;YAC9C,aAAa,EAAE,KAAK,CAAC,aAAa;YAClC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;YACxC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,qBAAqB,EAAE,KAAK,CAAC,qBAAqB;YAClD,IAAI,EAAE,KAAK,CAAC,IAAI;YAChB,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,GAAG,YAAY;SAChB,CAAC;IACJ,CAAC;IAED,MAAM,CAAC,YAAY,CAAC,KAAuB,EAAE,UAAkB,CAAC;QAC9D,IAAI,SAAS,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE;YAC7B,OAAO,UAAU,CAAC,aAAa,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;SACjD;QACD,OAAO,UAAU,CAAC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IACnD,CAAC;CACF;AAhDD,gCAgDC;AAED,SAAS,SAAS,CAChB,KAAuB,EACvB,UAAkB,CAAC;IAEnB,OAAO,OAAO,KAAK,CAAC,CAAC;AACvB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { Address } from '@paraswap/sdk';
|
|
2
|
+
import { NumberAsString } from '../../types';
|
|
3
|
+
export declare enum OrderStatus {
|
|
4
|
+
INVALID = 0,
|
|
5
|
+
INVALID_MAKER_ASSET_AMOUNT = 1,
|
|
6
|
+
INVALID_TAKER_ASSET_AMOUNT = 2,
|
|
7
|
+
FILLABLE = 3,
|
|
8
|
+
EXPIRED = 4,
|
|
9
|
+
FULLY_FILLED = 5,
|
|
10
|
+
CANCELLED = 6
|
|
11
|
+
}
|
|
12
|
+
declare type Value = NumberAsString | number;
|
|
13
|
+
export interface ZeroXSignedOrderV2 {
|
|
14
|
+
senderAddress: string;
|
|
15
|
+
makerAddress: string;
|
|
16
|
+
takerAddress: string;
|
|
17
|
+
makerFee: Value;
|
|
18
|
+
takerFee: Value;
|
|
19
|
+
makerAssetAmount: Value;
|
|
20
|
+
takerAssetAmount: Value;
|
|
21
|
+
makerAssetData: string;
|
|
22
|
+
takerAssetData: string;
|
|
23
|
+
salt: Value;
|
|
24
|
+
exchangeAddress: string;
|
|
25
|
+
feeRecipientAddress: string;
|
|
26
|
+
expirationTimeSeconds: Value;
|
|
27
|
+
makerFeeAssetData: string;
|
|
28
|
+
takerFeeAssetData: string;
|
|
29
|
+
signature: string;
|
|
30
|
+
}
|
|
31
|
+
export interface ZeroXSignedOrderV4 {
|
|
32
|
+
makerToken: string;
|
|
33
|
+
takerToken: string;
|
|
34
|
+
makerAmount: Value;
|
|
35
|
+
takerAmount: Value;
|
|
36
|
+
maker: string;
|
|
37
|
+
taker: string;
|
|
38
|
+
txOrigin: string;
|
|
39
|
+
pool: string;
|
|
40
|
+
expiry: Value;
|
|
41
|
+
salt: Value;
|
|
42
|
+
signature: any;
|
|
43
|
+
}
|
|
44
|
+
export declare type ZeroXSignedOrder = ZeroXSignedOrderV2 | ZeroXSignedOrderV4;
|
|
45
|
+
export declare enum ZeroXFunctions {
|
|
46
|
+
swapOnZeroXv2 = "swapOnZeroXv2",
|
|
47
|
+
swapOnZeroXv4 = "swapOnZeroXv4",
|
|
48
|
+
swapOnZeroXv2WithPermit = "swapOnZeroXv2WithPermit",
|
|
49
|
+
swapOnZeroXv4WithPermit = "swapOnZeroXv4WithPermit"
|
|
50
|
+
}
|
|
51
|
+
export declare type ZeroXData = {
|
|
52
|
+
version: number;
|
|
53
|
+
order: ZeroXSignedOrder;
|
|
54
|
+
};
|
|
55
|
+
export declare type SwapOnZeroXParam = [
|
|
56
|
+
srcToken: Address,
|
|
57
|
+
destToken: Address,
|
|
58
|
+
srcAmount: NumberAsString,
|
|
59
|
+
destAmount: NumberAsString,
|
|
60
|
+
exchange: Address,
|
|
61
|
+
payload: string
|
|
62
|
+
];
|
|
63
|
+
export declare type SwapOnZeroXWithPermitParam = [
|
|
64
|
+
srcToken: Address,
|
|
65
|
+
destToken: Address,
|
|
66
|
+
srcAmount: NumberAsString,
|
|
67
|
+
destAmount: NumberAsString,
|
|
68
|
+
exchange: Address,
|
|
69
|
+
payload: string,
|
|
70
|
+
permit: string
|
|
71
|
+
];
|
|
72
|
+
export declare type ZeroXParam = SwapOnZeroXParam | SwapOnZeroXWithPermitParam;
|
|
73
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ZeroXFunctions = exports.OrderStatus = void 0;
|
|
4
|
+
var OrderStatus;
|
|
5
|
+
(function (OrderStatus) {
|
|
6
|
+
OrderStatus[OrderStatus["INVALID"] = 0] = "INVALID";
|
|
7
|
+
OrderStatus[OrderStatus["INVALID_MAKER_ASSET_AMOUNT"] = 1] = "INVALID_MAKER_ASSET_AMOUNT";
|
|
8
|
+
OrderStatus[OrderStatus["INVALID_TAKER_ASSET_AMOUNT"] = 2] = "INVALID_TAKER_ASSET_AMOUNT";
|
|
9
|
+
OrderStatus[OrderStatus["FILLABLE"] = 3] = "FILLABLE";
|
|
10
|
+
OrderStatus[OrderStatus["EXPIRED"] = 4] = "EXPIRED";
|
|
11
|
+
OrderStatus[OrderStatus["FULLY_FILLED"] = 5] = "FULLY_FILLED";
|
|
12
|
+
OrderStatus[OrderStatus["CANCELLED"] = 6] = "CANCELLED";
|
|
13
|
+
})(OrderStatus = exports.OrderStatus || (exports.OrderStatus = {}));
|
|
14
|
+
var ZeroXFunctions;
|
|
15
|
+
(function (ZeroXFunctions) {
|
|
16
|
+
ZeroXFunctions["swapOnZeroXv2"] = "swapOnZeroXv2";
|
|
17
|
+
ZeroXFunctions["swapOnZeroXv4"] = "swapOnZeroXv4";
|
|
18
|
+
ZeroXFunctions["swapOnZeroXv2WithPermit"] = "swapOnZeroXv2WithPermit";
|
|
19
|
+
ZeroXFunctions["swapOnZeroXv4WithPermit"] = "swapOnZeroXv4WithPermit";
|
|
20
|
+
})(ZeroXFunctions = exports.ZeroXFunctions || (exports.ZeroXFunctions = {}));
|
|
21
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/dex/zerox/types.ts"],"names":[],"mappings":";;;AAGA,IAAY,WAQX;AARD,WAAY,WAAW;IACrB,mDAAO,CAAA;IACP,yFAA0B,CAAA;IAC1B,yFAA0B,CAAA;IAC1B,qDAAQ,CAAA;IACR,mDAAO,CAAA;IACP,6DAAY,CAAA;IACZ,uDAAS,CAAA;AACX,CAAC,EARW,WAAW,GAAX,mBAAW,KAAX,mBAAW,QAQtB;AAuCD,IAAY,cAKX;AALD,WAAY,cAAc;IACxB,iDAA+B,CAAA;IAC/B,iDAA+B,CAAA;IAC/B,qEAAmD,CAAA;IACnD,qEAAmD,CAAA;AACrD,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB"}
|
package/package.json
CHANGED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [
|
|
4
|
-
{ "internalType": "address", "name": "market", "type": "address" },
|
|
5
|
-
{ "internalType": "uint256", "name": "exactPtIn", "type": "uint256" },
|
|
6
|
-
{ "internalType": "address", "name": "tokenOut", "type": "address" }
|
|
7
|
-
],
|
|
8
|
-
"name": "swapExactPtForTokenStatic",
|
|
9
|
-
"outputs": [
|
|
10
|
-
{ "internalType": "uint256", "name": "netTokenOut", "type": "uint256" },
|
|
11
|
-
{ "internalType": "uint256", "name": "netSyToRedeem", "type": "uint256" },
|
|
12
|
-
{ "internalType": "uint256", "name": "netSyFee", "type": "uint256" },
|
|
13
|
-
{ "internalType": "uint256", "name": "priceImpact", "type": "uint256" },
|
|
14
|
-
{ "internalType": "uint256", "name": "exchangeRateAfter", "type": "uint256" }
|
|
15
|
-
],
|
|
16
|
-
"stateMutability": "view",
|
|
17
|
-
"type": "function"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
@@ -1,229 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [],
|
|
4
|
-
"name": "tradingFeeRate",
|
|
5
|
-
"outputs": [
|
|
6
|
-
{
|
|
7
|
-
"internalType": "uint256",
|
|
8
|
-
"name": "",
|
|
9
|
-
"type": "uint256"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"stateMutability": "view",
|
|
13
|
-
"type": "function"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"anonymous": false,
|
|
17
|
-
"inputs": [
|
|
18
|
-
{
|
|
19
|
-
"indexed": true,
|
|
20
|
-
"internalType": "address",
|
|
21
|
-
"name": "sender",
|
|
22
|
-
"type": "address"
|
|
23
|
-
},
|
|
24
|
-
{
|
|
25
|
-
"indexed": false,
|
|
26
|
-
"internalType": "uint256",
|
|
27
|
-
"name": "amountTokenIn",
|
|
28
|
-
"type": "uint256"
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
"indexed": false,
|
|
32
|
-
"internalType": "uint256",
|
|
33
|
-
"name": "amountNativeIn",
|
|
34
|
-
"type": "uint256"
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
"indexed": false,
|
|
38
|
-
"internalType": "uint256",
|
|
39
|
-
"name": "amountTokenOut",
|
|
40
|
-
"type": "uint256"
|
|
41
|
-
},
|
|
42
|
-
{
|
|
43
|
-
"indexed": false,
|
|
44
|
-
"internalType": "uint256",
|
|
45
|
-
"name": "amountNativeOut",
|
|
46
|
-
"type": "uint256"
|
|
47
|
-
},
|
|
48
|
-
{
|
|
49
|
-
"indexed": false,
|
|
50
|
-
"internalType": "bool",
|
|
51
|
-
"name": "flashSwap",
|
|
52
|
-
"type": "bool"
|
|
53
|
-
}
|
|
54
|
-
],
|
|
55
|
-
"name": "Swap",
|
|
56
|
-
"type": "event"
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
"anonymous": false,
|
|
60
|
-
"inputs": [
|
|
61
|
-
{
|
|
62
|
-
"indexed": true,
|
|
63
|
-
"internalType": "address",
|
|
64
|
-
"name": "provider",
|
|
65
|
-
"type": "address"
|
|
66
|
-
},
|
|
67
|
-
{
|
|
68
|
-
"indexed": true,
|
|
69
|
-
"internalType": "address",
|
|
70
|
-
"name": "toAddress",
|
|
71
|
-
"type": "address"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"indexed": false,
|
|
75
|
-
"internalType": "uint256",
|
|
76
|
-
"name": "liquidityMinted",
|
|
77
|
-
"type": "uint256"
|
|
78
|
-
},
|
|
79
|
-
{
|
|
80
|
-
"indexed": false,
|
|
81
|
-
"internalType": "uint256",
|
|
82
|
-
"name": "nativeAmount",
|
|
83
|
-
"type": "uint256"
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
"indexed": false,
|
|
87
|
-
"internalType": "uint256",
|
|
88
|
-
"name": "tokenAmount",
|
|
89
|
-
"type": "uint256"
|
|
90
|
-
}
|
|
91
|
-
],
|
|
92
|
-
"name": "AddLiquidity",
|
|
93
|
-
"type": "event"
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
"anonymous": false,
|
|
97
|
-
"inputs": [
|
|
98
|
-
{
|
|
99
|
-
"indexed": true,
|
|
100
|
-
"internalType": "address",
|
|
101
|
-
"name": "provider",
|
|
102
|
-
"type": "address"
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
"indexed": true,
|
|
106
|
-
"internalType": "address",
|
|
107
|
-
"name": "toAddress",
|
|
108
|
-
"type": "address"
|
|
109
|
-
},
|
|
110
|
-
{
|
|
111
|
-
"indexed": false,
|
|
112
|
-
"internalType": "uint256",
|
|
113
|
-
"name": "liquidityBurned",
|
|
114
|
-
"type": "uint256"
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
"indexed": false,
|
|
118
|
-
"internalType": "uint256",
|
|
119
|
-
"name": "nativeAmount",
|
|
120
|
-
"type": "uint256"
|
|
121
|
-
},
|
|
122
|
-
{
|
|
123
|
-
"indexed": false,
|
|
124
|
-
"internalType": "uint256",
|
|
125
|
-
"name": "tokenAmount",
|
|
126
|
-
"type": "uint256"
|
|
127
|
-
}
|
|
128
|
-
],
|
|
129
|
-
"name": "RemoveLiquidity",
|
|
130
|
-
"type": "event"
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
"inputs": [],
|
|
134
|
-
"name": "getReserves",
|
|
135
|
-
"outputs": [
|
|
136
|
-
{
|
|
137
|
-
"internalType": "uint256",
|
|
138
|
-
"name": "amountNative",
|
|
139
|
-
"type": "uint256"
|
|
140
|
-
},
|
|
141
|
-
{
|
|
142
|
-
"internalType": "uint256",
|
|
143
|
-
"name": "amountToken",
|
|
144
|
-
"type": "uint256"
|
|
145
|
-
}
|
|
146
|
-
],
|
|
147
|
-
"stateMutability": "view",
|
|
148
|
-
"type": "function"
|
|
149
|
-
},
|
|
150
|
-
{
|
|
151
|
-
"inputs": [],
|
|
152
|
-
"name": "factory",
|
|
153
|
-
"outputs": [
|
|
154
|
-
{
|
|
155
|
-
"internalType": "address",
|
|
156
|
-
"name": "",
|
|
157
|
-
"type": "address"
|
|
158
|
-
}
|
|
159
|
-
],
|
|
160
|
-
"stateMutability": "view",
|
|
161
|
-
"type": "function"
|
|
162
|
-
},
|
|
163
|
-
{
|
|
164
|
-
"inputs": [
|
|
165
|
-
{
|
|
166
|
-
"internalType": "uint256",
|
|
167
|
-
"name": "minimumTokensOut",
|
|
168
|
-
"type": "uint256"
|
|
169
|
-
},
|
|
170
|
-
{
|
|
171
|
-
"internalType": "uint256",
|
|
172
|
-
"name": "deadline",
|
|
173
|
-
"type": "uint256"
|
|
174
|
-
}
|
|
175
|
-
],
|
|
176
|
-
"name": "swapNativeToToken",
|
|
177
|
-
"outputs": [
|
|
178
|
-
{
|
|
179
|
-
"internalType": "uint256[]",
|
|
180
|
-
"name": "amounts",
|
|
181
|
-
"type": "uint256[]"
|
|
182
|
-
}
|
|
183
|
-
],
|
|
184
|
-
"stateMutability": "payable",
|
|
185
|
-
"type": "function"
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"inputs": [
|
|
189
|
-
{
|
|
190
|
-
"internalType": "uint256",
|
|
191
|
-
"name": "tokensSold",
|
|
192
|
-
"type": "uint256"
|
|
193
|
-
},
|
|
194
|
-
{
|
|
195
|
-
"internalType": "uint256",
|
|
196
|
-
"name": "minimumNativeOut",
|
|
197
|
-
"type": "uint256"
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"internalType": "uint256",
|
|
201
|
-
"name": "deadline",
|
|
202
|
-
"type": "uint256"
|
|
203
|
-
}
|
|
204
|
-
],
|
|
205
|
-
"name": "swapTokenToNative",
|
|
206
|
-
"outputs": [
|
|
207
|
-
{
|
|
208
|
-
"internalType": "uint256[]",
|
|
209
|
-
"name": "amounts",
|
|
210
|
-
"type": "uint256[]"
|
|
211
|
-
}
|
|
212
|
-
],
|
|
213
|
-
"stateMutability": "nonpayable",
|
|
214
|
-
"type": "function"
|
|
215
|
-
},
|
|
216
|
-
{
|
|
217
|
-
"inputs": [],
|
|
218
|
-
"name": "tradingEnabled",
|
|
219
|
-
"outputs": [
|
|
220
|
-
{
|
|
221
|
-
"internalType": "bool",
|
|
222
|
-
"name": "",
|
|
223
|
-
"type": "bool"
|
|
224
|
-
}
|
|
225
|
-
],
|
|
226
|
-
"stateMutability": "view",
|
|
227
|
-
"type": "function"
|
|
228
|
-
}
|
|
229
|
-
]
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [],
|
|
4
|
-
"name": "originalTokenDecimals",
|
|
5
|
-
"outputs": [
|
|
6
|
-
{
|
|
7
|
-
"internalType": "uint8",
|
|
8
|
-
"name": "",
|
|
9
|
-
"type": "uint8"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"stateMutability": "view",
|
|
13
|
-
"type": "function"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"inputs": [],
|
|
17
|
-
"name": "wrappedTokenDecimals",
|
|
18
|
-
"outputs": [
|
|
19
|
-
{
|
|
20
|
-
"internalType": "uint8",
|
|
21
|
-
"name": "",
|
|
22
|
-
"type": "uint8"
|
|
23
|
-
}
|
|
24
|
-
],
|
|
25
|
-
"stateMutability": "view",
|
|
26
|
-
"type": "function"
|
|
27
|
-
},
|
|
28
|
-
{
|
|
29
|
-
"inputs": [],
|
|
30
|
-
"name": "originalToken",
|
|
31
|
-
"outputs": [
|
|
32
|
-
{
|
|
33
|
-
"internalType": "contract IERC20",
|
|
34
|
-
"name": "",
|
|
35
|
-
"type": "address"
|
|
36
|
-
}
|
|
37
|
-
],
|
|
38
|
-
"stateMutability": "view",
|
|
39
|
-
"type": "function"
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
"inputs": [],
|
|
43
|
-
"name": "wrappedToken",
|
|
44
|
-
"outputs": [
|
|
45
|
-
{
|
|
46
|
-
"internalType": "contract IERC20",
|
|
47
|
-
"name": "",
|
|
48
|
-
"type": "address"
|
|
49
|
-
}
|
|
50
|
-
],
|
|
51
|
-
"stateMutability": "view",
|
|
52
|
-
"type": "function"
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
"inputs": [
|
|
56
|
-
{
|
|
57
|
-
"internalType": "uint256",
|
|
58
|
-
"name": "amount",
|
|
59
|
-
"type": "uint256"
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
"name": "wrap",
|
|
63
|
-
"outputs": [
|
|
64
|
-
{
|
|
65
|
-
"internalType": "uint256",
|
|
66
|
-
"name": "wrappedAmount",
|
|
67
|
-
"type": "uint256"
|
|
68
|
-
}
|
|
69
|
-
],
|
|
70
|
-
"stateMutability": "nonpayable",
|
|
71
|
-
"type": "function"
|
|
72
|
-
},
|
|
73
|
-
{
|
|
74
|
-
"inputs": [
|
|
75
|
-
{
|
|
76
|
-
"internalType": "uint256",
|
|
77
|
-
"name": "amount",
|
|
78
|
-
"type": "uint256"
|
|
79
|
-
}
|
|
80
|
-
],
|
|
81
|
-
"name": "unwrap",
|
|
82
|
-
"outputs": [
|
|
83
|
-
{
|
|
84
|
-
"internalType": "uint256",
|
|
85
|
-
"name": "unwrappedAmount",
|
|
86
|
-
"type": "uint256"
|
|
87
|
-
}
|
|
88
|
-
],
|
|
89
|
-
"stateMutability": "nonpayable",
|
|
90
|
-
"type": "function"
|
|
91
|
-
}
|
|
92
|
-
]
|
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
[
|
|
2
|
-
{
|
|
3
|
-
"inputs": [],
|
|
4
|
-
"name": "vaultsLength",
|
|
5
|
-
"outputs": [
|
|
6
|
-
{
|
|
7
|
-
"internalType": "uint256",
|
|
8
|
-
"name": "",
|
|
9
|
-
"type": "uint256"
|
|
10
|
-
}
|
|
11
|
-
],
|
|
12
|
-
"stateMutability": "view",
|
|
13
|
-
"type": "function"
|
|
14
|
-
},
|
|
15
|
-
{
|
|
16
|
-
"inputs": [
|
|
17
|
-
{
|
|
18
|
-
"internalType": "uint256[]",
|
|
19
|
-
"name": "_indexes",
|
|
20
|
-
"type": "uint256[]"
|
|
21
|
-
}
|
|
22
|
-
],
|
|
23
|
-
"name": "getBatchVaultAddresses",
|
|
24
|
-
"outputs": [
|
|
25
|
-
{
|
|
26
|
-
"internalType": "address[]",
|
|
27
|
-
"name": "",
|
|
28
|
-
"type": "address[]"
|
|
29
|
-
}
|
|
30
|
-
],
|
|
31
|
-
"stateMutability": "view",
|
|
32
|
-
"type": "function"
|
|
33
|
-
},
|
|
34
|
-
{
|
|
35
|
-
"anonymous": false,
|
|
36
|
-
"inputs": [
|
|
37
|
-
{
|
|
38
|
-
"indexed": true,
|
|
39
|
-
"internalType": "uint256",
|
|
40
|
-
"name": "index",
|
|
41
|
-
"type": "uint256"
|
|
42
|
-
},
|
|
43
|
-
{
|
|
44
|
-
"indexed": true,
|
|
45
|
-
"internalType": "address",
|
|
46
|
-
"name": "implementation",
|
|
47
|
-
"type": "address"
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
"indexed": false,
|
|
51
|
-
"internalType": "address",
|
|
52
|
-
"name": "vault",
|
|
53
|
-
"type": "address"
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
"indexed": false,
|
|
57
|
-
"internalType": "string",
|
|
58
|
-
"name": "name",
|
|
59
|
-
"type": "string"
|
|
60
|
-
},
|
|
61
|
-
{
|
|
62
|
-
"indexed": false,
|
|
63
|
-
"internalType": "string",
|
|
64
|
-
"name": "symbol",
|
|
65
|
-
"type": "string"
|
|
66
|
-
}
|
|
67
|
-
],
|
|
68
|
-
"name": "NewClearVault",
|
|
69
|
-
"type": "event"
|
|
70
|
-
}
|
|
71
|
-
]
|