@gearbox-protocol/sdk 1.3.3 → 1.5.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/lib/apy/index.d.ts +1 -0
- package/lib/core/adapter.d.ts +34 -0
- package/lib/core/adapter.js +76 -0
- package/lib/core/assets.d.ts +34 -0
- package/lib/core/assets.js +98 -0
- package/lib/core/constants.d.ts +1 -0
- package/lib/core/constants.js +3 -1
- package/lib/core/creditAccount.d.ts +14 -5
- package/lib/core/creditAccount.js +35 -3
- package/lib/core/creditManager.d.ts +12 -3
- package/lib/core/creditManager.js +34 -36
- package/lib/core/strategy.d.ts +15 -5
- package/lib/core/strategy.js +42 -7
- package/lib/core/trade.d.ts +49 -0
- package/lib/core/trade.js +70 -0
- package/lib/core/wcOperation.d.ts +54 -0
- package/lib/core/wcOperation.js +76 -0
- package/lib/index.d.ts +6 -0
- package/lib/index.js +6 -0
- package/lib/parsers/abstractParser.d.ts +18 -0
- package/lib/parsers/abstractParser.js +32 -0
- package/lib/parsers/convexBaseRewardPoolAdapterParser.d.ts +9 -0
- package/lib/parsers/convexBaseRewardPoolAdapterParser.js +60 -0
- package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.d.ts +1 -0
- package/lib/parsers/convexBaseRewardPoolAdapterParser.spec.js +24 -0
- package/lib/parsers/convexBoosterAdapterParser.d.ts +10 -0
- package/lib/parsers/convexBoosterAdapterParser.js +62 -0
- package/lib/parsers/convexBoosterAdapterParser.spec.d.ts +1 -0
- package/lib/parsers/convexBoosterAdapterParser.spec.js +20 -0
- package/lib/parsers/creditFacadeParser.d.ts +9 -0
- package/lib/parsers/creditFacadeParser.js +66 -0
- package/lib/parsers/creditFacadeParser.spec.d.ts +1 -0
- package/lib/parsers/creditFacadeParser.spec.js +27 -0
- package/lib/parsers/curveAdapterParser.d.ts +12 -0
- package/lib/parsers/curveAdapterParser.js +106 -0
- package/lib/parsers/curveAdapterParser.spec.d.ts +1 -0
- package/lib/parsers/curveAdapterParser.spec.js +49 -0
- package/lib/parsers/iParser.d.ts +3 -0
- package/lib/{types/contracts/test/suites/mainnet/IPriceFeedsRegistry.js → parsers/iParser.js} +0 -0
- package/lib/parsers/lidoAdapterParser.d.ts +7 -0
- package/lib/parsers/lidoAdapterParser.js +46 -0
- package/lib/parsers/lidoAdapterParser.spec.d.ts +1 -0
- package/lib/parsers/lidoAdapterParser.spec.js +17 -0
- package/lib/parsers/txParser.d.ts +18 -0
- package/lib/parsers/txParser.js +122 -0
- package/lib/parsers/uniV2AdapterParser.d.ts +8 -0
- package/lib/parsers/uniV2AdapterParser.js +73 -0
- package/lib/parsers/uniV2AdapterParser.spec.d.ts +1 -0
- package/lib/parsers/uniV2AdapterParser.spec.js +48 -0
- package/lib/parsers/uniV3AdapterParser.d.ts +9 -0
- package/lib/parsers/uniV3AdapterParser.js +99 -0
- package/lib/parsers/uniV3AdapterParser.spec.d.ts +1 -0
- package/lib/parsers/uniV3AdapterParser.spec.js +82 -0
- package/lib/parsers/yearnAdapterParser.spec.d.ts +1 -0
- package/lib/parsers/yearnAdapterParser.spec.js +36 -0
- package/lib/parsers/yearnV2AdapterParser.d.ts +7 -0
- package/lib/parsers/yearnV2AdapterParser.js +54 -0
- package/lib/tokens/convex.d.ts +4 -2
- package/lib/tokens/convex.js +10 -1
- package/lib/tokens/decimals.d.ts +2 -0
- package/lib/tokens/decimals.js +62 -0
- package/lib/tokens/tokenType.d.ts +10 -9
- package/lib/tokens/tokenType.js +10 -9
- package/lib/types/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +66 -2
- package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter.d.ts +620 -0
- package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter.js +2 -0
- package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter.d.ts +622 -0
- package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter.js +2 -0
- package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter.d.ts +648 -0
- package/lib/types/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter.js +2 -0
- package/lib/types/contracts/interfaces/adapters/curve/index.d.ts +3 -0
- package/lib/types/contracts/interfaces/adapters/index.d.ts +2 -0
- package/lib/types/contracts/interfaces/adapters/yearn/IYearnV2Adapter.d.ts +330 -0
- package/lib/types/contracts/interfaces/adapters/yearn/IYearnV2Adapter.js +2 -0
- package/lib/types/contracts/interfaces/adapters/yearn/index.d.ts +1 -0
- package/lib/types/contracts/interfaces/adapters/yearn/index.js +2 -0
- package/lib/types/contracts/pathfinder/interfaces/IClosePathResolver.d.ts +28 -7
- package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor.d.ts +30 -9
- package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.d.ts +31 -10
- package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.d.ts +28 -7
- package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.d.ts +28 -7
- package/lib/types/contracts/pathfinder/interfaces/IPathFinder.d.ts +24 -0
- package/lib/types/contracts/pathfinder/interfaces/IPathFinderComponent.d.ts +50 -0
- package/lib/types/contracts/pathfinder/interfaces/IPathFinderComponent.js +2 -0
- package/lib/types/contracts/pathfinder/interfaces/IPathResolver.d.ts +29 -8
- package/lib/types/contracts/pathfinder/interfaces/ISwapAggregator.d.ts +99 -15
- package/lib/types/contracts/pathfinder/interfaces/ISwapper.d.ts +17 -1
- package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.d.ts +53 -9
- package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.d.ts +53 -9
- package/lib/types/contracts/pathfinder/interfaces/index.d.ts +1 -0
- package/lib/types/contracts/test/suites/mainnet/ITokenTestSuite.d.ts +110 -18
- package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts.d.ts +50 -0
- package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts.js +2 -0
- package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/index.d.ts +1 -0
- package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/index.js +2 -0
- package/lib/types/contracts/test/suites/mainnet/Tokens.sol/IToken.d.ts +60 -0
- package/lib/types/contracts/test/suites/mainnet/Tokens.sol/IToken.js +2 -0
- package/lib/types/contracts/test/suites/mainnet/Tokens.sol/index.d.ts +1 -0
- package/lib/types/contracts/test/suites/mainnet/Tokens.sol/index.js +2 -0
- package/lib/types/contracts/test/suites/mainnet/index.d.ts +4 -1
- package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js +62 -0
- package/lib/types/factories/contracts/{test/suites/mainnet/IPriceFeedsRegistry__factory.d.ts → interfaces/adapters/curve/ICurveV1_2AssetsAdapter__factory.d.ts} +4 -4
- package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter__factory.js +1066 -0
- package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter__factory.d.ts +32 -0
- package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_3AssetsAdapter__factory.js +1066 -0
- package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter__factory.d.ts +32 -0
- package/lib/types/factories/contracts/interfaces/adapters/curve/ICurveV1_4AssetsAdapter__factory.js +1066 -0
- package/lib/types/factories/contracts/interfaces/adapters/curve/index.d.ts +3 -0
- package/lib/types/factories/contracts/interfaces/adapters/curve/index.js +7 -1
- package/lib/types/factories/contracts/interfaces/adapters/index.d.ts +1 -0
- package/lib/types/factories/contracts/interfaces/adapters/index.js +2 -1
- package/lib/types/factories/contracts/interfaces/adapters/yearn/IYearnV2Adapter__factory.d.ts +46 -0
- package/lib/types/factories/contracts/interfaces/adapters/yearn/IYearnV2Adapter__factory.js +487 -0
- package/lib/types/factories/contracts/interfaces/adapters/yearn/index.d.ts +1 -0
- package/lib/types/factories/contracts/interfaces/adapters/yearn/index.js +8 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.d.ts +12 -2
- package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.js +54 -8
- package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.js +138 -32
- package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.js +110 -24
- package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.js +54 -8
- package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.js +54 -8
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinderComponent__factory.d.ts +18 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinderComponent__factory.js +48 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinder__factory.js +32 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.d.ts +12 -2
- package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.js +82 -16
- package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.js +877 -56
- package/lib/types/factories/contracts/pathfinder/interfaces/ISwapper__factory.d.ts +12 -2
- package/lib/types/factories/contracts/pathfinder/interfaces/ISwapper__factory.js +26 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.js +365 -24
- package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.js +355 -24
- package/lib/types/factories/contracts/pathfinder/interfaces/index.d.ts +1 -0
- package/lib/types/factories/contracts/pathfinder/interfaces/index.js +3 -1
- package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.d.ts +1 -1
- package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.js +1 -1
- package/lib/types/factories/contracts/test/suites/mainnet/ITokenTestSuite__factory.d.ts +2 -12
- package/lib/types/factories/contracts/test/suites/mainnet/ITokenTestSuite__factory.js +140 -12
- package/lib/types/factories/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts__factory.d.ts +22 -0
- package/lib/types/factories/contracts/test/suites/mainnet/{IPriceFeedsRegistry__factory.js → SupportedContracts.sol/ISupportedContracts__factory.js} +25 -17
- package/lib/types/factories/contracts/test/suites/mainnet/SupportedContracts.sol/index.d.ts +1 -0
- package/lib/types/factories/contracts/test/suites/mainnet/SupportedContracts.sol/index.js +8 -0
- package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/IToken__factory.d.ts +22 -0
- package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/IToken__factory.js +79 -0
- package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/index.d.ts +1 -0
- package/lib/types/factories/contracts/test/suites/mainnet/Tokens.sol/index.js +8 -0
- package/lib/types/factories/contracts/test/suites/mainnet/index.d.ts +2 -1
- package/lib/types/factories/contracts/test/suites/mainnet/index.js +26 -3
- package/lib/types/index.d.ts +14 -2
- package/lib/types/index.js +17 -5
- package/lib/utils/math.d.ts +1 -0
- package/lib/utils/math.js +5 -1
- package/package.json +6 -2
- package/lib/types/contracts/test/suites/mainnet/IPriceFeedsRegistry.d.ts +0 -42
|
@@ -1,20 +1,38 @@
|
|
|
1
|
-
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
2
|
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
3
|
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
4
|
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../common";
|
|
5
5
|
export interface ITokenTestSuiteInterface extends utils.Interface {
|
|
6
6
|
functions: {
|
|
7
7
|
"addressOf(uint8)": FunctionFragment;
|
|
8
|
-
"
|
|
9
|
-
"
|
|
8
|
+
"approve(uint8,address,address,uint256)": FunctionFragment;
|
|
9
|
+
"approve(uint8,address,address)": FunctionFragment;
|
|
10
|
+
"approve(address,address,address)": FunctionFragment;
|
|
11
|
+
"approveMany(uint8[],address,uint8)": FunctionFragment;
|
|
12
|
+
"balanceOf(uint8,address)": FunctionFragment;
|
|
13
|
+
"symbols(uint8)": FunctionFragment;
|
|
14
|
+
"tokenIndexes(address)": FunctionFragment;
|
|
15
|
+
"topUpWETH(address,uint256)": FunctionFragment;
|
|
10
16
|
};
|
|
11
|
-
getFunction(nameOrSignatureOrTopic: "addressOf" | "
|
|
17
|
+
getFunction(nameOrSignatureOrTopic: "addressOf" | "approve(uint8,address,address,uint256)" | "approve(uint8,address,address)" | "approve(address,address,address)" | "approveMany" | "balanceOf" | "symbols" | "tokenIndexes" | "topUpWETH"): FunctionFragment;
|
|
12
18
|
encodeFunctionData(functionFragment: "addressOf", values: [BigNumberish]): string;
|
|
13
|
-
encodeFunctionData(functionFragment: "
|
|
14
|
-
encodeFunctionData(functionFragment: "
|
|
19
|
+
encodeFunctionData(functionFragment: "approve(uint8,address,address,uint256)", values: [BigNumberish, string, string, BigNumberish]): string;
|
|
20
|
+
encodeFunctionData(functionFragment: "approve(uint8,address,address)", values: [BigNumberish, string, string]): string;
|
|
21
|
+
encodeFunctionData(functionFragment: "approve(address,address,address)", values: [string, string, string]): string;
|
|
22
|
+
encodeFunctionData(functionFragment: "approveMany", values: [BigNumberish[], string, BigNumberish]): string;
|
|
23
|
+
encodeFunctionData(functionFragment: "balanceOf", values: [BigNumberish, string]): string;
|
|
24
|
+
encodeFunctionData(functionFragment: "symbols", values: [BigNumberish]): string;
|
|
25
|
+
encodeFunctionData(functionFragment: "tokenIndexes", values: [string]): string;
|
|
26
|
+
encodeFunctionData(functionFragment: "topUpWETH", values: [string, BigNumberish]): string;
|
|
15
27
|
decodeFunctionResult(functionFragment: "addressOf", data: BytesLike): Result;
|
|
16
|
-
decodeFunctionResult(functionFragment: "
|
|
17
|
-
decodeFunctionResult(functionFragment: "
|
|
28
|
+
decodeFunctionResult(functionFragment: "approve(uint8,address,address,uint256)", data: BytesLike): Result;
|
|
29
|
+
decodeFunctionResult(functionFragment: "approve(uint8,address,address)", data: BytesLike): Result;
|
|
30
|
+
decodeFunctionResult(functionFragment: "approve(address,address,address)", data: BytesLike): Result;
|
|
31
|
+
decodeFunctionResult(functionFragment: "approveMany", data: BytesLike): Result;
|
|
32
|
+
decodeFunctionResult(functionFragment: "balanceOf", data: BytesLike): Result;
|
|
33
|
+
decodeFunctionResult(functionFragment: "symbols", data: BytesLike): Result;
|
|
34
|
+
decodeFunctionResult(functionFragment: "tokenIndexes", data: BytesLike): Result;
|
|
35
|
+
decodeFunctionResult(functionFragment: "topUpWETH", data: BytesLike): Result;
|
|
18
36
|
events: {};
|
|
19
37
|
}
|
|
20
38
|
export interface ITokenTestSuite extends BaseContract {
|
|
@@ -33,26 +51,100 @@ export interface ITokenTestSuite extends BaseContract {
|
|
|
33
51
|
removeListener: OnEvent<this>;
|
|
34
52
|
functions: {
|
|
35
53
|
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
|
36
|
-
"
|
|
37
|
-
|
|
54
|
+
"approve(uint8,address,address,uint256)"(t: BigNumberish, holder: string, targetContract: string, amount: BigNumberish, overrides?: Overrides & {
|
|
55
|
+
from?: string | Promise<string>;
|
|
56
|
+
}): Promise<ContractTransaction>;
|
|
57
|
+
"approve(uint8,address,address)"(t: BigNumberish, holder: string, targetContract: string, overrides?: Overrides & {
|
|
58
|
+
from?: string | Promise<string>;
|
|
59
|
+
}): Promise<ContractTransaction>;
|
|
60
|
+
"approve(address,address,address)"(token: string, holder: string, targetContract: string, overrides?: Overrides & {
|
|
61
|
+
from?: string | Promise<string>;
|
|
62
|
+
}): Promise<ContractTransaction>;
|
|
63
|
+
approveMany(tokensToApprove: BigNumberish[], holder: string, targetContract: BigNumberish, overrides?: Overrides & {
|
|
64
|
+
from?: string | Promise<string>;
|
|
65
|
+
}): Promise<ContractTransaction>;
|
|
66
|
+
balanceOf(t: BigNumberish, holder: string, overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
67
|
+
balance: BigNumber;
|
|
68
|
+
}>;
|
|
69
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
|
70
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<[number] & {
|
|
71
|
+
t: number;
|
|
72
|
+
}>;
|
|
73
|
+
topUpWETH(onBehalfOf: string, value: BigNumberish, overrides?: Overrides & {
|
|
74
|
+
from?: string | Promise<string>;
|
|
75
|
+
}): Promise<ContractTransaction>;
|
|
38
76
|
};
|
|
39
77
|
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
40
|
-
"
|
|
41
|
-
|
|
78
|
+
"approve(uint8,address,address,uint256)"(t: BigNumberish, holder: string, targetContract: string, amount: BigNumberish, overrides?: Overrides & {
|
|
79
|
+
from?: string | Promise<string>;
|
|
80
|
+
}): Promise<ContractTransaction>;
|
|
81
|
+
"approve(uint8,address,address)"(t: BigNumberish, holder: string, targetContract: string, overrides?: Overrides & {
|
|
82
|
+
from?: string | Promise<string>;
|
|
83
|
+
}): Promise<ContractTransaction>;
|
|
84
|
+
"approve(address,address,address)"(token: string, holder: string, targetContract: string, overrides?: Overrides & {
|
|
85
|
+
from?: string | Promise<string>;
|
|
86
|
+
}): Promise<ContractTransaction>;
|
|
87
|
+
approveMany(tokensToApprove: BigNumberish[], holder: string, targetContract: BigNumberish, overrides?: Overrides & {
|
|
88
|
+
from?: string | Promise<string>;
|
|
89
|
+
}): Promise<ContractTransaction>;
|
|
90
|
+
balanceOf(t: BigNumberish, holder: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
91
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
92
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<number>;
|
|
93
|
+
topUpWETH(onBehalfOf: string, value: BigNumberish, overrides?: Overrides & {
|
|
94
|
+
from?: string | Promise<string>;
|
|
95
|
+
}): Promise<ContractTransaction>;
|
|
42
96
|
callStatic: {
|
|
43
97
|
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
44
|
-
"
|
|
45
|
-
"
|
|
98
|
+
"approve(uint8,address,address,uint256)"(t: BigNumberish, holder: string, targetContract: string, amount: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
|
99
|
+
"approve(uint8,address,address)"(t: BigNumberish, holder: string, targetContract: string, overrides?: CallOverrides): Promise<void>;
|
|
100
|
+
"approve(address,address,address)"(token: string, holder: string, targetContract: string, overrides?: CallOverrides): Promise<void>;
|
|
101
|
+
approveMany(tokensToApprove: BigNumberish[], holder: string, targetContract: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
|
102
|
+
balanceOf(t: BigNumberish, holder: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
103
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
104
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<number>;
|
|
105
|
+
topUpWETH(onBehalfOf: string, value: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
|
46
106
|
};
|
|
47
107
|
filters: {};
|
|
48
108
|
estimateGas: {
|
|
49
109
|
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
50
|
-
"
|
|
51
|
-
|
|
110
|
+
"approve(uint8,address,address,uint256)"(t: BigNumberish, holder: string, targetContract: string, amount: BigNumberish, overrides?: Overrides & {
|
|
111
|
+
from?: string | Promise<string>;
|
|
112
|
+
}): Promise<BigNumber>;
|
|
113
|
+
"approve(uint8,address,address)"(t: BigNumberish, holder: string, targetContract: string, overrides?: Overrides & {
|
|
114
|
+
from?: string | Promise<string>;
|
|
115
|
+
}): Promise<BigNumber>;
|
|
116
|
+
"approve(address,address,address)"(token: string, holder: string, targetContract: string, overrides?: Overrides & {
|
|
117
|
+
from?: string | Promise<string>;
|
|
118
|
+
}): Promise<BigNumber>;
|
|
119
|
+
approveMany(tokensToApprove: BigNumberish[], holder: string, targetContract: BigNumberish, overrides?: Overrides & {
|
|
120
|
+
from?: string | Promise<string>;
|
|
121
|
+
}): Promise<BigNumber>;
|
|
122
|
+
balanceOf(t: BigNumberish, holder: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
123
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
124
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
125
|
+
topUpWETH(onBehalfOf: string, value: BigNumberish, overrides?: Overrides & {
|
|
126
|
+
from?: string | Promise<string>;
|
|
127
|
+
}): Promise<BigNumber>;
|
|
52
128
|
};
|
|
53
129
|
populateTransaction: {
|
|
54
130
|
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
55
|
-
"
|
|
56
|
-
|
|
131
|
+
"approve(uint8,address,address,uint256)"(t: BigNumberish, holder: string, targetContract: string, amount: BigNumberish, overrides?: Overrides & {
|
|
132
|
+
from?: string | Promise<string>;
|
|
133
|
+
}): Promise<PopulatedTransaction>;
|
|
134
|
+
"approve(uint8,address,address)"(t: BigNumberish, holder: string, targetContract: string, overrides?: Overrides & {
|
|
135
|
+
from?: string | Promise<string>;
|
|
136
|
+
}): Promise<PopulatedTransaction>;
|
|
137
|
+
"approve(address,address,address)"(token: string, holder: string, targetContract: string, overrides?: Overrides & {
|
|
138
|
+
from?: string | Promise<string>;
|
|
139
|
+
}): Promise<PopulatedTransaction>;
|
|
140
|
+
approveMany(tokensToApprove: BigNumberish[], holder: string, targetContract: BigNumberish, overrides?: Overrides & {
|
|
141
|
+
from?: string | Promise<string>;
|
|
142
|
+
}): Promise<PopulatedTransaction>;
|
|
143
|
+
balanceOf(t: BigNumberish, holder: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
144
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
145
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
146
|
+
topUpWETH(onBehalfOf: string, value: BigNumberish, overrides?: Overrides & {
|
|
147
|
+
from?: string | Promise<string>;
|
|
148
|
+
}): Promise<PopulatedTransaction>;
|
|
57
149
|
};
|
|
58
150
|
}
|
package/lib/types/contracts/test/suites/mainnet/SupportedContracts.sol/ISupportedContracts.d.ts
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../../common";
|
|
5
|
+
export interface ISupportedContractsInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"addressOf(uint8)": FunctionFragment;
|
|
8
|
+
"nameOf(uint8)": FunctionFragment;
|
|
9
|
+
};
|
|
10
|
+
getFunction(nameOrSignatureOrTopic: "addressOf" | "nameOf"): FunctionFragment;
|
|
11
|
+
encodeFunctionData(functionFragment: "addressOf", values: [BigNumberish]): string;
|
|
12
|
+
encodeFunctionData(functionFragment: "nameOf", values: [BigNumberish]): string;
|
|
13
|
+
decodeFunctionResult(functionFragment: "addressOf", data: BytesLike): Result;
|
|
14
|
+
decodeFunctionResult(functionFragment: "nameOf", data: BytesLike): Result;
|
|
15
|
+
events: {};
|
|
16
|
+
}
|
|
17
|
+
export interface ISupportedContracts extends BaseContract {
|
|
18
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
19
|
+
attach(addressOrName: string): this;
|
|
20
|
+
deployed(): Promise<this>;
|
|
21
|
+
interface: ISupportedContractsInterface;
|
|
22
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
23
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
24
|
+
listeners(eventName?: string): Array<Listener>;
|
|
25
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
26
|
+
removeAllListeners(eventName?: string): this;
|
|
27
|
+
off: OnEvent<this>;
|
|
28
|
+
on: OnEvent<this>;
|
|
29
|
+
once: OnEvent<this>;
|
|
30
|
+
removeListener: OnEvent<this>;
|
|
31
|
+
functions: {
|
|
32
|
+
addressOf(c: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
|
33
|
+
nameOf(c: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
|
34
|
+
};
|
|
35
|
+
addressOf(c: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
36
|
+
nameOf(c: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
37
|
+
callStatic: {
|
|
38
|
+
addressOf(c: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
39
|
+
nameOf(c: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
40
|
+
};
|
|
41
|
+
filters: {};
|
|
42
|
+
estimateGas: {
|
|
43
|
+
addressOf(c: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
44
|
+
nameOf(c: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
45
|
+
};
|
|
46
|
+
populateTransaction: {
|
|
47
|
+
addressOf(c: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
48
|
+
nameOf(c: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
49
|
+
};
|
|
50
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { ISupportedContracts } from "./ISupportedContracts";
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../../common";
|
|
5
|
+
export interface ITokenInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"addressOf(uint8)": FunctionFragment;
|
|
8
|
+
"symbols(uint8)": FunctionFragment;
|
|
9
|
+
"tokenIndexes(address)": FunctionFragment;
|
|
10
|
+
};
|
|
11
|
+
getFunction(nameOrSignatureOrTopic: "addressOf" | "symbols" | "tokenIndexes"): FunctionFragment;
|
|
12
|
+
encodeFunctionData(functionFragment: "addressOf", values: [BigNumberish]): string;
|
|
13
|
+
encodeFunctionData(functionFragment: "symbols", values: [BigNumberish]): string;
|
|
14
|
+
encodeFunctionData(functionFragment: "tokenIndexes", values: [string]): string;
|
|
15
|
+
decodeFunctionResult(functionFragment: "addressOf", data: BytesLike): Result;
|
|
16
|
+
decodeFunctionResult(functionFragment: "symbols", data: BytesLike): Result;
|
|
17
|
+
decodeFunctionResult(functionFragment: "tokenIndexes", data: BytesLike): Result;
|
|
18
|
+
events: {};
|
|
19
|
+
}
|
|
20
|
+
export interface IToken extends BaseContract {
|
|
21
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
22
|
+
attach(addressOrName: string): this;
|
|
23
|
+
deployed(): Promise<this>;
|
|
24
|
+
interface: ITokenInterface;
|
|
25
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
26
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
27
|
+
listeners(eventName?: string): Array<Listener>;
|
|
28
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
29
|
+
removeAllListeners(eventName?: string): this;
|
|
30
|
+
off: OnEvent<this>;
|
|
31
|
+
on: OnEvent<this>;
|
|
32
|
+
once: OnEvent<this>;
|
|
33
|
+
removeListener: OnEvent<this>;
|
|
34
|
+
functions: {
|
|
35
|
+
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
|
36
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<[string]>;
|
|
37
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<[number] & {
|
|
38
|
+
t: number;
|
|
39
|
+
}>;
|
|
40
|
+
};
|
|
41
|
+
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
42
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
43
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<number>;
|
|
44
|
+
callStatic: {
|
|
45
|
+
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
46
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<string>;
|
|
47
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<number>;
|
|
48
|
+
};
|
|
49
|
+
filters: {};
|
|
50
|
+
estimateGas: {
|
|
51
|
+
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
52
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
53
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<BigNumber>;
|
|
54
|
+
};
|
|
55
|
+
populateTransaction: {
|
|
56
|
+
addressOf(t: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
57
|
+
symbols(t: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
58
|
+
tokenIndexes(arg0: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
59
|
+
};
|
|
60
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { IToken } from "./IToken";
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import type * as supportedContractsSol from "./SupportedContracts.sol";
|
|
2
|
+
export type { supportedContractsSol };
|
|
3
|
+
import type * as tokensSol from "./Tokens.sol";
|
|
4
|
+
export type { tokensSol };
|
|
2
5
|
export type { ITokenTestSuite } from "./ITokenTestSuite";
|
package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js
CHANGED
|
@@ -6,6 +6,42 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ICreditFacadeExtended__factory = void 0;
|
|
7
7
|
var ethers_1 = require("ethers");
|
|
8
8
|
var _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
internalType: "address",
|
|
13
|
+
name: "onBehalfOf",
|
|
14
|
+
type: "address",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
internalType: "address",
|
|
18
|
+
name: "token",
|
|
19
|
+
type: "address",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
internalType: "uint256",
|
|
23
|
+
name: "amount",
|
|
24
|
+
type: "uint256",
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
name: "addCollateral",
|
|
28
|
+
outputs: [],
|
|
29
|
+
stateMutability: "payable",
|
|
30
|
+
type: "function",
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
inputs: [
|
|
34
|
+
{
|
|
35
|
+
internalType: "uint256",
|
|
36
|
+
name: "amount",
|
|
37
|
+
type: "uint256",
|
|
38
|
+
},
|
|
39
|
+
],
|
|
40
|
+
name: "decreaseDebt",
|
|
41
|
+
outputs: [],
|
|
42
|
+
stateMutability: "nonpayable",
|
|
43
|
+
type: "function",
|
|
44
|
+
},
|
|
9
45
|
{
|
|
10
46
|
inputs: [
|
|
11
47
|
{
|
|
@@ -19,6 +55,32 @@ var _abi = [
|
|
|
19
55
|
stateMutability: "nonpayable",
|
|
20
56
|
type: "function",
|
|
21
57
|
},
|
|
58
|
+
{
|
|
59
|
+
inputs: [
|
|
60
|
+
{
|
|
61
|
+
internalType: "address",
|
|
62
|
+
name: "token",
|
|
63
|
+
type: "address",
|
|
64
|
+
},
|
|
65
|
+
],
|
|
66
|
+
name: "enableToken",
|
|
67
|
+
outputs: [],
|
|
68
|
+
stateMutability: "nonpayable",
|
|
69
|
+
type: "function",
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
inputs: [
|
|
73
|
+
{
|
|
74
|
+
internalType: "uint256",
|
|
75
|
+
name: "amount",
|
|
76
|
+
type: "uint256",
|
|
77
|
+
},
|
|
78
|
+
],
|
|
79
|
+
name: "increaseDebt",
|
|
80
|
+
outputs: [],
|
|
81
|
+
stateMutability: "nonpayable",
|
|
82
|
+
type: "function",
|
|
83
|
+
},
|
|
22
84
|
{
|
|
23
85
|
inputs: [
|
|
24
86
|
{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Signer } from "ethers";
|
|
2
2
|
import type { Provider } from "@ethersproject/providers";
|
|
3
|
-
import type {
|
|
4
|
-
export declare class
|
|
3
|
+
import type { ICurveV1_2AssetsAdapter, ICurveV1_2AssetsAdapterInterface } from "../../../../../contracts/interfaces/adapters/curve/ICurveV1_2AssetsAdapter";
|
|
4
|
+
export declare class ICurveV1_2AssetsAdapter__factory {
|
|
5
5
|
static readonly abi: ({
|
|
6
6
|
inputs: {
|
|
7
7
|
internalType: string;
|
|
@@ -27,6 +27,6 @@ export declare class IPriceFeedsRegistry__factory {
|
|
|
27
27
|
stateMutability: string;
|
|
28
28
|
type: string;
|
|
29
29
|
})[];
|
|
30
|
-
static createInterface():
|
|
31
|
-
static connect(address: string, signerOrProvider: Signer | Provider):
|
|
30
|
+
static createInterface(): ICurveV1_2AssetsAdapterInterface;
|
|
31
|
+
static connect(address: string, signerOrProvider: Signer | Provider): ICurveV1_2AssetsAdapter;
|
|
32
32
|
}
|