@pendle/core-v2 2.17.1-tradingbot → 2.17.3-tradingbot
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.dbg.json +1 -1
- package/build/artifacts/contracts/core/TradingBot/BotActionCallback.sol/BotActionCallback.json +15 -8
- package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.dbg.json +1 -1
- package/build/artifacts/contracts/core/TradingBot/BotActionHelper.sol/BotActionHelper.json +15 -8
- package/build/artifacts/contracts/core/TradingBot/BotDecisionLib.sol/BotDecisionLib.dbg.json +1 -1
- package/build/artifacts/contracts/core/TradingBot/BotDecisionLib.sol/BotDecisionLib.json +560 -3
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.dbg.json +1 -1
- package/build/artifacts/contracts/core/TradingBot/LongYieldTradingBot.sol/LongYieldTradingBot.json +77 -78
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.dbg.json +1 -1
- package/build/artifacts/contracts/core/TradingBot/TradingBotBase.sol/TradingBotBase.json +15 -8
- package/build/artifacts/contracts/core/TradingBot/TradingBotOffchain.sol/TradingBotOffchain.dbg.json +1 -1
- package/build/artifacts/contracts/core/TradingBot/TradingBotOffchain.sol/TradingBotOffchain.json +30 -48
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol/ILongYieldTradingBot.json +15 -0
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.dbg.json +1 -1
- package/build/artifacts/contracts/interfaces/TradingBot/ITradingBotBase.sol/ITradingBotBase.json +0 -18
- package/contracts/core/TradingBot/BotActionHelper.sol +4 -2
- package/contracts/core/TradingBot/LongYieldTradingBot.sol +2 -2
- package/contracts/interfaces/TradingBot/ILongYieldTradingBot.sol +1 -1
- package/package.json +1 -1
- package/typechain-types/BotActionCallback.ts +16 -12
- package/typechain-types/BotActionHelper.ts +16 -12
- package/typechain-types/BotDecisionLib.ts +330 -0
- package/typechain-types/ILongYieldTradingBot.ts +15 -3
- package/typechain-types/ITradingBotBase.ts +0 -36
- package/typechain-types/LongYieldTradingBot.ts +79 -37
- package/typechain-types/TradingBotBase.ts +16 -12
- package/typechain-types/TradingBotOffchain.ts +19 -0
- package/typechain-types/factories/BotActionCallback__factory.ts +15 -8
- package/typechain-types/factories/BotActionHelper__factory.ts +15 -8
- package/typechain-types/factories/BotDecisionLib__factory.ts +620 -0
- package/typechain-types/factories/ILongYieldTradingBot__factory.ts +15 -0
- package/typechain-types/factories/ITradingBotBase__factory.ts +0 -18
- package/typechain-types/factories/LongYieldTradingBot__factory.ts +80 -82
- package/typechain-types/factories/TradingBotBase__factory.ts +15 -8
- package/typechain-types/factories/TradingBotOffchain__factory.ts +36 -49
- package/typechain-types/hardhat.d.ts +9 -0
- package/typechain-types/index.ts +2 -0
|
@@ -23,25 +23,6 @@ import type {
|
|
|
23
23
|
OnEvent,
|
|
24
24
|
} from "./common";
|
|
25
25
|
|
|
26
|
-
export type LongTradingSpecsStruct = {
|
|
27
|
-
lowerIyLimit: BigNumberish;
|
|
28
|
-
upperIyLimit: BigNumberish;
|
|
29
|
-
floatingSyRatioLimit: BigNumberish;
|
|
30
|
-
ytPtRatioLimit: BigNumberish;
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
export type LongTradingSpecsStructOutput = [
|
|
34
|
-
BigNumber,
|
|
35
|
-
BigNumber,
|
|
36
|
-
BigNumber,
|
|
37
|
-
BigNumber
|
|
38
|
-
] & {
|
|
39
|
-
lowerIyLimit: BigNumber;
|
|
40
|
-
upperIyLimit: BigNumber;
|
|
41
|
-
floatingSyRatioLimit: BigNumber;
|
|
42
|
-
ytPtRatioLimit: BigNumber;
|
|
43
|
-
};
|
|
44
|
-
|
|
45
26
|
export type StrategyStateStruct = {
|
|
46
27
|
iyFlag: BigNumberish;
|
|
47
28
|
syRatioFlag: BigNumberish;
|
|
@@ -113,6 +94,25 @@ export type TokenInputStructOutput = [
|
|
|
113
94
|
swapData: SwapDataStructOutput;
|
|
114
95
|
};
|
|
115
96
|
|
|
97
|
+
export type LongTradingSpecsStruct = {
|
|
98
|
+
lowerIyLimit: BigNumberish;
|
|
99
|
+
upperIyLimit: BigNumberish;
|
|
100
|
+
floatingSyRatioLimit: BigNumberish;
|
|
101
|
+
ytPtRatioLimit: BigNumberish;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
export type LongTradingSpecsStructOutput = [
|
|
105
|
+
BigNumber,
|
|
106
|
+
BigNumber,
|
|
107
|
+
BigNumber,
|
|
108
|
+
BigNumber
|
|
109
|
+
] & {
|
|
110
|
+
lowerIyLimit: BigNumber;
|
|
111
|
+
upperIyLimit: BigNumber;
|
|
112
|
+
floatingSyRatioLimit: BigNumber;
|
|
113
|
+
ytPtRatioLimit: BigNumber;
|
|
114
|
+
};
|
|
115
|
+
|
|
116
116
|
export type BotStateStruct = {
|
|
117
117
|
lpBalance: BigNumberish;
|
|
118
118
|
ytBalance: BigNumberish;
|
|
@@ -171,6 +171,15 @@ export type MarketExtStateStructOutput = [
|
|
|
171
171
|
BigNumber
|
|
172
172
|
] & { state: MarketStateStructOutput; index: BigNumber; blockTime: BigNumber };
|
|
173
173
|
|
|
174
|
+
export declare namespace ITradingBotBase {
|
|
175
|
+
export type MultiApprovalStruct = { tokens: string[]; spender: string };
|
|
176
|
+
|
|
177
|
+
export type MultiApprovalStructOutput = [string[], string] & {
|
|
178
|
+
tokens: string[];
|
|
179
|
+
spender: string;
|
|
180
|
+
};
|
|
181
|
+
}
|
|
182
|
+
|
|
174
183
|
export interface LongYieldTradingBotInterface extends utils.Interface {
|
|
175
184
|
contractName: "LongYieldTradingBot";
|
|
176
185
|
functions: {
|
|
@@ -181,12 +190,13 @@ export interface LongYieldTradingBotInterface extends utils.Interface {
|
|
|
181
190
|
"addLiqFromSy((uint8,uint8),(uint256,uint256,uint256,uint256,uint256),uint256,uint256)": FunctionFragment;
|
|
182
191
|
"addLiqFromYt((uint8,uint8),(uint256,uint256,uint256,uint256,uint256),uint256,uint256)": FunctionFragment;
|
|
183
192
|
"addLiqKeepYt(address,(uint8,uint8),(uint256,uint256,uint256,uint256,uint256),uint256,uint256,uint256)": FunctionFragment;
|
|
184
|
-
"approveInf(address,address)": FunctionFragment;
|
|
193
|
+
"approveInf((address[],address)[])": FunctionFragment;
|
|
185
194
|
"claimAndCompound(address,(address,uint256,address,address,address,(uint8,address,bytes,bool))[],uint256)": FunctionFragment;
|
|
186
195
|
"claimOwnership()": FunctionFragment;
|
|
196
|
+
"decisionLib()": FunctionFragment;
|
|
187
197
|
"depositSy(uint256)": FunctionFragment;
|
|
188
198
|
"depositToken(address,(address,uint256,address,address,address,(uint8,address,bytes,bool)),uint256)": FunctionFragment;
|
|
189
|
-
"initialize()": FunctionFragment;
|
|
199
|
+
"initialize((uint256,uint256,uint256,uint256))": FunctionFragment;
|
|
190
200
|
"market()": FunctionFragment;
|
|
191
201
|
"owner()": FunctionFragment;
|
|
192
202
|
"pendingOwner()": FunctionFragment;
|
|
@@ -239,7 +249,7 @@ export interface LongYieldTradingBotInterface extends utils.Interface {
|
|
|
239
249
|
): string;
|
|
240
250
|
encodeFunctionData(
|
|
241
251
|
functionFragment: "approveInf",
|
|
242
|
-
values: [
|
|
252
|
+
values: [ITradingBotBase.MultiApprovalStruct[]]
|
|
243
253
|
): string;
|
|
244
254
|
encodeFunctionData(
|
|
245
255
|
functionFragment: "claimAndCompound",
|
|
@@ -249,6 +259,10 @@ export interface LongYieldTradingBotInterface extends utils.Interface {
|
|
|
249
259
|
functionFragment: "claimOwnership",
|
|
250
260
|
values?: undefined
|
|
251
261
|
): string;
|
|
262
|
+
encodeFunctionData(
|
|
263
|
+
functionFragment: "decisionLib",
|
|
264
|
+
values?: undefined
|
|
265
|
+
): string;
|
|
252
266
|
encodeFunctionData(
|
|
253
267
|
functionFragment: "depositSy",
|
|
254
268
|
values: [BigNumberish]
|
|
@@ -259,7 +273,7 @@ export interface LongYieldTradingBotInterface extends utils.Interface {
|
|
|
259
273
|
): string;
|
|
260
274
|
encodeFunctionData(
|
|
261
275
|
functionFragment: "initialize",
|
|
262
|
-
values
|
|
276
|
+
values: [LongTradingSpecsStruct]
|
|
263
277
|
): string;
|
|
264
278
|
encodeFunctionData(functionFragment: "market", values?: undefined): string;
|
|
265
279
|
encodeFunctionData(functionFragment: "owner", values?: undefined): string;
|
|
@@ -347,6 +361,10 @@ export interface LongYieldTradingBotInterface extends utils.Interface {
|
|
|
347
361
|
functionFragment: "claimOwnership",
|
|
348
362
|
data: BytesLike
|
|
349
363
|
): Result;
|
|
364
|
+
decodeFunctionResult(
|
|
365
|
+
functionFragment: "decisionLib",
|
|
366
|
+
data: BytesLike
|
|
367
|
+
): Result;
|
|
350
368
|
decodeFunctionResult(functionFragment: "depositSy", data: BytesLike): Result;
|
|
351
369
|
decodeFunctionResult(
|
|
352
370
|
functionFragment: "depositToken",
|
|
@@ -642,8 +660,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
642
660
|
): Promise<ContractTransaction>;
|
|
643
661
|
|
|
644
662
|
approveInf(
|
|
645
|
-
|
|
646
|
-
spender: string,
|
|
663
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
647
664
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
648
665
|
): Promise<ContractTransaction>;
|
|
649
666
|
|
|
@@ -658,6 +675,8 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
658
675
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
659
676
|
): Promise<ContractTransaction>;
|
|
660
677
|
|
|
678
|
+
decisionLib(overrides?: CallOverrides): Promise<[string]>;
|
|
679
|
+
|
|
661
680
|
depositSy(
|
|
662
681
|
netSyIn: BigNumberish,
|
|
663
682
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -671,6 +690,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
671
690
|
): Promise<ContractTransaction>;
|
|
672
691
|
|
|
673
692
|
initialize(
|
|
693
|
+
_specs: LongTradingSpecsStruct,
|
|
674
694
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
675
695
|
): Promise<ContractTransaction>;
|
|
676
696
|
|
|
@@ -792,8 +812,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
792
812
|
): Promise<ContractTransaction>;
|
|
793
813
|
|
|
794
814
|
approveInf(
|
|
795
|
-
|
|
796
|
-
spender: string,
|
|
815
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
797
816
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
798
817
|
): Promise<ContractTransaction>;
|
|
799
818
|
|
|
@@ -808,6 +827,8 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
808
827
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
809
828
|
): Promise<ContractTransaction>;
|
|
810
829
|
|
|
830
|
+
decisionLib(overrides?: CallOverrides): Promise<string>;
|
|
831
|
+
|
|
811
832
|
depositSy(
|
|
812
833
|
netSyIn: BigNumberish,
|
|
813
834
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -821,6 +842,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
821
842
|
): Promise<ContractTransaction>;
|
|
822
843
|
|
|
823
844
|
initialize(
|
|
845
|
+
_specs: LongTradingSpecsStruct,
|
|
824
846
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
825
847
|
): Promise<ContractTransaction>;
|
|
826
848
|
|
|
@@ -920,7 +942,11 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
920
942
|
maxSyIn: BigNumberish,
|
|
921
943
|
overrides?: CallOverrides
|
|
922
944
|
): Promise<
|
|
923
|
-
[BigNumber, BigNumber] & {
|
|
945
|
+
[BigNumber, BigNumber, BigNumber] & {
|
|
946
|
+
netPtFromSwap: BigNumber;
|
|
947
|
+
netLpOut: BigNumber;
|
|
948
|
+
netSyIn: BigNumber;
|
|
949
|
+
}
|
|
924
950
|
>;
|
|
925
951
|
|
|
926
952
|
addLiqFromYt(
|
|
@@ -930,7 +956,11 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
930
956
|
maxYtIn: BigNumberish,
|
|
931
957
|
overrides?: CallOverrides
|
|
932
958
|
): Promise<
|
|
933
|
-
[BigNumber, BigNumber] & {
|
|
959
|
+
[BigNumber, BigNumber, BigNumber] & {
|
|
960
|
+
netPtFromSwap: BigNumber;
|
|
961
|
+
netLpOut: BigNumber;
|
|
962
|
+
netYtIn: BigNumber;
|
|
963
|
+
}
|
|
934
964
|
>;
|
|
935
965
|
|
|
936
966
|
addLiqKeepYt(
|
|
@@ -950,8 +980,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
950
980
|
>;
|
|
951
981
|
|
|
952
982
|
approveInf(
|
|
953
|
-
|
|
954
|
-
spender: string,
|
|
983
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
955
984
|
overrides?: CallOverrides
|
|
956
985
|
): Promise<void>;
|
|
957
986
|
|
|
@@ -966,6 +995,8 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
966
995
|
|
|
967
996
|
claimOwnership(overrides?: CallOverrides): Promise<void>;
|
|
968
997
|
|
|
998
|
+
decisionLib(overrides?: CallOverrides): Promise<string>;
|
|
999
|
+
|
|
969
1000
|
depositSy(netSyIn: BigNumberish, overrides?: CallOverrides): Promise<void>;
|
|
970
1001
|
|
|
971
1002
|
depositToken(
|
|
@@ -975,7 +1006,10 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
975
1006
|
overrides?: CallOverrides
|
|
976
1007
|
): Promise<void>;
|
|
977
1008
|
|
|
978
|
-
initialize(
|
|
1009
|
+
initialize(
|
|
1010
|
+
_specs: LongTradingSpecsStruct,
|
|
1011
|
+
overrides?: CallOverrides
|
|
1012
|
+
): Promise<void>;
|
|
979
1013
|
|
|
980
1014
|
market(overrides?: CallOverrides): Promise<string>;
|
|
981
1015
|
|
|
@@ -1000,7 +1034,11 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1000
1034
|
minYtOut: BigNumberish,
|
|
1001
1035
|
overrides?: CallOverrides
|
|
1002
1036
|
): Promise<
|
|
1003
|
-
[BigNumber, BigNumber] & {
|
|
1037
|
+
[BigNumber, BigNumber, BigNumber] & {
|
|
1038
|
+
netLpRemoved: BigNumber;
|
|
1039
|
+
netYtOut: BigNumber;
|
|
1040
|
+
totalPtToSwap: BigNumber;
|
|
1041
|
+
}
|
|
1004
1042
|
>;
|
|
1005
1043
|
|
|
1006
1044
|
setSpecs(
|
|
@@ -1236,8 +1274,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1236
1274
|
): Promise<BigNumber>;
|
|
1237
1275
|
|
|
1238
1276
|
approveInf(
|
|
1239
|
-
|
|
1240
|
-
spender: string,
|
|
1277
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
1241
1278
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1242
1279
|
): Promise<BigNumber>;
|
|
1243
1280
|
|
|
@@ -1252,6 +1289,8 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1252
1289
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1253
1290
|
): Promise<BigNumber>;
|
|
1254
1291
|
|
|
1292
|
+
decisionLib(overrides?: CallOverrides): Promise<BigNumber>;
|
|
1293
|
+
|
|
1255
1294
|
depositSy(
|
|
1256
1295
|
netSyIn: BigNumberish,
|
|
1257
1296
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -1265,6 +1304,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1265
1304
|
): Promise<BigNumber>;
|
|
1266
1305
|
|
|
1267
1306
|
initialize(
|
|
1307
|
+
_specs: LongTradingSpecsStruct,
|
|
1268
1308
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1269
1309
|
): Promise<BigNumber>;
|
|
1270
1310
|
|
|
@@ -1376,8 +1416,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1376
1416
|
): Promise<PopulatedTransaction>;
|
|
1377
1417
|
|
|
1378
1418
|
approveInf(
|
|
1379
|
-
|
|
1380
|
-
spender: string,
|
|
1419
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
1381
1420
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1382
1421
|
): Promise<PopulatedTransaction>;
|
|
1383
1422
|
|
|
@@ -1392,6 +1431,8 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1392
1431
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1393
1432
|
): Promise<PopulatedTransaction>;
|
|
1394
1433
|
|
|
1434
|
+
decisionLib(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
1435
|
+
|
|
1395
1436
|
depositSy(
|
|
1396
1437
|
netSyIn: BigNumberish,
|
|
1397
1438
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
@@ -1405,6 +1446,7 @@ export interface LongYieldTradingBot extends BaseContract {
|
|
|
1405
1446
|
): Promise<PopulatedTransaction>;
|
|
1406
1447
|
|
|
1407
1448
|
initialize(
|
|
1449
|
+
_specs: LongTradingSpecsStruct,
|
|
1408
1450
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
1409
1451
|
): Promise<PopulatedTransaction>;
|
|
1410
1452
|
|
|
@@ -120,6 +120,15 @@ export type MarketExtStateStructOutput = [
|
|
|
120
120
|
BigNumber
|
|
121
121
|
] & { state: MarketStateStructOutput; index: BigNumber; blockTime: BigNumber };
|
|
122
122
|
|
|
123
|
+
export declare namespace ITradingBotBase {
|
|
124
|
+
export type MultiApprovalStruct = { tokens: string[]; spender: string };
|
|
125
|
+
|
|
126
|
+
export type MultiApprovalStructOutput = [string[], string] & {
|
|
127
|
+
tokens: string[];
|
|
128
|
+
spender: string;
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
123
132
|
export interface TradingBotBaseInterface extends utils.Interface {
|
|
124
133
|
contractName: "TradingBotBase";
|
|
125
134
|
functions: {
|
|
@@ -127,7 +136,7 @@ export interface TradingBotBaseInterface extends utils.Interface {
|
|
|
127
136
|
"PT()": FunctionFragment;
|
|
128
137
|
"SY()": FunctionFragment;
|
|
129
138
|
"YT()": FunctionFragment;
|
|
130
|
-
"approveInf(address,address)": FunctionFragment;
|
|
139
|
+
"approveInf((address[],address)[])": FunctionFragment;
|
|
131
140
|
"claimAndCompound(address,(address,uint256,address,address,address,(uint8,address,bytes,bool))[],uint256)": FunctionFragment;
|
|
132
141
|
"claimOwnership()": FunctionFragment;
|
|
133
142
|
"depositSy(uint256)": FunctionFragment;
|
|
@@ -147,7 +156,7 @@ export interface TradingBotBaseInterface extends utils.Interface {
|
|
|
147
156
|
encodeFunctionData(functionFragment: "YT", values?: undefined): string;
|
|
148
157
|
encodeFunctionData(
|
|
149
158
|
functionFragment: "approveInf",
|
|
150
|
-
values: [
|
|
159
|
+
values: [ITradingBotBase.MultiApprovalStruct[]]
|
|
151
160
|
): string;
|
|
152
161
|
encodeFunctionData(
|
|
153
162
|
functionFragment: "claimAndCompound",
|
|
@@ -321,8 +330,7 @@ export interface TradingBotBase extends BaseContract {
|
|
|
321
330
|
YT(overrides?: CallOverrides): Promise<[string]>;
|
|
322
331
|
|
|
323
332
|
approveInf(
|
|
324
|
-
|
|
325
|
-
spender: string,
|
|
333
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
326
334
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
327
335
|
): Promise<ContractTransaction>;
|
|
328
336
|
|
|
@@ -387,8 +395,7 @@ export interface TradingBotBase extends BaseContract {
|
|
|
387
395
|
YT(overrides?: CallOverrides): Promise<string>;
|
|
388
396
|
|
|
389
397
|
approveInf(
|
|
390
|
-
|
|
391
|
-
spender: string,
|
|
398
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
392
399
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
393
400
|
): Promise<ContractTransaction>;
|
|
394
401
|
|
|
@@ -451,8 +458,7 @@ export interface TradingBotBase extends BaseContract {
|
|
|
451
458
|
YT(overrides?: CallOverrides): Promise<string>;
|
|
452
459
|
|
|
453
460
|
approveInf(
|
|
454
|
-
|
|
455
|
-
spender: string,
|
|
461
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
456
462
|
overrides?: CallOverrides
|
|
457
463
|
): Promise<void>;
|
|
458
464
|
|
|
@@ -557,8 +563,7 @@ export interface TradingBotBase extends BaseContract {
|
|
|
557
563
|
YT(overrides?: CallOverrides): Promise<BigNumber>;
|
|
558
564
|
|
|
559
565
|
approveInf(
|
|
560
|
-
|
|
561
|
-
spender: string,
|
|
566
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
562
567
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
563
568
|
): Promise<BigNumber>;
|
|
564
569
|
|
|
@@ -622,8 +627,7 @@ export interface TradingBotBase extends BaseContract {
|
|
|
622
627
|
YT(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
623
628
|
|
|
624
629
|
approveInf(
|
|
625
|
-
|
|
626
|
-
spender: string,
|
|
630
|
+
arr: ITradingBotBase.MultiApprovalStruct[],
|
|
627
631
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
628
632
|
): Promise<PopulatedTransaction>;
|
|
629
633
|
|
|
@@ -143,6 +143,7 @@ export interface TradingBotOffchainInterface extends utils.Interface {
|
|
|
143
143
|
functions: {
|
|
144
144
|
"actionToTake((uint8,uint8))": FunctionFragment;
|
|
145
145
|
"claimForBot(address,address)": FunctionFragment;
|
|
146
|
+
"decisionLib()": FunctionFragment;
|
|
146
147
|
"searchForBotParam((uint256,uint256,uint256),((int256,int256,int256,address,int256,uint256,uint256,uint256,uint256),uint256,uint256),(uint256,uint256,uint256,uint256),uint8,(uint8,uint8),(uint256,uint256,uint256,uint256,uint256),(uint256,uint256,uint256,uint256,uint256))": FunctionFragment;
|
|
147
148
|
"searchForIntParam(((int256,int256,int256,address,int256,uint256,uint256,uint256,uint256),uint256,uint256),uint8,uint256,(uint256,uint256,uint256,uint256,uint256))": FunctionFragment;
|
|
148
149
|
"simulateAction((uint256,uint256,uint256),((int256,int256,int256,address,int256,uint256,uint256,uint256,uint256),uint256,uint256),uint8,uint256,(uint256,uint256,uint256,uint256,uint256))": FunctionFragment;
|
|
@@ -158,6 +159,10 @@ export interface TradingBotOffchainInterface extends utils.Interface {
|
|
|
158
159
|
functionFragment: "claimForBot",
|
|
159
160
|
values: [string, string]
|
|
160
161
|
): string;
|
|
162
|
+
encodeFunctionData(
|
|
163
|
+
functionFragment: "decisionLib",
|
|
164
|
+
values?: undefined
|
|
165
|
+
): string;
|
|
161
166
|
encodeFunctionData(
|
|
162
167
|
functionFragment: "searchForBotParam",
|
|
163
168
|
values: [
|
|
@@ -206,6 +211,10 @@ export interface TradingBotOffchainInterface extends utils.Interface {
|
|
|
206
211
|
functionFragment: "claimForBot",
|
|
207
212
|
data: BytesLike
|
|
208
213
|
): Result;
|
|
214
|
+
decodeFunctionResult(
|
|
215
|
+
functionFragment: "decisionLib",
|
|
216
|
+
data: BytesLike
|
|
217
|
+
): Result;
|
|
209
218
|
decodeFunctionResult(
|
|
210
219
|
functionFragment: "searchForBotParam",
|
|
211
220
|
data: BytesLike
|
|
@@ -266,6 +275,8 @@ export interface TradingBotOffchain extends BaseContract {
|
|
|
266
275
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
267
276
|
): Promise<ContractTransaction>;
|
|
268
277
|
|
|
278
|
+
decisionLib(overrides?: CallOverrides): Promise<[string]>;
|
|
279
|
+
|
|
269
280
|
searchForBotParam(
|
|
270
281
|
bot: BotStateStruct,
|
|
271
282
|
marketExt: MarketExtStateStruct,
|
|
@@ -325,6 +336,8 @@ export interface TradingBotOffchain extends BaseContract {
|
|
|
325
336
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
326
337
|
): Promise<ContractTransaction>;
|
|
327
338
|
|
|
339
|
+
decisionLib(overrides?: CallOverrides): Promise<string>;
|
|
340
|
+
|
|
328
341
|
searchForBotParam(
|
|
329
342
|
bot: BotStateStruct,
|
|
330
343
|
marketExt: MarketExtStateStruct,
|
|
@@ -384,6 +397,8 @@ export interface TradingBotOffchain extends BaseContract {
|
|
|
384
397
|
overrides?: CallOverrides
|
|
385
398
|
): Promise<TokenAmountStructOutput[]>;
|
|
386
399
|
|
|
400
|
+
decisionLib(overrides?: CallOverrides): Promise<string>;
|
|
401
|
+
|
|
387
402
|
searchForBotParam(
|
|
388
403
|
bot: BotStateStruct,
|
|
389
404
|
marketExt: MarketExtStateStruct,
|
|
@@ -446,6 +461,8 @@ export interface TradingBotOffchain extends BaseContract {
|
|
|
446
461
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
447
462
|
): Promise<BigNumber>;
|
|
448
463
|
|
|
464
|
+
decisionLib(overrides?: CallOverrides): Promise<BigNumber>;
|
|
465
|
+
|
|
449
466
|
searchForBotParam(
|
|
450
467
|
bot: BotStateStruct,
|
|
451
468
|
marketExt: MarketExtStateStruct,
|
|
@@ -500,6 +517,8 @@ export interface TradingBotOffchain extends BaseContract {
|
|
|
500
517
|
overrides?: Overrides & { from?: string | Promise<string> }
|
|
501
518
|
): Promise<PopulatedTransaction>;
|
|
502
519
|
|
|
520
|
+
decisionLib(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
521
|
+
|
|
503
522
|
searchForBotParam(
|
|
504
523
|
bot: BotStateStruct,
|
|
505
524
|
marketExt: MarketExtStateStruct,
|
|
@@ -210,14 +210,21 @@ const _abi = [
|
|
|
210
210
|
{
|
|
211
211
|
inputs: [
|
|
212
212
|
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
213
|
+
components: [
|
|
214
|
+
{
|
|
215
|
+
internalType: "address[]",
|
|
216
|
+
name: "tokens",
|
|
217
|
+
type: "address[]",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
internalType: "address",
|
|
221
|
+
name: "spender",
|
|
222
|
+
type: "address",
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
internalType: "struct ITradingBotBase.MultiApproval[]",
|
|
226
|
+
name: "arr",
|
|
227
|
+
type: "tuple[]",
|
|
221
228
|
},
|
|
222
229
|
],
|
|
223
230
|
name: "approveInf",
|
|
@@ -210,14 +210,21 @@ const _abi = [
|
|
|
210
210
|
{
|
|
211
211
|
inputs: [
|
|
212
212
|
{
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
213
|
+
components: [
|
|
214
|
+
{
|
|
215
|
+
internalType: "address[]",
|
|
216
|
+
name: "tokens",
|
|
217
|
+
type: "address[]",
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
internalType: "address",
|
|
221
|
+
name: "spender",
|
|
222
|
+
type: "address",
|
|
223
|
+
},
|
|
224
|
+
],
|
|
225
|
+
internalType: "struct ITradingBotBase.MultiApproval[]",
|
|
226
|
+
name: "arr",
|
|
227
|
+
type: "tuple[]",
|
|
221
228
|
},
|
|
222
229
|
],
|
|
223
230
|
name: "approveInf",
|