@gearbox-protocol/sdk 1.1.0 → 1.2.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.
Files changed (98) hide show
  1. package/lib/core/creditManager.d.ts +5 -0
  2. package/lib/core/creditManager.js +5 -0
  3. package/lib/pathfinder/path.js +5 -5
  4. package/lib/payload/creditManager.d.ts +5 -0
  5. package/lib/strategies/creditFacade.js +1 -1
  6. package/lib/types/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator.d.ts +271 -20
  7. package/lib/types/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents.d.ts +8 -19
  8. package/lib/types/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended.d.ts +9 -9
  9. package/lib/types/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2.d.ts +52 -116
  10. package/lib/types/contracts/interfaces/IDataCompressor.sol/IDataCompressor.d.ts +26 -1
  11. package/lib/types/contracts/interfaces/IDegenNFT.sol/IDegenNFT.d.ts +10 -10
  12. package/lib/types/contracts/interfaces/V1/ICreditFilter.d.ts +3 -3
  13. package/lib/types/contracts/interfaces/adapters/convex/IConvexV1BoosterAdapter.d.ts +1 -9
  14. package/lib/types/contracts/pathfinder/index.d.ts +0 -1
  15. package/lib/types/contracts/pathfinder/interfaces/IClosePathResolver.d.ts +125 -0
  16. package/lib/types/contracts/pathfinder/{ISwapper.js → interfaces/IClosePathResolver.js} +0 -0
  17. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor.d.ts +159 -0
  18. package/lib/types/contracts/pathfinder/interfaces/{ISwapPathFinder.js → IDepositor.sol/IDepositor.js} +0 -0
  19. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.d.ts +165 -0
  20. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions.js +2 -0
  21. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/index.d.ts +2 -0
  22. package/lib/types/contracts/pathfinder/interfaces/IDepositor.sol/index.js +2 -0
  23. package/lib/types/contracts/pathfinder/interfaces/IGasPricer.d.ts +44 -0
  24. package/lib/types/contracts/pathfinder/interfaces/IGasPricer.js +2 -0
  25. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.d.ts +113 -0
  26. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker.js +2 -0
  27. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.d.ts +119 -0
  28. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions.js +2 -0
  29. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/index.d.ts +2 -0
  30. package/lib/types/contracts/pathfinder/interfaces/ILPWorker.sol/index.js +2 -0
  31. package/lib/types/contracts/pathfinder/interfaces/IPathFinder.d.ts +210 -0
  32. package/lib/types/contracts/pathfinder/interfaces/IPathFinder.js +2 -0
  33. package/lib/types/contracts/pathfinder/interfaces/IPathResolver.d.ts +131 -0
  34. package/lib/types/contracts/pathfinder/interfaces/IPathResolver.js +2 -0
  35. package/lib/types/contracts/pathfinder/interfaces/{ISwapPathFinder.d.ts → ISwapAggregator.d.ts} +98 -14
  36. package/lib/types/contracts/pathfinder/interfaces/ISwapAggregator.js +2 -0
  37. package/lib/types/contracts/pathfinder/{ISwapper.d.ts → interfaces/ISwapper.d.ts} +1 -1
  38. package/lib/types/contracts/pathfinder/interfaces/ISwapper.js +2 -0
  39. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.d.ts +144 -0
  40. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer.js +2 -0
  41. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.d.ts +160 -0
  42. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions.js +2 -0
  43. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/index.d.ts +2 -0
  44. package/lib/types/contracts/pathfinder/interfaces/IWithdrawer.sol/index.js +2 -0
  45. package/lib/types/contracts/pathfinder/interfaces/index.d.ts +12 -1
  46. package/lib/types/factories/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents__factory.js +1 -14
  47. package/lib/types/factories/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorExceptions__factory.js +2 -17
  48. package/lib/types/factories/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator__factory.js +240 -31
  49. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExceptions__factory.js +7 -2
  50. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacadeExtended__factory.js +1 -1
  51. package/lib/types/factories/contracts/interfaces/ICreditFacade.sol/ICreditFacade__factory.js +7 -2
  52. package/lib/types/factories/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2Exceptions__factory.js +2 -2
  53. package/lib/types/factories/contracts/interfaces/ICreditManagerV2.sol/ICreditManagerV2__factory.js +41 -84
  54. package/lib/types/factories/contracts/interfaces/IDataCompressor.sol/IDataCompressor__factory.d.ts +14 -14
  55. package/lib/types/factories/contracts/interfaces/IDataCompressor.sol/IDataCompressor__factory.js +74 -0
  56. package/lib/types/factories/contracts/interfaces/IDegenNFT.sol/IDegenNFT__factory.js +4 -4
  57. package/lib/types/factories/contracts/interfaces/V1/ICreditFilter__factory.js +1 -1
  58. package/lib/types/factories/contracts/interfaces/adapters/convex/IConvexV1BoosterAdapter__factory.js +0 -13
  59. package/lib/types/factories/contracts/pathfinder/index.d.ts +0 -1
  60. package/lib/types/factories/contracts/pathfinder/index.js +1 -3
  61. package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.d.ts +57 -0
  62. package/lib/types/factories/contracts/pathfinder/interfaces/IClosePathResolver__factory.js +264 -0
  63. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.d.ts +62 -0
  64. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositorOptions__factory.js +717 -0
  65. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.d.ts +62 -0
  66. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/IDepositor__factory.js +702 -0
  67. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/index.d.ts +2 -0
  68. package/lib/types/factories/contracts/pathfinder/interfaces/IDepositor.sol/index.js +10 -0
  69. package/lib/types/factories/contracts/pathfinder/interfaces/IGasPricer__factory.d.ts +22 -0
  70. package/lib/types/factories/contracts/pathfinder/interfaces/IGasPricer__factory.js +41 -0
  71. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.d.ts +62 -0
  72. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorkerOptions__factory.js +252 -0
  73. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.d.ts +62 -0
  74. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/ILPWorker__factory.js +247 -0
  75. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/index.d.ts +2 -0
  76. package/lib/types/factories/contracts/pathfinder/interfaces/ILPWorker.sol/index.js +10 -0
  77. package/lib/types/factories/contracts/pathfinder/interfaces/{ISwapPathFinder__factory.d.ts → IPathFinder__factory.d.ts} +42 -28
  78. package/lib/types/factories/contracts/pathfinder/interfaces/IPathFinder__factory.js +483 -0
  79. package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.d.ts +57 -0
  80. package/lib/types/factories/contracts/pathfinder/interfaces/IPathResolver__factory.js +467 -0
  81. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.d.ts +62 -0
  82. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapAggregator__factory.js +782 -0
  83. package/lib/types/factories/contracts/pathfinder/{ISwapper__factory.d.ts → interfaces/ISwapper__factory.d.ts} +1 -1
  84. package/lib/types/factories/contracts/pathfinder/{ISwapper__factory.js → interfaces/ISwapper__factory.js} +0 -0
  85. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.d.ts +62 -0
  86. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawerOptions__factory.js +729 -0
  87. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.d.ts +62 -0
  88. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/IWithdrawer__factory.js +692 -0
  89. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/index.d.ts +2 -0
  90. package/lib/types/factories/contracts/pathfinder/interfaces/IWithdrawer.sol/index.js +10 -0
  91. package/lib/types/factories/contracts/pathfinder/interfaces/index.d.ts +9 -1
  92. package/lib/types/factories/contracts/pathfinder/interfaces/index.js +39 -3
  93. package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.d.ts +1 -1
  94. package/lib/types/factories/contracts/support/MultiCall.sol/Multicall2__factory.js +1 -1
  95. package/lib/types/index.d.ts +24 -4
  96. package/lib/types/index.js +24 -4
  97. package/package.json +2 -2
  98. package/lib/types/factories/contracts/pathfinder/interfaces/ISwapPathFinder__factory.js +0 -346
@@ -0,0 +1,165 @@
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 declare type BalanceStruct = {
6
+ token: string;
7
+ balance: BigNumberish;
8
+ };
9
+ export declare type BalanceStructOutput = [string, BigNumber] & {
10
+ token: string;
11
+ balance: BigNumber;
12
+ };
13
+ export declare type TokenAdaptersStruct = {
14
+ token: string;
15
+ adapters: string[];
16
+ };
17
+ export declare type TokenAdaptersStructOutput = [string, string[]] & {
18
+ token: string;
19
+ adapters: string[];
20
+ };
21
+ export declare type MultiCallStruct = {
22
+ target: string;
23
+ callData: BytesLike;
24
+ };
25
+ export declare type MultiCallStructOutput = [string, string] & {
26
+ target: string;
27
+ callData: string;
28
+ };
29
+ export declare type StrategyPathTaskStruct = {
30
+ creditAccount: string;
31
+ balances: BalanceStruct[];
32
+ target: string;
33
+ connectors: string[];
34
+ adapters: string[];
35
+ slippage: BigNumberish;
36
+ targetType: BigNumberish;
37
+ foundAdapters: TokenAdaptersStruct[];
38
+ gasPriceTargetRAY: BigNumberish;
39
+ gasUsage: BigNumberish;
40
+ initTargetBalance: BigNumberish;
41
+ calls: MultiCallStruct[];
42
+ };
43
+ export declare type StrategyPathTaskStructOutput = [
44
+ string,
45
+ BalanceStructOutput[],
46
+ string,
47
+ string[],
48
+ string[],
49
+ BigNumber,
50
+ number,
51
+ TokenAdaptersStructOutput[],
52
+ BigNumber,
53
+ BigNumber,
54
+ BigNumber,
55
+ MultiCallStructOutput[]
56
+ ] & {
57
+ creditAccount: string;
58
+ balances: BalanceStructOutput[];
59
+ target: string;
60
+ connectors: string[];
61
+ adapters: string[];
62
+ slippage: BigNumber;
63
+ targetType: number;
64
+ foundAdapters: TokenAdaptersStructOutput[];
65
+ gasPriceTargetRAY: BigNumber;
66
+ gasUsage: BigNumber;
67
+ initTargetBalance: BigNumber;
68
+ calls: MultiCallStructOutput[];
69
+ };
70
+ export interface IDepositorOptionsInterface extends utils.Interface {
71
+ functions: {
72
+ "deposit(uint8,address,uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address[])[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
73
+ "depositAll(address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address[])[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
74
+ "getUnderlyings(uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address[])[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
75
+ };
76
+ getFunction(nameOrSignatureOrTopic: "deposit" | "depositAll" | "getUnderlyings"): FunctionFragment;
77
+ encodeFunctionData(functionFragment: "deposit", values: [BigNumberish, string, BigNumberish, string, StrategyPathTaskStruct]): string;
78
+ encodeFunctionData(functionFragment: "depositAll", values: [string, StrategyPathTaskStruct]): string;
79
+ encodeFunctionData(functionFragment: "getUnderlyings", values: [BigNumberish, string, StrategyPathTaskStruct]): string;
80
+ decodeFunctionResult(functionFragment: "deposit", data: BytesLike): Result;
81
+ decodeFunctionResult(functionFragment: "depositAll", data: BytesLike): Result;
82
+ decodeFunctionResult(functionFragment: "getUnderlyings", data: BytesLike): Result;
83
+ events: {};
84
+ }
85
+ export interface IDepositorOptions extends BaseContract {
86
+ connect(signerOrProvider: Signer | Provider | string): this;
87
+ attach(addressOrName: string): this;
88
+ deployed(): Promise<this>;
89
+ interface: IDepositorOptionsInterface;
90
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
91
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
92
+ listeners(eventName?: string): Array<Listener>;
93
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
94
+ removeAllListeners(eventName?: string): this;
95
+ off: OnEvent<this>;
96
+ on: OnEvent<this>;
97
+ once: OnEvent<this>;
98
+ removeListener: OnEvent<this>;
99
+ functions: {
100
+ deposit(ttIn: BigNumberish, tokenIn: string, amount: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
101
+ BigNumber,
102
+ StrategyPathTaskStructOutput
103
+ ] & {
104
+ amountOut: BigNumber;
105
+ }>;
106
+ depositAll(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
107
+ BigNumber,
108
+ StrategyPathTaskStructOutput
109
+ ] & {
110
+ amountOut: BigNumber;
111
+ }>;
112
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
113
+ string[],
114
+ StrategyPathTaskStructOutput
115
+ ] & {
116
+ tokensIn: string[];
117
+ }>;
118
+ };
119
+ deposit(ttIn: BigNumberish, tokenIn: string, amount: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
120
+ BigNumber,
121
+ StrategyPathTaskStructOutput
122
+ ] & {
123
+ amountOut: BigNumber;
124
+ }>;
125
+ depositAll(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
126
+ BigNumber,
127
+ StrategyPathTaskStructOutput
128
+ ] & {
129
+ amountOut: BigNumber;
130
+ }>;
131
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[string[], StrategyPathTaskStructOutput] & {
132
+ tokensIn: string[];
133
+ }>;
134
+ callStatic: {
135
+ deposit(ttIn: BigNumberish, tokenIn: string, amount: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
136
+ BigNumber,
137
+ StrategyPathTaskStructOutput
138
+ ] & {
139
+ amountOut: BigNumber;
140
+ }>;
141
+ depositAll(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
142
+ BigNumber,
143
+ StrategyPathTaskStructOutput
144
+ ] & {
145
+ amountOut: BigNumber;
146
+ }>;
147
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
148
+ string[],
149
+ StrategyPathTaskStructOutput
150
+ ] & {
151
+ tokensIn: string[];
152
+ }>;
153
+ };
154
+ filters: {};
155
+ estimateGas: {
156
+ deposit(ttIn: BigNumberish, tokenIn: string, amount: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<BigNumber>;
157
+ depositAll(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<BigNumber>;
158
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<BigNumber>;
159
+ };
160
+ populateTransaction: {
161
+ deposit(ttIn: BigNumberish, tokenIn: string, amount: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
162
+ depositAll(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
163
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
164
+ };
165
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type { IDepositor } from "./IDepositor";
2
+ export type { IDepositorOptions } from "./IDepositorOptions";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,44 @@
1
+ import type { BaseContract, BigNumber, 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 IGasPricerInterface extends utils.Interface {
6
+ functions: {
7
+ "getGasPriceTokenOutRAY(address)": FunctionFragment;
8
+ };
9
+ getFunction(nameOrSignatureOrTopic: "getGasPriceTokenOutRAY"): FunctionFragment;
10
+ encodeFunctionData(functionFragment: "getGasPriceTokenOutRAY", values: [string]): string;
11
+ decodeFunctionResult(functionFragment: "getGasPriceTokenOutRAY", data: BytesLike): Result;
12
+ events: {};
13
+ }
14
+ export interface IGasPricer extends BaseContract {
15
+ connect(signerOrProvider: Signer | Provider | string): this;
16
+ attach(addressOrName: string): this;
17
+ deployed(): Promise<this>;
18
+ interface: IGasPricerInterface;
19
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
20
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
21
+ listeners(eventName?: string): Array<Listener>;
22
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
23
+ removeAllListeners(eventName?: string): this;
24
+ off: OnEvent<this>;
25
+ on: OnEvent<this>;
26
+ once: OnEvent<this>;
27
+ removeListener: OnEvent<this>;
28
+ functions: {
29
+ getGasPriceTokenOutRAY(token: string, overrides?: CallOverrides): Promise<[BigNumber] & {
30
+ gasPrice: BigNumber;
31
+ }>;
32
+ };
33
+ getGasPriceTokenOutRAY(token: string, overrides?: CallOverrides): Promise<BigNumber>;
34
+ callStatic: {
35
+ getGasPriceTokenOutRAY(token: string, overrides?: CallOverrides): Promise<BigNumber>;
36
+ };
37
+ filters: {};
38
+ estimateGas: {
39
+ getGasPriceTokenOutRAY(token: string, overrides?: CallOverrides): Promise<BigNumber>;
40
+ };
41
+ populateTransaction: {
42
+ getGasPriceTokenOutRAY(token: string, overrides?: CallOverrides): Promise<PopulatedTransaction>;
43
+ };
44
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,113 @@
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 declare type BalanceStruct = {
6
+ token: string;
7
+ balance: BigNumberish;
8
+ };
9
+ export declare type BalanceStructOutput = [string, BigNumber] & {
10
+ token: string;
11
+ balance: BigNumber;
12
+ };
13
+ export declare type TokenAdaptersStruct = {
14
+ token: string;
15
+ adapters: string[];
16
+ };
17
+ export declare type TokenAdaptersStructOutput = [string, string[]] & {
18
+ token: string;
19
+ adapters: string[];
20
+ };
21
+ export declare type MultiCallStruct = {
22
+ target: string;
23
+ callData: BytesLike;
24
+ };
25
+ export declare type MultiCallStructOutput = [string, string] & {
26
+ target: string;
27
+ callData: string;
28
+ };
29
+ export declare type StrategyPathTaskStruct = {
30
+ creditAccount: string;
31
+ balances: BalanceStruct[];
32
+ target: string;
33
+ connectors: string[];
34
+ adapters: string[];
35
+ slippage: BigNumberish;
36
+ targetType: BigNumberish;
37
+ foundAdapters: TokenAdaptersStruct[];
38
+ gasPriceTargetRAY: BigNumberish;
39
+ gasUsage: BigNumberish;
40
+ initTargetBalance: BigNumberish;
41
+ calls: MultiCallStruct[];
42
+ };
43
+ export declare type StrategyPathTaskStructOutput = [
44
+ string,
45
+ BalanceStructOutput[],
46
+ string,
47
+ string[],
48
+ string[],
49
+ BigNumber,
50
+ number,
51
+ TokenAdaptersStructOutput[],
52
+ BigNumber,
53
+ BigNumber,
54
+ BigNumber,
55
+ MultiCallStructOutput[]
56
+ ] & {
57
+ creditAccount: string;
58
+ balances: BalanceStructOutput[];
59
+ target: string;
60
+ connectors: string[];
61
+ adapters: string[];
62
+ slippage: BigNumber;
63
+ targetType: number;
64
+ foundAdapters: TokenAdaptersStructOutput[];
65
+ gasPriceTargetRAY: BigNumber;
66
+ gasUsage: BigNumber;
67
+ initTargetBalance: BigNumber;
68
+ calls: MultiCallStructOutput[];
69
+ };
70
+ export interface ILPWorkerInterface extends utils.Interface {
71
+ functions: {
72
+ "getUnderlying(address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address[])[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
73
+ };
74
+ getFunction(nameOrSignatureOrTopic: "getUnderlying"): FunctionFragment;
75
+ encodeFunctionData(functionFragment: "getUnderlying", values: [string, StrategyPathTaskStruct]): string;
76
+ decodeFunctionResult(functionFragment: "getUnderlying", data: BytesLike): Result;
77
+ events: {};
78
+ }
79
+ export interface ILPWorker extends BaseContract {
80
+ connect(signerOrProvider: Signer | Provider | string): this;
81
+ attach(addressOrName: string): this;
82
+ deployed(): Promise<this>;
83
+ interface: ILPWorkerInterface;
84
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
85
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
86
+ listeners(eventName?: string): Array<Listener>;
87
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
88
+ removeAllListeners(eventName?: string): this;
89
+ off: OnEvent<this>;
90
+ on: OnEvent<this>;
91
+ once: OnEvent<this>;
92
+ removeListener: OnEvent<this>;
93
+ functions: {
94
+ getUnderlying(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[string, StrategyPathTaskStructOutput] & {
95
+ tokenIn: string;
96
+ }>;
97
+ };
98
+ getUnderlying(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[string, StrategyPathTaskStructOutput] & {
99
+ tokenIn: string;
100
+ }>;
101
+ callStatic: {
102
+ getUnderlying(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[string, StrategyPathTaskStructOutput] & {
103
+ tokenIn: string;
104
+ }>;
105
+ };
106
+ filters: {};
107
+ estimateGas: {
108
+ getUnderlying(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<BigNumber>;
109
+ };
110
+ populateTransaction: {
111
+ getUnderlying(tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
112
+ };
113
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,119 @@
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 declare type BalanceStruct = {
6
+ token: string;
7
+ balance: BigNumberish;
8
+ };
9
+ export declare type BalanceStructOutput = [string, BigNumber] & {
10
+ token: string;
11
+ balance: BigNumber;
12
+ };
13
+ export declare type TokenAdaptersStruct = {
14
+ token: string;
15
+ adapters: string[];
16
+ };
17
+ export declare type TokenAdaptersStructOutput = [string, string[]] & {
18
+ token: string;
19
+ adapters: string[];
20
+ };
21
+ export declare type MultiCallStruct = {
22
+ target: string;
23
+ callData: BytesLike;
24
+ };
25
+ export declare type MultiCallStructOutput = [string, string] & {
26
+ target: string;
27
+ callData: string;
28
+ };
29
+ export declare type StrategyPathTaskStruct = {
30
+ creditAccount: string;
31
+ balances: BalanceStruct[];
32
+ target: string;
33
+ connectors: string[];
34
+ adapters: string[];
35
+ slippage: BigNumberish;
36
+ targetType: BigNumberish;
37
+ foundAdapters: TokenAdaptersStruct[];
38
+ gasPriceTargetRAY: BigNumberish;
39
+ gasUsage: BigNumberish;
40
+ initTargetBalance: BigNumberish;
41
+ calls: MultiCallStruct[];
42
+ };
43
+ export declare type StrategyPathTaskStructOutput = [
44
+ string,
45
+ BalanceStructOutput[],
46
+ string,
47
+ string[],
48
+ string[],
49
+ BigNumber,
50
+ number,
51
+ TokenAdaptersStructOutput[],
52
+ BigNumber,
53
+ BigNumber,
54
+ BigNumber,
55
+ MultiCallStructOutput[]
56
+ ] & {
57
+ creditAccount: string;
58
+ balances: BalanceStructOutput[];
59
+ target: string;
60
+ connectors: string[];
61
+ adapters: string[];
62
+ slippage: BigNumber;
63
+ targetType: number;
64
+ foundAdapters: TokenAdaptersStructOutput[];
65
+ gasPriceTargetRAY: BigNumber;
66
+ gasUsage: BigNumber;
67
+ initTargetBalance: BigNumber;
68
+ calls: MultiCallStructOutput[];
69
+ };
70
+ export interface ILPWorkerOptionsInterface extends utils.Interface {
71
+ functions: {
72
+ "getUnderlyings(uint8,address,(address,(address,uint256)[],address,address[],address[],uint256,uint8,(address,address[])[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
73
+ };
74
+ getFunction(nameOrSignatureOrTopic: "getUnderlyings"): FunctionFragment;
75
+ encodeFunctionData(functionFragment: "getUnderlyings", values: [BigNumberish, string, StrategyPathTaskStruct]): string;
76
+ decodeFunctionResult(functionFragment: "getUnderlyings", data: BytesLike): Result;
77
+ events: {};
78
+ }
79
+ export interface ILPWorkerOptions extends BaseContract {
80
+ connect(signerOrProvider: Signer | Provider | string): this;
81
+ attach(addressOrName: string): this;
82
+ deployed(): Promise<this>;
83
+ interface: ILPWorkerOptionsInterface;
84
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
85
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
86
+ listeners(eventName?: string): Array<Listener>;
87
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
88
+ removeAllListeners(eventName?: string): this;
89
+ off: OnEvent<this>;
90
+ on: OnEvent<this>;
91
+ once: OnEvent<this>;
92
+ removeListener: OnEvent<this>;
93
+ functions: {
94
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
95
+ string[],
96
+ StrategyPathTaskStructOutput
97
+ ] & {
98
+ tokensIn: string[];
99
+ }>;
100
+ };
101
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[string[], StrategyPathTaskStructOutput] & {
102
+ tokensIn: string[];
103
+ }>;
104
+ callStatic: {
105
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
106
+ string[],
107
+ StrategyPathTaskStructOutput
108
+ ] & {
109
+ tokensIn: string[];
110
+ }>;
111
+ };
112
+ filters: {};
113
+ estimateGas: {
114
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<BigNumber>;
115
+ };
116
+ populateTransaction: {
117
+ getUnderlyings(ttIn: BigNumberish, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<PopulatedTransaction>;
118
+ };
119
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,2 @@
1
+ export type { ILPWorker } from "./ILPWorker";
2
+ export type { ILPWorkerOptions } from "./ILPWorkerOptions";
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });