@gearbox-protocol/sdk 1.20.21 → 1.20.23
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 +4 -0
- package/lib/apy/convexAPY.d.ts +2 -2
- package/lib/apy/curveAPY.d.ts +2 -2
- package/lib/apy/curveAPY.js +4 -2
- package/lib/apy/index.d.ts +3 -3
- package/lib/apy/lidoAPY.js +1 -1
- package/lib/apy/yearnAPY.d.ts +1 -1
- package/lib/apy/yearnAPY.js +1 -1
- package/lib/contracts/adapters.d.ts +2 -1
- package/lib/contracts/adapters.js +1 -0
- package/lib/contracts/contracts.d.ts +21 -17
- package/lib/contracts/contracts.js +27 -8
- package/lib/contracts/contractsRegister.d.ts +1 -1
- package/lib/contracts/protocols.d.ts +2 -1
- package/lib/contracts/protocols.js +5 -0
- package/lib/core/assets.d.ts +1 -1
- package/lib/core/chains.d.ts +1 -1
- package/lib/core/chains.js +1 -1
- package/lib/core/creditSession.d.ts +6 -5
- package/lib/core/creditSession.js +1 -0
- package/lib/core/errors.d.ts +1 -1
- package/lib/core/eventOrTx.d.ts +4 -4
- package/lib/core/events.d.ts +2 -2
- package/lib/core/history.d.ts +2 -2
- package/lib/core/pool/data.js +1 -1
- package/lib/core/pool/operation.d.ts +1 -1
- package/lib/core/rewardClaimer.js +1 -1
- package/lib/core/rewardConvex.js +1 -1
- package/lib/core/strategy.d.ts +1 -1
- package/lib/core/trade.d.ts +1 -1
- package/lib/core/trade.js +1 -1
- package/lib/core/transactions.d.ts +1 -1
- package/lib/core/wcOperation/index.d.ts +2 -2
- package/lib/core/wcOperation/operations.d.ts +5 -5
- package/lib/oracles/oracles.d.ts +13 -2
- package/lib/oracles/oracles.js +5 -0
- package/lib/oracles/priceFeeds.js +56 -0
- package/lib/pathfinder/pathOptions.d.ts +1 -1
- package/lib/pathfinder/pathfinder.js +1 -1
- package/lib/pathfinder/tradeTypes.d.ts +13 -2
- package/lib/pathfinder/tradeTypes.js +2 -0
- package/lib/payload/creditAccount.d.ts +2 -2
- package/lib/payload/creditManager.d.ts +1 -1
- package/lib/payload/creditSession.d.ts +1 -0
- package/lib/payload/pool.d.ts +1 -1
- package/lib/tokens/balancer.d.ts +22 -0
- package/lib/tokens/balancer.js +53 -0
- package/lib/tokens/convex.d.ts +5 -5
- package/lib/tokens/convex.js +42 -0
- package/lib/tokens/curveLP.d.ts +4 -4
- package/lib/tokens/curveLP.js +23 -0
- package/lib/tokens/decimals.js +7 -0
- package/lib/tokens/gear.d.ts +4 -4
- package/lib/tokens/normal.d.ts +2 -2
- package/lib/tokens/normal.js +35 -0
- package/lib/tokens/token.d.ts +5 -4
- package/lib/tokens/token.js +18 -1
- package/lib/tokens/tokenData.d.ts +1 -1
- package/lib/tokens/tokenType.d.ts +2 -1
- package/lib/tokens/tokenType.js +1 -0
- package/lib/tokens/yearn.d.ts +4 -4
- package/lib/types/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.d.ts +4 -4
- package/lib/types/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IACL.sol/IACL.d.ts +8 -8
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IACL.sol/IACLEvents.d.ts +8 -8
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAccountFactory.sol/IAccountFactory.d.ts +10 -10
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAccountFactory.sol/IAccountFactoryEvents.d.ts +10 -10
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAddressProvider.sol/IAddressProvider.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAddressProvider.sol/IAddressProviderEvents.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAirdropDistributor.sol/IAirdropDistributor.d.ts +6 -6
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IAirdropDistributor.sol/IAirdropDistributorEvents.d.ts +6 -6
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IContractsRegister.sol/IContractsRegister.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IContractsRegister.sol/IContractsRegisterEvents.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator.d.ts +38 -38
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents.d.ts +38 -38
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacade.d.ts +28 -28
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeEvents.d.ts +26 -26
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2Events.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IDataCompressor.sol/IDataCompressor.d.ts +10 -10
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IDegenDistributor.sol/IDegenDistributor.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IDegenDistributor.sol/IDegenDistributorEvents.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IDegenNFT.sol/IDegenNFT.d.ts +12 -12
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IDegenNFT.sol/IDegenNFTEvents.d.ts +6 -6
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IDieselToken.sol/IDieselToken.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ILPPriceFeed.sol/ILPPriceFeed.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ILPPriceFeed.sol/ILPPriceFeedEvents.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IPhantomERC20.d.ts +4 -4
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IPoolService.sol/IPoolService.d.ts +20 -20
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IPoolService.sol/IPoolServiceEvents.d.ts +20 -20
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IPriceOracle.sol/IPriceOracleV2.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IPriceOracle.sol/IPriceOracleV2Events.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/IPriceOracle.sol/IPriceOracleV2Ext.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/V1/ICreditFilter.d.ts +16 -16
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/V1/ICreditManager.d.ts +20 -20
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/adapters/IUniversalAdapter.sol/IUniversalAdapter.d.ts +2 -2
- package/lib/types/@gearbox-protocol/core-v2/contracts/pool/PoolService.d.ts +24 -24
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IConvexToken.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/integrations/lido/IstETH.sol/IstETH.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/integrations/lido/IstETH.sol/IstETHGetters.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/integrations/lido/IwstETH.sol/IwstETH.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/integrations/lido/IwstETH.sol/IwstETHGetters.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/integrations/yearn/IYVault.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/lido/ILidoV1Adapter.sol/ILidoV1Adapter.d.ts +2 -2
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/lido/ILidoV1Adapter.sol/ILidoV1AdapterEvents.d.ts +2 -2
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/yearn/IYearnV2Adapter.d.ts +4 -4
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/test/mocks/integrations/LidoMock.sol/ILidoMockEvents.d.ts +2 -2
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IClosePathResolver.d.ts +10 -10
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IDepositor.sol/IDepositor.d.ts +8 -8
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IDepositor.sol/IDepositorOptions.d.ts +8 -8
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/ILPWorker.sol/ILPWorker.d.ts +8 -8
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/ILPWorker.sol/ILPWorkerOptions.d.ts +8 -8
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IPathResolver.d.ts +8 -8
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IRouter.d.ts +16 -16
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/ISwapAggregator.d.ts +12 -12
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/ISwapper.d.ts +6 -6
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IWithdrawer.sol/IWithdrawer.d.ts +8 -8
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IWithdrawer.sol/IWithdrawerOptions.d.ts +10 -10
- package/lib/types/@gearbox-protocol/router/contracts/interfaces/IWrapper.d.ts +6 -6
- package/lib/types/@openzeppelin/contracts/token/ERC20/IERC20.d.ts +4 -4
- package/lib/types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.d.ts +4 -4
- package/lib/types/@openzeppelin/contracts/token/ERC721/IERC721.d.ts +6 -6
- package/lib/types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.d.ts +6 -6
- package/lib/types/common.d.ts +4 -4
- package/lib/types/contracts/ITokenDistributor.sol/ITokenDistributor.d.ts +8 -8
- package/lib/types/contracts/ITokenDistributor.sol/ITokenDistributorEvents.d.ts +8 -8
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/pool/PoolService__factory.d.ts +1 -1
- package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.d.ts +1 -1
- package/lib/utils/mappers.d.ts +1 -1
- package/lib/utils/multicall.js +1 -1
- package/lib/utils/repeater.js +1 -1
- package/lib/utils/types.d.ts +5 -5
- package/lib/watchers/creditAccountWatcher.d.ts +1 -1
- package/lib/watchers/creditAccountWatcher.js +1 -1
- package/lib/watchers/creditManagerWatcher.js +1 -1
- package/package.json +1 -1
|
@@ -2,7 +2,7 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, C
|
|
|
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
|
-
export
|
|
5
|
+
export type SwapTaskStruct = {
|
|
6
6
|
swapOperation: BigNumberish;
|
|
7
7
|
creditAccount: string;
|
|
8
8
|
tokenIn: string;
|
|
@@ -12,7 +12,7 @@ export declare type SwapTaskStruct = {
|
|
|
12
12
|
slippage: BigNumberish;
|
|
13
13
|
externalSlippage: boolean;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type SwapTaskStructOutput = [
|
|
16
16
|
number,
|
|
17
17
|
string,
|
|
18
18
|
string,
|
|
@@ -31,21 +31,21 @@ export declare type SwapTaskStructOutput = [
|
|
|
31
31
|
slippage: BigNumber;
|
|
32
32
|
externalSlippage: boolean;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type MultiCallStruct = {
|
|
35
35
|
target: string;
|
|
36
36
|
callData: BytesLike;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type MultiCallStructOutput = [string, string] & {
|
|
39
39
|
target: string;
|
|
40
40
|
callData: string;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type SwapQuoteStruct = {
|
|
43
43
|
multiCall: MultiCallStruct;
|
|
44
44
|
amount: BigNumberish;
|
|
45
45
|
found: boolean;
|
|
46
46
|
gasUsage: BigNumberish;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type SwapQuoteStructOutput = [
|
|
49
49
|
MultiCallStructOutput,
|
|
50
50
|
BigNumber,
|
|
51
51
|
boolean,
|
package/lib/types/@gearbox-protocol/router/contracts/interfaces/IWithdrawer.sol/IWithdrawer.d.ts
CHANGED
|
@@ -2,33 +2,33 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, P
|
|
|
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
|
-
export
|
|
5
|
+
export type BalanceStruct = {
|
|
6
6
|
token: string;
|
|
7
7
|
balance: BigNumberish;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type BalanceStructOutput = [string, BigNumber] & {
|
|
10
10
|
token: string;
|
|
11
11
|
balance: BigNumber;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type TokenAdaptersStruct = {
|
|
14
14
|
token: string;
|
|
15
15
|
depositAdapter: string;
|
|
16
16
|
withdrawAdapter: string;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type TokenAdaptersStructOutput = [string, string, string] & {
|
|
19
19
|
token: string;
|
|
20
20
|
depositAdapter: string;
|
|
21
21
|
withdrawAdapter: string;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type MultiCallStruct = {
|
|
24
24
|
target: string;
|
|
25
25
|
callData: BytesLike;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type MultiCallStructOutput = [string, string] & {
|
|
28
28
|
target: string;
|
|
29
29
|
callData: string;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type StrategyPathTaskStruct = {
|
|
32
32
|
creditAccount: string;
|
|
33
33
|
balances: BalanceStruct[];
|
|
34
34
|
target: string;
|
|
@@ -43,7 +43,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
43
43
|
initTargetBalance: BigNumberish;
|
|
44
44
|
calls: MultiCallStruct[];
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type StrategyPathTaskStructOutput = [
|
|
47
47
|
string,
|
|
48
48
|
BalanceStructOutput[],
|
|
49
49
|
string,
|
|
@@ -2,33 +2,33 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, P
|
|
|
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
|
-
export
|
|
5
|
+
export type BalanceStruct = {
|
|
6
6
|
token: string;
|
|
7
7
|
balance: BigNumberish;
|
|
8
8
|
};
|
|
9
|
-
export
|
|
9
|
+
export type BalanceStructOutput = [string, BigNumber] & {
|
|
10
10
|
token: string;
|
|
11
11
|
balance: BigNumber;
|
|
12
12
|
};
|
|
13
|
-
export
|
|
13
|
+
export type TokenAdaptersStruct = {
|
|
14
14
|
token: string;
|
|
15
15
|
depositAdapter: string;
|
|
16
16
|
withdrawAdapter: string;
|
|
17
17
|
};
|
|
18
|
-
export
|
|
18
|
+
export type TokenAdaptersStructOutput = [string, string, string] & {
|
|
19
19
|
token: string;
|
|
20
20
|
depositAdapter: string;
|
|
21
21
|
withdrawAdapter: string;
|
|
22
22
|
};
|
|
23
|
-
export
|
|
23
|
+
export type MultiCallStruct = {
|
|
24
24
|
target: string;
|
|
25
25
|
callData: BytesLike;
|
|
26
26
|
};
|
|
27
|
-
export
|
|
27
|
+
export type MultiCallStructOutput = [string, string] & {
|
|
28
28
|
target: string;
|
|
29
29
|
callData: string;
|
|
30
30
|
};
|
|
31
|
-
export
|
|
31
|
+
export type StrategyPathTaskStruct = {
|
|
32
32
|
creditAccount: string;
|
|
33
33
|
balances: BalanceStruct[];
|
|
34
34
|
target: string;
|
|
@@ -43,7 +43,7 @@ export declare type StrategyPathTaskStruct = {
|
|
|
43
43
|
initTargetBalance: BigNumberish;
|
|
44
44
|
calls: MultiCallStruct[];
|
|
45
45
|
};
|
|
46
|
-
export
|
|
46
|
+
export type StrategyPathTaskStructOutput = [
|
|
47
47
|
string,
|
|
48
48
|
BalanceStructOutput[],
|
|
49
49
|
string,
|
|
@@ -72,12 +72,12 @@ export declare type StrategyPathTaskStructOutput = [
|
|
|
72
72
|
initTargetBalance: BigNumber;
|
|
73
73
|
calls: MultiCallStructOutput[];
|
|
74
74
|
};
|
|
75
|
-
export
|
|
75
|
+
export type PathOptionStruct = {
|
|
76
76
|
target: string;
|
|
77
77
|
option: BigNumberish;
|
|
78
78
|
totalOptions: BigNumberish;
|
|
79
79
|
};
|
|
80
|
-
export
|
|
80
|
+
export type PathOptionStructOutput = [string, number, number] & {
|
|
81
81
|
target: string;
|
|
82
82
|
option: number;
|
|
83
83
|
totalOptions: number;
|
|
@@ -2,7 +2,7 @@ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, C
|
|
|
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
|
-
export
|
|
5
|
+
export type SwapTaskStruct = {
|
|
6
6
|
swapOperation: BigNumberish;
|
|
7
7
|
creditAccount: string;
|
|
8
8
|
tokenIn: string;
|
|
@@ -12,7 +12,7 @@ export declare type SwapTaskStruct = {
|
|
|
12
12
|
slippage: BigNumberish;
|
|
13
13
|
externalSlippage: boolean;
|
|
14
14
|
};
|
|
15
|
-
export
|
|
15
|
+
export type SwapTaskStructOutput = [
|
|
16
16
|
number,
|
|
17
17
|
string,
|
|
18
18
|
string,
|
|
@@ -31,21 +31,21 @@ export declare type SwapTaskStructOutput = [
|
|
|
31
31
|
slippage: BigNumber;
|
|
32
32
|
externalSlippage: boolean;
|
|
33
33
|
};
|
|
34
|
-
export
|
|
34
|
+
export type MultiCallStruct = {
|
|
35
35
|
target: string;
|
|
36
36
|
callData: BytesLike;
|
|
37
37
|
};
|
|
38
|
-
export
|
|
38
|
+
export type MultiCallStructOutput = [string, string] & {
|
|
39
39
|
target: string;
|
|
40
40
|
callData: string;
|
|
41
41
|
};
|
|
42
|
-
export
|
|
42
|
+
export type SwapQuoteStruct = {
|
|
43
43
|
multiCall: MultiCallStruct;
|
|
44
44
|
amount: BigNumberish;
|
|
45
45
|
found: boolean;
|
|
46
46
|
gasUsage: BigNumberish;
|
|
47
47
|
};
|
|
48
|
-
export
|
|
48
|
+
export type SwapQuoteStructOutput = [
|
|
49
49
|
MultiCallStructOutput,
|
|
50
50
|
BigNumber,
|
|
51
51
|
boolean,
|
|
@@ -36,23 +36,23 @@ export interface ApprovalEventObject {
|
|
|
36
36
|
spender: string;
|
|
37
37
|
value: BigNumber;
|
|
38
38
|
}
|
|
39
|
-
export
|
|
39
|
+
export type ApprovalEvent = TypedEvent<[
|
|
40
40
|
string,
|
|
41
41
|
string,
|
|
42
42
|
BigNumber
|
|
43
43
|
], ApprovalEventObject>;
|
|
44
|
-
export
|
|
44
|
+
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
|
|
45
45
|
export interface TransferEventObject {
|
|
46
46
|
from: string;
|
|
47
47
|
to: string;
|
|
48
48
|
value: BigNumber;
|
|
49
49
|
}
|
|
50
|
-
export
|
|
50
|
+
export type TransferEvent = TypedEvent<[
|
|
51
51
|
string,
|
|
52
52
|
string,
|
|
53
53
|
BigNumber
|
|
54
54
|
], TransferEventObject>;
|
|
55
|
-
export
|
|
55
|
+
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
|
|
56
56
|
export interface IERC20 extends BaseContract {
|
|
57
57
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
58
58
|
attach(addressOrName: string): this;
|
|
@@ -45,23 +45,23 @@ export interface ApprovalEventObject {
|
|
|
45
45
|
spender: string;
|
|
46
46
|
value: BigNumber;
|
|
47
47
|
}
|
|
48
|
-
export
|
|
48
|
+
export type ApprovalEvent = TypedEvent<[
|
|
49
49
|
string,
|
|
50
50
|
string,
|
|
51
51
|
BigNumber
|
|
52
52
|
], ApprovalEventObject>;
|
|
53
|
-
export
|
|
53
|
+
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
|
|
54
54
|
export interface TransferEventObject {
|
|
55
55
|
from: string;
|
|
56
56
|
to: string;
|
|
57
57
|
value: BigNumber;
|
|
58
58
|
}
|
|
59
|
-
export
|
|
59
|
+
export type TransferEvent = TypedEvent<[
|
|
60
60
|
string,
|
|
61
61
|
string,
|
|
62
62
|
BigNumber
|
|
63
63
|
], TransferEventObject>;
|
|
64
|
-
export
|
|
64
|
+
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
|
|
65
65
|
export interface IERC20Metadata extends BaseContract {
|
|
66
66
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
67
67
|
attach(addressOrName: string): this;
|
|
@@ -50,34 +50,34 @@ export interface ApprovalEventObject {
|
|
|
50
50
|
approved: string;
|
|
51
51
|
tokenId: BigNumber;
|
|
52
52
|
}
|
|
53
|
-
export
|
|
53
|
+
export type ApprovalEvent = TypedEvent<[
|
|
54
54
|
string,
|
|
55
55
|
string,
|
|
56
56
|
BigNumber
|
|
57
57
|
], ApprovalEventObject>;
|
|
58
|
-
export
|
|
58
|
+
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
|
|
59
59
|
export interface ApprovalForAllEventObject {
|
|
60
60
|
owner: string;
|
|
61
61
|
operator: string;
|
|
62
62
|
approved: boolean;
|
|
63
63
|
}
|
|
64
|
-
export
|
|
64
|
+
export type ApprovalForAllEvent = TypedEvent<[
|
|
65
65
|
string,
|
|
66
66
|
string,
|
|
67
67
|
boolean
|
|
68
68
|
], ApprovalForAllEventObject>;
|
|
69
|
-
export
|
|
69
|
+
export type ApprovalForAllEventFilter = TypedEventFilter<ApprovalForAllEvent>;
|
|
70
70
|
export interface TransferEventObject {
|
|
71
71
|
from: string;
|
|
72
72
|
to: string;
|
|
73
73
|
tokenId: BigNumber;
|
|
74
74
|
}
|
|
75
|
-
export
|
|
75
|
+
export type TransferEvent = TypedEvent<[
|
|
76
76
|
string,
|
|
77
77
|
string,
|
|
78
78
|
BigNumber
|
|
79
79
|
], TransferEventObject>;
|
|
80
|
-
export
|
|
80
|
+
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
|
|
81
81
|
export interface IERC721 extends BaseContract {
|
|
82
82
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
83
83
|
attach(addressOrName: string): this;
|
|
@@ -59,34 +59,34 @@ export interface ApprovalEventObject {
|
|
|
59
59
|
approved: string;
|
|
60
60
|
tokenId: BigNumber;
|
|
61
61
|
}
|
|
62
|
-
export
|
|
62
|
+
export type ApprovalEvent = TypedEvent<[
|
|
63
63
|
string,
|
|
64
64
|
string,
|
|
65
65
|
BigNumber
|
|
66
66
|
], ApprovalEventObject>;
|
|
67
|
-
export
|
|
67
|
+
export type ApprovalEventFilter = TypedEventFilter<ApprovalEvent>;
|
|
68
68
|
export interface ApprovalForAllEventObject {
|
|
69
69
|
owner: string;
|
|
70
70
|
operator: string;
|
|
71
71
|
approved: boolean;
|
|
72
72
|
}
|
|
73
|
-
export
|
|
73
|
+
export type ApprovalForAllEvent = TypedEvent<[
|
|
74
74
|
string,
|
|
75
75
|
string,
|
|
76
76
|
boolean
|
|
77
77
|
], ApprovalForAllEventObject>;
|
|
78
|
-
export
|
|
78
|
+
export type ApprovalForAllEventFilter = TypedEventFilter<ApprovalForAllEvent>;
|
|
79
79
|
export interface TransferEventObject {
|
|
80
80
|
from: string;
|
|
81
81
|
to: string;
|
|
82
82
|
tokenId: BigNumber;
|
|
83
83
|
}
|
|
84
|
-
export
|
|
84
|
+
export type TransferEvent = TypedEvent<[
|
|
85
85
|
string,
|
|
86
86
|
string,
|
|
87
87
|
BigNumber
|
|
88
88
|
], TransferEventObject>;
|
|
89
|
-
export
|
|
89
|
+
export type TransferEventFilter = TypedEventFilter<TransferEvent>;
|
|
90
90
|
export interface IERC721Metadata extends BaseContract {
|
|
91
91
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
92
92
|
attach(addressOrName: string): this;
|
package/lib/types/common.d.ts
CHANGED
|
@@ -8,14 +8,14 @@ export interface TypedEventFilter<_TEvent extends TypedEvent> extends EventFilte
|
|
|
8
8
|
export interface TypedListener<TEvent extends TypedEvent> {
|
|
9
9
|
(...listenerArg: [...__TypechainArgsArray<TEvent>, TEvent]): void;
|
|
10
10
|
}
|
|
11
|
-
|
|
11
|
+
type __TypechainArgsArray<T> = T extends TypedEvent<infer U> ? U : never;
|
|
12
12
|
export interface OnEvent<TRes> {
|
|
13
13
|
<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>, listener: TypedListener<TEvent>): TRes;
|
|
14
14
|
(eventName: string, listener: Listener): TRes;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
16
|
+
export type MinEthersFactory<C, ARGS> = {
|
|
17
17
|
deploy(...a: ARGS[]): Promise<C>;
|
|
18
18
|
};
|
|
19
|
-
export
|
|
20
|
-
export
|
|
19
|
+
export type GetContractTypeFromFactory<F> = F extends MinEthersFactory<infer C, any> ? C : never;
|
|
20
|
+
export type GetARGsTypeFromFactory<F> = F extends MinEthersFactory<any, any> ? Parameters<F["deploy"]> : never;
|
|
21
21
|
export {};
|
|
@@ -52,43 +52,43 @@ export interface ITokenDistributorInterface extends utils.Interface {
|
|
|
52
52
|
export interface NewDistrubtionControllerEventObject {
|
|
53
53
|
newController: string;
|
|
54
54
|
}
|
|
55
|
-
export
|
|
55
|
+
export type NewDistrubtionControllerEvent = TypedEvent<[
|
|
56
56
|
string
|
|
57
57
|
], NewDistrubtionControllerEventObject>;
|
|
58
|
-
export
|
|
58
|
+
export type NewDistrubtionControllerEventFilter = TypedEventFilter<NewDistrubtionControllerEvent>;
|
|
59
59
|
export interface NewVotingMultiplierEventObject {
|
|
60
60
|
category: string;
|
|
61
61
|
multiplier: number;
|
|
62
62
|
}
|
|
63
|
-
export
|
|
63
|
+
export type NewVotingMultiplierEvent = TypedEvent<[
|
|
64
64
|
string,
|
|
65
65
|
number
|
|
66
66
|
], NewVotingMultiplierEventObject>;
|
|
67
|
-
export
|
|
67
|
+
export type NewVotingMultiplierEventFilter = TypedEventFilter<NewVotingMultiplierEvent>;
|
|
68
68
|
export interface VestingContractAddedEventObject {
|
|
69
69
|
holder: string;
|
|
70
70
|
vestingContract: string;
|
|
71
71
|
amount: BigNumber;
|
|
72
72
|
votingPowerCategory: string;
|
|
73
73
|
}
|
|
74
|
-
export
|
|
74
|
+
export type VestingContractAddedEvent = TypedEvent<[
|
|
75
75
|
string,
|
|
76
76
|
string,
|
|
77
77
|
BigNumber,
|
|
78
78
|
string
|
|
79
79
|
], VestingContractAddedEventObject>;
|
|
80
|
-
export
|
|
80
|
+
export type VestingContractAddedEventFilter = TypedEventFilter<VestingContractAddedEvent>;
|
|
81
81
|
export interface VestingContractReceiverUpdatedEventObject {
|
|
82
82
|
vestingContract: string;
|
|
83
83
|
prevReceiver: string;
|
|
84
84
|
newReceiver: string;
|
|
85
85
|
}
|
|
86
|
-
export
|
|
86
|
+
export type VestingContractReceiverUpdatedEvent = TypedEvent<[
|
|
87
87
|
string,
|
|
88
88
|
string,
|
|
89
89
|
string
|
|
90
90
|
], VestingContractReceiverUpdatedEventObject>;
|
|
91
|
-
export
|
|
91
|
+
export type VestingContractReceiverUpdatedEventFilter = TypedEventFilter<VestingContractReceiverUpdatedEvent>;
|
|
92
92
|
export interface ITokenDistributor extends BaseContract {
|
|
93
93
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
94
94
|
attach(addressOrName: string): this;
|
|
@@ -18,43 +18,43 @@ export interface ITokenDistributorEventsInterface extends utils.Interface {
|
|
|
18
18
|
export interface NewDistrubtionControllerEventObject {
|
|
19
19
|
newController: string;
|
|
20
20
|
}
|
|
21
|
-
export
|
|
21
|
+
export type NewDistrubtionControllerEvent = TypedEvent<[
|
|
22
22
|
string
|
|
23
23
|
], NewDistrubtionControllerEventObject>;
|
|
24
|
-
export
|
|
24
|
+
export type NewDistrubtionControllerEventFilter = TypedEventFilter<NewDistrubtionControllerEvent>;
|
|
25
25
|
export interface NewVotingMultiplierEventObject {
|
|
26
26
|
category: string;
|
|
27
27
|
multiplier: number;
|
|
28
28
|
}
|
|
29
|
-
export
|
|
29
|
+
export type NewVotingMultiplierEvent = TypedEvent<[
|
|
30
30
|
string,
|
|
31
31
|
number
|
|
32
32
|
], NewVotingMultiplierEventObject>;
|
|
33
|
-
export
|
|
33
|
+
export type NewVotingMultiplierEventFilter = TypedEventFilter<NewVotingMultiplierEvent>;
|
|
34
34
|
export interface VestingContractAddedEventObject {
|
|
35
35
|
holder: string;
|
|
36
36
|
vestingContract: string;
|
|
37
37
|
amount: BigNumber;
|
|
38
38
|
votingPowerCategory: string;
|
|
39
39
|
}
|
|
40
|
-
export
|
|
40
|
+
export type VestingContractAddedEvent = TypedEvent<[
|
|
41
41
|
string,
|
|
42
42
|
string,
|
|
43
43
|
BigNumber,
|
|
44
44
|
string
|
|
45
45
|
], VestingContractAddedEventObject>;
|
|
46
|
-
export
|
|
46
|
+
export type VestingContractAddedEventFilter = TypedEventFilter<VestingContractAddedEvent>;
|
|
47
47
|
export interface VestingContractReceiverUpdatedEventObject {
|
|
48
48
|
vestingContract: string;
|
|
49
49
|
prevReceiver: string;
|
|
50
50
|
newReceiver: string;
|
|
51
51
|
}
|
|
52
|
-
export
|
|
52
|
+
export type VestingContractReceiverUpdatedEvent = TypedEvent<[
|
|
53
53
|
string,
|
|
54
54
|
string,
|
|
55
55
|
string
|
|
56
56
|
], VestingContractReceiverUpdatedEventObject>;
|
|
57
|
-
export
|
|
57
|
+
export type VestingContractReceiverUpdatedEventFilter = TypedEventFilter<VestingContractReceiverUpdatedEvent>;
|
|
58
58
|
export interface ITokenDistributorEvents extends BaseContract {
|
|
59
59
|
connect(signerOrProvider: Signer | Provider | string): this;
|
|
60
60
|
attach(addressOrName: string): this;
|
package/lib/types/factories/@gearbox-protocol/core-v2/contracts/pool/PoolService__factory.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Signer, ContractFactory, BigNumberish, Overrides } from "ethers";
|
|
2
2
|
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
3
3
|
import type { PoolService, PoolServiceInterface } from "../../../../../@gearbox-protocol/core-v2/contracts/pool/PoolService";
|
|
4
|
-
|
|
4
|
+
type PoolServiceConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
|
|
5
5
|
export declare class PoolService__factory extends ContractFactory {
|
|
6
6
|
constructor(...args: PoolServiceConstructorParams);
|
|
7
7
|
deploy(_addressProvider: string, _underlyingToken: string, _interestRateModelAddress: string, _expectedLiquidityLimit: BigNumberish, overrides?: Overrides & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Signer, ContractFactory, Overrides } from "ethers";
|
|
2
2
|
import type { Provider, TransactionRequest } from "@ethersproject/providers";
|
|
3
3
|
import type { Multicall2, Multicall2Interface } from "../../../../contracts/support/MultiCall.sol/Multicall2";
|
|
4
|
-
|
|
4
|
+
type Multicall2ConstructorParams = [signer?: Signer] | ConstructorParameters<typeof ContractFactory>;
|
|
5
5
|
export declare class Multicall2__factory extends ContractFactory {
|
|
6
6
|
constructor(...args: Multicall2ConstructorParams);
|
|
7
7
|
deploy(overrides?: Overrides & {
|
package/lib/utils/mappers.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
type SupportedValue = string | number;
|
|
2
2
|
declare const objectEntries: <K extends SupportedValue, T>(o: Record<K, T>) => [K, T][];
|
|
3
3
|
declare const swapKeyValue: <K extends SupportedValue, T extends SupportedValue>(o: Record<K, T>) => Record<T, K>;
|
|
4
4
|
declare const keyToLowercase: <K extends SupportedValue, T>(o: Record<K, T>) => Record<K, T>;
|
package/lib/utils/multicall.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/lib/utils/repeater.js
CHANGED
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
package/lib/utils/types.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
export
|
|
1
|
+
export type PartialRecord<K extends keyof any, T> = {
|
|
2
2
|
[P in K]?: T;
|
|
3
3
|
};
|
|
4
|
-
export
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
export
|
|
4
|
+
export type AwaitedRes<T extends (...args: any) => any> = Awaited<ReturnType<T>>;
|
|
5
|
+
type ArrayMethodKeys = keyof [] & {};
|
|
6
|
+
type NonArrayKeys<T> = T extends `${number}` | number | ArrayMethodKeys ? never : T;
|
|
7
|
+
export type ExcludeArrayProps<T> = {
|
|
8
8
|
[K in keyof T as NonArrayKeys<K>]: T[K];
|
|
9
9
|
};
|
|
10
10
|
export {};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { providers, Signer } from "ethers";
|
|
2
2
|
import { CreditAccountData } from "../core/creditAccount";
|
|
3
3
|
import { CreditManagerData } from "../core/creditManager";
|
|
4
|
-
export
|
|
4
|
+
export type CreditAccountHash = string;
|
|
5
5
|
export interface CreditManagerUpdate {
|
|
6
6
|
updated: Array<CreditAccountHash>;
|
|
7
7
|
deleted: Array<CreditAccountHash>;
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|
|
@@ -14,7 +14,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
14
14
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
15
|
function step(op) {
|
|
16
16
|
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
18
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
19
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
20
|
switch (op[0]) {
|