@gearbox-protocol/sdk 1.11.6 → 1.11.8

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.
@@ -32,7 +32,7 @@ export declare class CreditAccountData {
32
32
  balancesSorted(prices: Record<string, BigNumber>, tokens: Record<string, TokenData>): Array<Asset>;
33
33
  calcBorrowAmountPlusInterestRate(currentCumulativeIndex: BigNumber): BigNumber;
34
34
  updateHealthFactor(creditManager: CreditManagerData, currentCumulativeIndex: BigNumber, priceOracle: PriceOracleData): void;
35
- calcMaxIncreaseBorrow(cm: CreditManagerData): BigNumber;
35
+ static calcMaxIncreaseBorrow(healthFactor: number, borrowAmountPlusInterest: BigNumber, maxLeverageFactor: number, underlyingLT: number): BigNumber;
36
36
  get id(): string;
37
37
  hash(): string;
38
38
  static hash(creditManager: string, borrower: string): string;
@@ -76,15 +76,14 @@ var CreditAccountData = /** @class */ (function () {
76
76
  .div(this.calcBorrowAmountPlusInterestRate(currentCumulativeIndex))
77
77
  .toNumber();
78
78
  };
79
- CreditAccountData.prototype.calcMaxIncreaseBorrow = function (cm) {
80
- var underlyingTokenLT = cm.liquidationDiscount - cm.feeLiquidation;
81
- var minHealthFactor = cm.maxLeverageFactor > 0
82
- ? Math.floor((underlyingTokenLT * (cm.maxLeverageFactor + constants_1.LEVERAGE_DECIMALS)) /
83
- cm.maxLeverageFactor)
79
+ CreditAccountData.calcMaxIncreaseBorrow = function (healthFactor, borrowAmountPlusInterest, maxLeverageFactor, underlyingLT) {
80
+ var minHealthFactor = maxLeverageFactor > 0
81
+ ? Math.floor((underlyingLT * (maxLeverageFactor + constants_1.LEVERAGE_DECIMALS)) /
82
+ maxLeverageFactor)
84
83
  : constants_1.PERCENTAGE_FACTOR;
85
- var result = this.borrowedAmountPlusInterest
86
- .mul(this.healthFactor - minHealthFactor)
87
- .div(minHealthFactor - underlyingTokenLT);
84
+ var result = borrowAmountPlusInterest
85
+ .mul(healthFactor - minHealthFactor)
86
+ .div(minHealthFactor - underlyingLT);
88
87
  return result.isNegative() ? ethers_1.BigNumber.from(0) : result;
89
88
  };
90
89
  Object.defineProperty(CreditAccountData.prototype, "id", {
@@ -120,3 +120,18 @@ describe("CreditAccount calcOverallAPY test", function () {
120
120
  (0, chai_1.expect)(result).to.be.eq(undefined);
121
121
  });
122
122
  });
123
+ describe("CreditAccount calcMaxIncreaseBorrow test", function () {
124
+ it("health max increase borrow is zero if hf < 1", function () {
125
+ var result = creditAccount_1.CreditAccountData.calcMaxIncreaseBorrow(9999, ethers_1.BigNumber.from("156522834253690396032546"), 0, 9300);
126
+ (0, chai_1.expect)(result.toString()).to.be.eq(ethers_1.BigNumber.from(0).toString());
127
+ });
128
+ it("health max increase borrow is calculated correctly", function () {
129
+ var result = creditAccount_1.CreditAccountData.calcMaxIncreaseBorrow(10244, ethers_1.BigNumber.from("156522834253690396032546"), 0, 9300);
130
+ (0, chai_1.expect)(result.toString()).to.be.eq(ethers_1.BigNumber.from("54559387939857795188487").toString());
131
+ });
132
+ it("health max increase borrow is calculated correctly (low hf, high debt)", function () {
133
+ var loweHf = 10244;
134
+ var result = creditAccount_1.CreditAccountData.calcMaxIncreaseBorrow(loweHf, ethers_1.BigNumber.from("54782991988791638611392"), 0, 9300);
135
+ (0, chai_1.expect)(result.toString()).to.be.eq(ethers_1.BigNumber.from("19095785778950228315970").toString());
136
+ });
137
+ });
@@ -74,9 +74,9 @@ var CreditManagerData = /** @class */ (function () {
74
74
  this.forbiddenTokenMask = payload.forbiddenTokenMask;
75
75
  this.feeInterest = payload.feeInterest;
76
76
  this.feeLiquidation = payload.feeLiquidation;
77
- this.liquidationDiscount = payload.feeLiquidation;
77
+ this.liquidationDiscount = payload.liquidationDiscount;
78
78
  this.feeLiquidationExpired = payload.feeLiquidationExpired;
79
- this.liquidationDiscountExpired = payload.feeLiquidationExpired;
79
+ this.liquidationDiscountExpired = payload.liquidationDiscountExpired;
80
80
  if (this.creditFacade !== "") {
81
81
  txParser_1.TxParser.addCreditFacade(this.creditFacade, token_1.tokenSymbolByAddress[this.underlyingToken]);
82
82
  txParser_1.TxParser.addAdapters(payload.adapters.map(function (a) { return ({
@@ -127,34 +127,3 @@ describe("CreditManager calcHealthFactor test", function () {
127
127
  (0, chai_1.expect)(result).to.be.eq(9444);
128
128
  });
129
129
  });
130
- // describe("CreditManager calcMaxIncreaseBorrow test", () => {
131
- // it("health max increase borrow is zero if hf < 1", () => {
132
- // const result = calcMaxIncreaseBorrow(
133
- // 9999,
134
- // BigNumber.from("156522834253690396032546"),
135
- // 0,
136
- // );
137
- // expect(result.toString()).to.be.eq(BigNumber.from(0).toString());
138
- // });
139
- // it("health max increase borrow is calculated correctly", () => {
140
- // const result = calcMaxIncreaseBorrow(
141
- // defaultCA.healthFactor,
142
- // BigNumber.from("156522834253690396032546"),
143
- // 0,
144
- // );
145
- // expect(result.toString()).to.be.eq(
146
- // BigNumber.from("54559387939857795188487").toString(),
147
- // );
148
- // });
149
- // it("health max increase borrow is calculated correctly (low hf, high debt)", () => {
150
- // const loweHf = 10244;
151
- // const result = calcMaxIncreaseBorrow(
152
- // loweHf,
153
- // BigNumber.from("54782991988791638611392"),
154
- // 0,
155
- // );
156
- // expect(result.toString()).to.be.eq(
157
- // BigNumber.from("19095785778950228315970").toString(),
158
- // );
159
- // });
160
- // });
@@ -547,6 +547,16 @@ exports.priceFeedsByNetwork = {
547
547
  address: { Mainnet: "", Goerli: "" },
548
548
  },
549
549
  },
550
+ dwstETH: {
551
+ priceFeedETH: {
552
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
553
+ address: { Mainnet: "", Goerli: "" },
554
+ },
555
+ priceFeedUSD: {
556
+ type: oracles_1.OracleType.CHAINLINK_ORACLE,
557
+ address: { Mainnet: "", Goerli: "" },
558
+ },
559
+ },
550
560
  GEAR: {
551
561
  priceFeedETH: {
552
562
  type: oracles_1.OracleType.CHAINLINK_ORACLE,
@@ -36,7 +36,7 @@ exports.curveTokens = {
36
36
  },
37
37
  crvFRAX: {
38
38
  name: "Curve.fi FRAX/USDC",
39
- symbol: "3Crv",
39
+ symbol: "crvFRAX",
40
40
  type: tokenType_1.TokenType.CURVE_LP_TOKEN,
41
41
  pool: "CURVE_FRAX_USDC_POOL",
42
42
  lpActions: [
@@ -58,5 +58,6 @@ exports.decimals = {
58
58
  dUSDC: 6,
59
59
  dWBTC: 8,
60
60
  dWETH: 18,
61
+ dwstETH: 18,
61
62
  GEAR: 18,
62
63
  };
@@ -1,7 +1,7 @@
1
1
  import type { TradeAction } from "../pathfinder/tradeTypes";
2
2
  import type { TokenBase } from "./token";
3
3
  import { TokenType } from "./tokenType";
4
- export declare type DieselTokenTypes = "dDAI" | "dUSDC" | "dWBTC" | "dWETH";
4
+ export declare type DieselTokenTypes = "dDAI" | "dUSDC" | "dWBTC" | "dWETH" | "dwstETH";
5
5
  export declare type GearboxToken = "GEAR";
6
6
  export declare type DieselTokenData = {
7
7
  symbol: DieselTokenTypes;
@@ -24,6 +24,11 @@ exports.gearTokens = {
24
24
  symbol: "dWETH",
25
25
  type: tokenType_1.TokenType.DIESEL_LP_TOKEN,
26
26
  },
27
+ dwstETH: {
28
+ name: "dwstETH",
29
+ symbol: "dwstETH",
30
+ type: tokenType_1.TokenType.DIESEL_LP_TOKEN,
31
+ },
27
32
  GEAR: {
28
33
  name: "GEAR",
29
34
  symbol: "GEAR",
@@ -87,6 +87,7 @@ exports.tokenDataByNetwork = {
87
87
  dUSDC: "0xc411dB5f5Eb3f7d552F9B8454B2D74097ccdE6E3",
88
88
  dWBTC: "0xe753260F1955e8678DCeA8887759e07aa57E8c54",
89
89
  dWETH: "0xF21fc650C1B34eb0FDE786D52d23dA99Db3D6278",
90
+ dwstETH: "Deploy me",
90
91
  GEAR: "0xBa3335588D9403515223F109EdC4eB7269a9Ab5D",
91
92
  },
92
93
  ///
@@ -153,10 +154,11 @@ exports.tokenDataByNetwork = {
153
154
  stkcvxcrvPlain3andSUSD: "0x49416516604eF33383Bd9F3a94fEcd4ee36E2d88",
154
155
  stkcvxLUSD3CRV: "0x84c04976BA15AE880B8D6daC9CE1075D0eFD0d4D",
155
156
  // GEARBOX
156
- dDAI: "0x7c68cc65e16d31439E9d0003845593E0468FD705",
157
- dUSDC: "0x7A55367bFc419555e4718E79E75B9C54DDF19956",
158
- dWBTC: "0x2104EE41BAB9B7037af76ce42E92dAf00EbA880F",
159
- dWETH: "0x83884503a412654788352090E8bd80A07C57e843",
157
+ dDAI: "0x1726d8a1d3193d7c5a301bb64b025cbd91ba791c",
158
+ dUSDC: "0x5bbdbda8ce49b152ae48fb37f2397a5ebf35d59c",
159
+ dWBTC: "0xd7f208de8d5b5301e7018dcc6d312a4305382330",
160
+ dWETH: "0xfb906e19e71ed61bcb5ea0e11d77941a058eafbd",
161
+ dwstETH: "0xab20d04af0f79ab21cc66431f6bac03b74003d4d",
160
162
  GEAR: "0x52555B61b8c1243C63682F75eB28214d7A62F221",
161
163
  },
162
164
  };
@@ -12,6 +12,7 @@ export interface ICreditManagerV2Interface extends utils.Interface {
12
12
  "canLiquidateWhilePaused(address)": FunctionFragment;
13
13
  "checkAndEnableToken(address,address)": FunctionFragment;
14
14
  "checkAndOptimizeEnabledTokens(address)": FunctionFragment;
15
+ "checkEmergencyPausable(address,bool)": FunctionFragment;
15
16
  "closeCreditAccount(address,uint8,uint256,address,address,uint256,bool)": FunctionFragment;
16
17
  "collateralTokens(uint256)": FunctionFragment;
17
18
  "collateralTokensByMask(uint256)": FunctionFragment;
@@ -43,7 +44,7 @@ export interface ICreditManagerV2Interface extends utils.Interface {
43
44
  "version()": FunctionFragment;
44
45
  "wethAddress()": FunctionFragment;
45
46
  };
46
- getFunction(nameOrSignatureOrTopic: "adapterToContract" | "addCollateral" | "approveCreditAccount" | "calcClosePayments" | "calcCreditAccountAccruedInterest" | "canLiquidateWhilePaused" | "checkAndEnableToken" | "checkAndOptimizeEnabledTokens" | "closeCreditAccount" | "collateralTokens" | "collateralTokensByMask" | "collateralTokensCount" | "contractToAdapter" | "creditAccounts" | "creditConfigurator" | "creditFacade" | "cumulativeDropAtFastCheckRAY" | "disableToken" | "enabledTokensMap" | "executeOrder" | "fastCollateralCheck" | "fees" | "forbiddenTokenMask" | "fullCollateralCheck" | "getCreditAccountOrRevert" | "liquidationThresholds" | "manageDebt" | "maxAllowedEnabledTokenLength" | "openCreditAccount" | "pool" | "poolService" | "priceOracle" | "tokenMasksMap" | "transferAccountOwnership" | "underlying" | "universalAdapter" | "version" | "wethAddress"): FunctionFragment;
47
+ getFunction(nameOrSignatureOrTopic: "adapterToContract" | "addCollateral" | "approveCreditAccount" | "calcClosePayments" | "calcCreditAccountAccruedInterest" | "canLiquidateWhilePaused" | "checkAndEnableToken" | "checkAndOptimizeEnabledTokens" | "checkEmergencyPausable" | "closeCreditAccount" | "collateralTokens" | "collateralTokensByMask" | "collateralTokensCount" | "contractToAdapter" | "creditAccounts" | "creditConfigurator" | "creditFacade" | "cumulativeDropAtFastCheckRAY" | "disableToken" | "enabledTokensMap" | "executeOrder" | "fastCollateralCheck" | "fees" | "forbiddenTokenMask" | "fullCollateralCheck" | "getCreditAccountOrRevert" | "liquidationThresholds" | "manageDebt" | "maxAllowedEnabledTokenLength" | "openCreditAccount" | "pool" | "poolService" | "priceOracle" | "tokenMasksMap" | "transferAccountOwnership" | "underlying" | "universalAdapter" | "version" | "wethAddress"): FunctionFragment;
47
48
  encodeFunctionData(functionFragment: "adapterToContract", values: [string]): string;
48
49
  encodeFunctionData(functionFragment: "addCollateral", values: [string, string, string, BigNumberish]): string;
49
50
  encodeFunctionData(functionFragment: "approveCreditAccount", values: [string, string, string, BigNumberish]): string;
@@ -52,6 +53,7 @@ export interface ICreditManagerV2Interface extends utils.Interface {
52
53
  encodeFunctionData(functionFragment: "canLiquidateWhilePaused", values: [string]): string;
53
54
  encodeFunctionData(functionFragment: "checkAndEnableToken", values: [string, string]): string;
54
55
  encodeFunctionData(functionFragment: "checkAndOptimizeEnabledTokens", values: [string]): string;
56
+ encodeFunctionData(functionFragment: "checkEmergencyPausable", values: [string, boolean]): string;
55
57
  encodeFunctionData(functionFragment: "closeCreditAccount", values: [
56
58
  string,
57
59
  BigNumberish,
@@ -98,6 +100,7 @@ export interface ICreditManagerV2Interface extends utils.Interface {
98
100
  decodeFunctionResult(functionFragment: "canLiquidateWhilePaused", data: BytesLike): Result;
99
101
  decodeFunctionResult(functionFragment: "checkAndEnableToken", data: BytesLike): Result;
100
102
  decodeFunctionResult(functionFragment: "checkAndOptimizeEnabledTokens", data: BytesLike): Result;
103
+ decodeFunctionResult(functionFragment: "checkEmergencyPausable", data: BytesLike): Result;
101
104
  decodeFunctionResult(functionFragment: "closeCreditAccount", data: BytesLike): Result;
102
105
  decodeFunctionResult(functionFragment: "collateralTokens", data: BytesLike): Result;
103
106
  decodeFunctionResult(functionFragment: "collateralTokensByMask", data: BytesLike): Result;
@@ -200,6 +203,9 @@ export interface ICreditManagerV2 extends BaseContract {
200
203
  checkAndOptimizeEnabledTokens(creditAccount: string, overrides?: Overrides & {
201
204
  from?: string | Promise<string>;
202
205
  }): Promise<ContractTransaction>;
206
+ checkEmergencyPausable(caller: string, state: boolean, overrides?: Overrides & {
207
+ from?: string | Promise<string>;
208
+ }): Promise<ContractTransaction>;
203
209
  closeCreditAccount(borrower: string, closureActionType: BigNumberish, totalValue: BigNumberish, payer: string, to: string, skipTokenMask: BigNumberish, convertWETH: boolean, overrides?: Overrides & {
204
210
  from?: string | Promise<string>;
205
211
  }): Promise<ContractTransaction>;
@@ -305,6 +311,9 @@ export interface ICreditManagerV2 extends BaseContract {
305
311
  checkAndOptimizeEnabledTokens(creditAccount: string, overrides?: Overrides & {
306
312
  from?: string | Promise<string>;
307
313
  }): Promise<ContractTransaction>;
314
+ checkEmergencyPausable(caller: string, state: boolean, overrides?: Overrides & {
315
+ from?: string | Promise<string>;
316
+ }): Promise<ContractTransaction>;
308
317
  closeCreditAccount(borrower: string, closureActionType: BigNumberish, totalValue: BigNumberish, payer: string, to: string, skipTokenMask: BigNumberish, convertWETH: boolean, overrides?: Overrides & {
309
318
  from?: string | Promise<string>;
310
319
  }): Promise<ContractTransaction>;
@@ -402,6 +411,7 @@ export interface ICreditManagerV2 extends BaseContract {
402
411
  canLiquidateWhilePaused(arg0: string, overrides?: CallOverrides): Promise<boolean>;
403
412
  checkAndEnableToken(creditAccount: string, token: string, overrides?: CallOverrides): Promise<void>;
404
413
  checkAndOptimizeEnabledTokens(creditAccount: string, overrides?: CallOverrides): Promise<void>;
414
+ checkEmergencyPausable(caller: string, state: boolean, overrides?: CallOverrides): Promise<boolean>;
405
415
  closeCreditAccount(borrower: string, closureActionType: BigNumberish, totalValue: BigNumberish, payer: string, to: string, skipTokenMask: BigNumberish, convertWETH: boolean, overrides?: CallOverrides): Promise<BigNumber>;
406
416
  collateralTokens(id: BigNumberish, overrides?: CallOverrides): Promise<[
407
417
  string,
@@ -480,6 +490,9 @@ export interface ICreditManagerV2 extends BaseContract {
480
490
  checkAndOptimizeEnabledTokens(creditAccount: string, overrides?: Overrides & {
481
491
  from?: string | Promise<string>;
482
492
  }): Promise<BigNumber>;
493
+ checkEmergencyPausable(caller: string, state: boolean, overrides?: Overrides & {
494
+ from?: string | Promise<string>;
495
+ }): Promise<BigNumber>;
483
496
  closeCreditAccount(borrower: string, closureActionType: BigNumberish, totalValue: BigNumberish, payer: string, to: string, skipTokenMask: BigNumberish, convertWETH: boolean, overrides?: Overrides & {
484
497
  from?: string | Promise<string>;
485
498
  }): Promise<BigNumber>;
@@ -544,6 +557,9 @@ export interface ICreditManagerV2 extends BaseContract {
544
557
  checkAndOptimizeEnabledTokens(creditAccount: string, overrides?: Overrides & {
545
558
  from?: string | Promise<string>;
546
559
  }): Promise<PopulatedTransaction>;
560
+ checkEmergencyPausable(caller: string, state: boolean, overrides?: Overrides & {
561
+ from?: string | Promise<string>;
562
+ }): Promise<PopulatedTransaction>;
547
563
  closeCreditAccount(borrower: string, closureActionType: BigNumberish, totalValue: BigNumberish, payer: string, to: string, skipTokenMask: BigNumberish, convertWETH: boolean, overrides?: Overrides & {
548
564
  from?: string | Promise<string>;
549
565
  }): Promise<PopulatedTransaction>;
@@ -0,0 +1,91 @@
1
+ import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, ContractTransaction, Overrides, PopulatedTransaction, Signer, utils } from "ethers";
2
+ import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
3
+ import type { Listener, Provider } from "@ethersproject/providers";
4
+ import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../common";
5
+ export interface IDegenDistributorInterface extends utils.Interface {
6
+ functions: {
7
+ "claim(uint256,address,uint256,bytes32[])": FunctionFragment;
8
+ "isClaimed(uint256)": FunctionFragment;
9
+ "merkleRoot()": FunctionFragment;
10
+ "token()": FunctionFragment;
11
+ };
12
+ getFunction(nameOrSignatureOrTopic: "claim" | "isClaimed" | "merkleRoot" | "token"): FunctionFragment;
13
+ encodeFunctionData(functionFragment: "claim", values: [BigNumberish, string, BigNumberish, BytesLike[]]): string;
14
+ encodeFunctionData(functionFragment: "isClaimed", values: [BigNumberish]): string;
15
+ encodeFunctionData(functionFragment: "merkleRoot", values?: undefined): string;
16
+ encodeFunctionData(functionFragment: "token", values?: undefined): string;
17
+ decodeFunctionResult(functionFragment: "claim", data: BytesLike): Result;
18
+ decodeFunctionResult(functionFragment: "isClaimed", data: BytesLike): Result;
19
+ decodeFunctionResult(functionFragment: "merkleRoot", data: BytesLike): Result;
20
+ decodeFunctionResult(functionFragment: "token", data: BytesLike): Result;
21
+ events: {
22
+ "Claimed(uint256,address,uint256)": EventFragment;
23
+ };
24
+ getEvent(nameOrSignatureOrTopic: "Claimed"): EventFragment;
25
+ }
26
+ export interface ClaimedEventObject {
27
+ index: BigNumber;
28
+ account: string;
29
+ amount: BigNumber;
30
+ }
31
+ export declare type ClaimedEvent = TypedEvent<[
32
+ BigNumber,
33
+ string,
34
+ BigNumber
35
+ ], ClaimedEventObject>;
36
+ export declare type ClaimedEventFilter = TypedEventFilter<ClaimedEvent>;
37
+ export interface IDegenDistributor extends BaseContract {
38
+ connect(signerOrProvider: Signer | Provider | string): this;
39
+ attach(addressOrName: string): this;
40
+ deployed(): Promise<this>;
41
+ interface: IDegenDistributorInterface;
42
+ queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
43
+ listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
44
+ listeners(eventName?: string): Array<Listener>;
45
+ removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
46
+ removeAllListeners(eventName?: string): this;
47
+ off: OnEvent<this>;
48
+ on: OnEvent<this>;
49
+ once: OnEvent<this>;
50
+ removeListener: OnEvent<this>;
51
+ functions: {
52
+ claim(index: BigNumberish, account: string, amount: BigNumberish, merkleProof: BytesLike[], overrides?: Overrides & {
53
+ from?: string | Promise<string>;
54
+ }): Promise<ContractTransaction>;
55
+ isClaimed(index: BigNumberish, overrides?: CallOverrides): Promise<[boolean]>;
56
+ merkleRoot(overrides?: CallOverrides): Promise<[string]>;
57
+ token(overrides?: CallOverrides): Promise<[string]>;
58
+ };
59
+ claim(index: BigNumberish, account: string, amount: BigNumberish, merkleProof: BytesLike[], overrides?: Overrides & {
60
+ from?: string | Promise<string>;
61
+ }): Promise<ContractTransaction>;
62
+ isClaimed(index: BigNumberish, overrides?: CallOverrides): Promise<boolean>;
63
+ merkleRoot(overrides?: CallOverrides): Promise<string>;
64
+ token(overrides?: CallOverrides): Promise<string>;
65
+ callStatic: {
66
+ claim(index: BigNumberish, account: string, amount: BigNumberish, merkleProof: BytesLike[], overrides?: CallOverrides): Promise<void>;
67
+ isClaimed(index: BigNumberish, overrides?: CallOverrides): Promise<boolean>;
68
+ merkleRoot(overrides?: CallOverrides): Promise<string>;
69
+ token(overrides?: CallOverrides): Promise<string>;
70
+ };
71
+ filters: {
72
+ "Claimed(uint256,address,uint256)"(index?: null, account?: null, amount?: null): ClaimedEventFilter;
73
+ Claimed(index?: null, account?: null, amount?: null): ClaimedEventFilter;
74
+ };
75
+ estimateGas: {
76
+ claim(index: BigNumberish, account: string, amount: BigNumberish, merkleProof: BytesLike[], overrides?: Overrides & {
77
+ from?: string | Promise<string>;
78
+ }): Promise<BigNumber>;
79
+ isClaimed(index: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
80
+ merkleRoot(overrides?: CallOverrides): Promise<BigNumber>;
81
+ token(overrides?: CallOverrides): Promise<BigNumber>;
82
+ };
83
+ populateTransaction: {
84
+ claim(index: BigNumberish, account: string, amount: BigNumberish, merkleProof: BytesLike[], overrides?: Overrides & {
85
+ from?: string | Promise<string>;
86
+ }): Promise<PopulatedTransaction>;
87
+ isClaimed(index: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
88
+ merkleRoot(overrides?: CallOverrides): Promise<PopulatedTransaction>;
89
+ token(overrides?: CallOverrides): Promise<PopulatedTransaction>;
90
+ };
91
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -32,6 +32,7 @@ import type * as adapters from "./adapters";
32
32
  export type { adapters };
33
33
  import type * as external from "./external";
34
34
  export type { external };
35
+ export type { IDegenDistributor } from "./IDegenDistributor";
35
36
  export type { IGearToken } from "./IGearToken";
36
37
  export type { IInterestRateModel } from "./IInterestRateModel";
37
38
  export type { IMerkleDistributor } from "./IMerkleDistributor";
@@ -2,60 +2,6 @@ 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 declare type SwapTaskStruct = {
6
- swapOperation: BigNumberish;
7
- creditAccount: string;
8
- tokenIn: string;
9
- tokenOut: string;
10
- connectors: string[];
11
- amount: BigNumberish;
12
- slippage: BigNumberish;
13
- externalSlippage: boolean;
14
- };
15
- export declare type SwapTaskStructOutput = [
16
- number,
17
- string,
18
- string,
19
- string,
20
- string[],
21
- BigNumber,
22
- BigNumber,
23
- boolean
24
- ] & {
25
- swapOperation: number;
26
- creditAccount: string;
27
- tokenIn: string;
28
- tokenOut: string;
29
- connectors: string[];
30
- amount: BigNumber;
31
- slippage: BigNumber;
32
- externalSlippage: boolean;
33
- };
34
- export declare type MultiCallStruct = {
35
- target: string;
36
- callData: BytesLike;
37
- };
38
- export declare type MultiCallStructOutput = [string, string] & {
39
- target: string;
40
- callData: string;
41
- };
42
- export declare type SwapQuoteStruct = {
43
- multiCall: MultiCallStruct;
44
- amount: BigNumberish;
45
- found: boolean;
46
- gasUsage: BigNumberish;
47
- };
48
- export declare type SwapQuoteStructOutput = [
49
- MultiCallStructOutput,
50
- BigNumber,
51
- boolean,
52
- BigNumber
53
- ] & {
54
- multiCall: MultiCallStructOutput;
55
- amount: BigNumber;
56
- found: boolean;
57
- gasUsage: BigNumber;
58
- };
59
5
  export declare type BalanceStruct = {
60
6
  token: string;
61
7
  balance: BigNumberish;
@@ -74,6 +20,14 @@ export declare type TokenAdaptersStructOutput = [string, string, string] & {
74
20
  depositAdapter: string;
75
21
  withdrawAdapter: string;
76
22
  };
23
+ export declare type MultiCallStruct = {
24
+ target: string;
25
+ callData: BytesLike;
26
+ };
27
+ export declare type MultiCallStructOutput = [string, string] & {
28
+ target: string;
29
+ callData: string;
30
+ };
77
31
  export declare type StrategyPathTaskStruct = {
78
32
  creditAccount: string;
79
33
  balances: BalanceStruct[];
@@ -118,9 +72,55 @@ export declare type StrategyPathTaskStructOutput = [
118
72
  initTargetBalance: BigNumber;
119
73
  calls: MultiCallStructOutput[];
120
74
  };
75
+ export declare type SwapTaskStruct = {
76
+ swapOperation: BigNumberish;
77
+ creditAccount: string;
78
+ tokenIn: string;
79
+ tokenOut: string;
80
+ connectors: string[];
81
+ amount: BigNumberish;
82
+ slippage: BigNumberish;
83
+ externalSlippage: boolean;
84
+ };
85
+ export declare type SwapTaskStructOutput = [
86
+ number,
87
+ string,
88
+ string,
89
+ string,
90
+ string[],
91
+ BigNumber,
92
+ BigNumber,
93
+ boolean
94
+ ] & {
95
+ swapOperation: number;
96
+ creditAccount: string;
97
+ tokenIn: string;
98
+ tokenOut: string;
99
+ connectors: string[];
100
+ amount: BigNumber;
101
+ slippage: BigNumber;
102
+ externalSlippage: boolean;
103
+ };
104
+ export declare type SwapQuoteStruct = {
105
+ multiCall: MultiCallStruct;
106
+ amount: BigNumberish;
107
+ found: boolean;
108
+ gasUsage: BigNumberish;
109
+ };
110
+ export declare type SwapQuoteStructOutput = [
111
+ MultiCallStructOutput,
112
+ BigNumber,
113
+ boolean,
114
+ BigNumber
115
+ ] & {
116
+ multiCall: MultiCallStructOutput;
117
+ amount: BigNumber;
118
+ found: boolean;
119
+ gasUsage: BigNumber;
120
+ };
121
121
  export interface ISwapAggregatorInterface extends utils.Interface {
122
122
  functions: {
123
- "findAllSwaps((uint8,address,address,address,address[],uint256,uint256,bool),address[])": FunctionFragment;
123
+ "findAllSwaps(address,uint256,bool,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
124
124
  "findBestAllInputSwap(address,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
125
125
  "findBestAllInputSwapOrRevert(address,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
126
126
  "findBestSwap(address,uint256,address,(address,(address,uint256)[],address,address[],address[],uint256,bool,uint8,(address,address,address)[],uint256,uint256,uint256,(address,bytes)[]))": FunctionFragment;
@@ -132,7 +132,7 @@ export interface ISwapAggregatorInterface extends utils.Interface {
132
132
  "version()": FunctionFragment;
133
133
  };
134
134
  getFunction(nameOrSignatureOrTopic: "findAllSwaps" | "findBestAllInputSwap" | "findBestAllInputSwapOrRevert" | "findBestSwap" | "findBestSwapOrRevert" | "findBestSwapQuote" | "getBestDirectPairSwap" | "getComponentId" | "swapAllNormalTokens" | "version"): FunctionFragment;
135
- encodeFunctionData(functionFragment: "findAllSwaps", values: [SwapTaskStruct, string[]]): string;
135
+ encodeFunctionData(functionFragment: "findAllSwaps", values: [string, BigNumberish, boolean, StrategyPathTaskStruct]): string;
136
136
  encodeFunctionData(functionFragment: "findBestAllInputSwap", values: [string, string, StrategyPathTaskStruct]): string;
137
137
  encodeFunctionData(functionFragment: "findBestAllInputSwapOrRevert", values: [string, string, StrategyPathTaskStruct]): string;
138
138
  encodeFunctionData(functionFragment: "findBestSwap", values: [string, BigNumberish, string, StrategyPathTaskStruct]): string;
@@ -169,7 +169,7 @@ export interface ISwapAggregator extends BaseContract {
169
169
  once: OnEvent<this>;
170
170
  removeListener: OnEvent<this>;
171
171
  functions: {
172
- findAllSwaps(swapTask: SwapTaskStruct, adapters: string[], overrides?: Overrides & {
172
+ findAllSwaps(tokenIn: string, amountIn: BigNumberish, isAll: boolean, task: StrategyPathTaskStruct, overrides?: Overrides & {
173
173
  from?: string | Promise<string>;
174
174
  }): Promise<ContractTransaction>;
175
175
  findBestAllInputSwap(tokenIn: string, tokenOut: string, task: StrategyPathTaskStruct, overrides?: Overrides & {
@@ -196,7 +196,7 @@ export interface ISwapAggregator extends BaseContract {
196
196
  }): Promise<ContractTransaction>;
197
197
  version(overrides?: CallOverrides): Promise<[BigNumber]>;
198
198
  };
199
- findAllSwaps(swapTask: SwapTaskStruct, adapters: string[], overrides?: Overrides & {
199
+ findAllSwaps(tokenIn: string, amountIn: BigNumberish, isAll: boolean, task: StrategyPathTaskStruct, overrides?: Overrides & {
200
200
  from?: string | Promise<string>;
201
201
  }): Promise<ContractTransaction>;
202
202
  findBestAllInputSwap(tokenIn: string, tokenOut: string, task: StrategyPathTaskStruct, overrides?: Overrides & {
@@ -223,7 +223,7 @@ export interface ISwapAggregator extends BaseContract {
223
223
  }): Promise<ContractTransaction>;
224
224
  version(overrides?: CallOverrides): Promise<BigNumber>;
225
225
  callStatic: {
226
- findAllSwaps(swapTask: SwapTaskStruct, adapters: string[], overrides?: CallOverrides): Promise<SwapQuoteStructOutput[]>;
226
+ findAllSwaps(tokenIn: string, amountIn: BigNumberish, isAll: boolean, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<StrategyPathTaskStructOutput[]>;
227
227
  findBestAllInputSwap(tokenIn: string, tokenOut: string, task: StrategyPathTaskStruct, overrides?: CallOverrides): Promise<[
228
228
  BigNumber,
229
229
  StrategyPathTaskStructOutput
@@ -256,7 +256,7 @@ export interface ISwapAggregator extends BaseContract {
256
256
  };
257
257
  filters: {};
258
258
  estimateGas: {
259
- findAllSwaps(swapTask: SwapTaskStruct, adapters: string[], overrides?: Overrides & {
259
+ findAllSwaps(tokenIn: string, amountIn: BigNumberish, isAll: boolean, task: StrategyPathTaskStruct, overrides?: Overrides & {
260
260
  from?: string | Promise<string>;
261
261
  }): Promise<BigNumber>;
262
262
  findBestAllInputSwap(tokenIn: string, tokenOut: string, task: StrategyPathTaskStruct, overrides?: Overrides & {
@@ -284,7 +284,7 @@ export interface ISwapAggregator extends BaseContract {
284
284
  version(overrides?: CallOverrides): Promise<BigNumber>;
285
285
  };
286
286
  populateTransaction: {
287
- findAllSwaps(swapTask: SwapTaskStruct, adapters: string[], overrides?: Overrides & {
287
+ findAllSwaps(tokenIn: string, amountIn: BigNumberish, isAll: boolean, task: StrategyPathTaskStruct, overrides?: Overrides & {
288
288
  from?: string | Promise<string>;
289
289
  }): Promise<PopulatedTransaction>;
290
290
  findBestAllInputSwap(tokenIn: string, tokenOut: string, task: StrategyPathTaskStruct, overrides?: Overrides & {
@@ -306,6 +306,30 @@ var _abi = [
306
306
  stateMutability: "nonpayable",
307
307
  type: "function",
308
308
  },
309
+ {
310
+ inputs: [
311
+ {
312
+ internalType: "address",
313
+ name: "caller",
314
+ type: "address",
315
+ },
316
+ {
317
+ internalType: "bool",
318
+ name: "state",
319
+ type: "bool",
320
+ },
321
+ ],
322
+ name: "checkEmergencyPausable",
323
+ outputs: [
324
+ {
325
+ internalType: "bool",
326
+ name: "",
327
+ type: "bool",
328
+ },
329
+ ],
330
+ stateMutability: "nonpayable",
331
+ type: "function",
332
+ },
309
333
  {
310
334
  inputs: [
311
335
  {
@@ -0,0 +1,35 @@
1
+ import { Signer } from "ethers";
2
+ import type { Provider } from "@ethersproject/providers";
3
+ import type { IDegenDistributor, IDegenDistributorInterface } from "../../../contracts/interfaces/IDegenDistributor";
4
+ export declare class IDegenDistributor__factory {
5
+ static readonly abi: ({
6
+ anonymous: boolean;
7
+ inputs: {
8
+ indexed: boolean;
9
+ internalType: string;
10
+ name: string;
11
+ type: string;
12
+ }[];
13
+ name: string;
14
+ type: string;
15
+ outputs?: undefined;
16
+ stateMutability?: undefined;
17
+ } | {
18
+ inputs: {
19
+ internalType: string;
20
+ name: string;
21
+ type: string;
22
+ }[];
23
+ name: string;
24
+ outputs: {
25
+ internalType: string;
26
+ name: string;
27
+ type: string;
28
+ }[];
29
+ stateMutability: string;
30
+ type: string;
31
+ anonymous?: undefined;
32
+ })[];
33
+ static createInterface(): IDegenDistributorInterface;
34
+ static connect(address: string, signerOrProvider: Signer | Provider): IDegenDistributor;
35
+ }
@@ -0,0 +1,120 @@
1
+ "use strict";
2
+ /* Autogenerated file. Do not edit manually. */
3
+ /* tslint:disable */
4
+ /* eslint-disable */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.IDegenDistributor__factory = void 0;
7
+ var ethers_1 = require("ethers");
8
+ var _abi = [
9
+ {
10
+ anonymous: false,
11
+ inputs: [
12
+ {
13
+ indexed: false,
14
+ internalType: "uint256",
15
+ name: "index",
16
+ type: "uint256",
17
+ },
18
+ {
19
+ indexed: false,
20
+ internalType: "address",
21
+ name: "account",
22
+ type: "address",
23
+ },
24
+ {
25
+ indexed: false,
26
+ internalType: "uint256",
27
+ name: "amount",
28
+ type: "uint256",
29
+ },
30
+ ],
31
+ name: "Claimed",
32
+ type: "event",
33
+ },
34
+ {
35
+ inputs: [
36
+ {
37
+ internalType: "uint256",
38
+ name: "index",
39
+ type: "uint256",
40
+ },
41
+ {
42
+ internalType: "address",
43
+ name: "account",
44
+ type: "address",
45
+ },
46
+ {
47
+ internalType: "uint256",
48
+ name: "amount",
49
+ type: "uint256",
50
+ },
51
+ {
52
+ internalType: "bytes32[]",
53
+ name: "merkleProof",
54
+ type: "bytes32[]",
55
+ },
56
+ ],
57
+ name: "claim",
58
+ outputs: [],
59
+ stateMutability: "nonpayable",
60
+ type: "function",
61
+ },
62
+ {
63
+ inputs: [
64
+ {
65
+ internalType: "uint256",
66
+ name: "index",
67
+ type: "uint256",
68
+ },
69
+ ],
70
+ name: "isClaimed",
71
+ outputs: [
72
+ {
73
+ internalType: "bool",
74
+ name: "",
75
+ type: "bool",
76
+ },
77
+ ],
78
+ stateMutability: "view",
79
+ type: "function",
80
+ },
81
+ {
82
+ inputs: [],
83
+ name: "merkleRoot",
84
+ outputs: [
85
+ {
86
+ internalType: "bytes32",
87
+ name: "",
88
+ type: "bytes32",
89
+ },
90
+ ],
91
+ stateMutability: "view",
92
+ type: "function",
93
+ },
94
+ {
95
+ inputs: [],
96
+ name: "token",
97
+ outputs: [
98
+ {
99
+ internalType: "contract IDegenNFT",
100
+ name: "",
101
+ type: "address",
102
+ },
103
+ ],
104
+ stateMutability: "view",
105
+ type: "function",
106
+ },
107
+ ];
108
+ var IDegenDistributor__factory = /** @class */ (function () {
109
+ function IDegenDistributor__factory() {
110
+ }
111
+ IDegenDistributor__factory.createInterface = function () {
112
+ return new ethers_1.utils.Interface(_abi);
113
+ };
114
+ IDegenDistributor__factory.connect = function (address, signerOrProvider) {
115
+ return new ethers_1.Contract(address, _abi, signerOrProvider);
116
+ };
117
+ IDegenDistributor__factory.abi = _abi;
118
+ return IDegenDistributor__factory;
119
+ }());
120
+ exports.IDegenDistributor__factory = IDegenDistributor__factory;
@@ -15,6 +15,7 @@ export * as iPriceOracleSol from "./IPriceOracle.sol";
15
15
  export * as v1 from "./V1";
16
16
  export * as adapters from "./adapters";
17
17
  export * as external from "./external";
18
+ export { IDegenDistributor__factory } from "./IDegenDistributor__factory";
18
19
  export { IGearToken__factory } from "./IGearToken__factory";
19
20
  export { IInterestRateModel__factory } from "./IInterestRateModel__factory";
20
21
  export { IMerkleDistributor__factory } from "./IMerkleDistributor__factory";
@@ -23,7 +23,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
23
23
  return result;
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.IWETHGateway__factory = exports.IVersion__factory = exports.IPriceFeedType__factory = exports.IPriceFeedAddress__factory = exports.IPhantomERC20__factory = exports.IMerkleDistributor__factory = exports.IInterestRateModel__factory = exports.IGearToken__factory = exports.external = exports.adapters = exports.v1 = exports.iPriceOracleSol = exports.iPoolServiceSol = exports.ilpPriceFeedSol = exports.iDieselTokenSol = exports.iDegenNftSol = exports.iDataCompressorSol = exports.iCreditManagerV2Sol = exports.iCreditFacadeSol = exports.iCreditConfiguratorSol = exports.iCreditAccountSol = exports.iContractsRegisterSol = exports.iAddressProviderSol = exports.iAccountFactorySol = exports.iaclSol = void 0;
26
+ exports.IWETHGateway__factory = exports.IVersion__factory = exports.IPriceFeedType__factory = exports.IPriceFeedAddress__factory = exports.IPhantomERC20__factory = exports.IMerkleDistributor__factory = exports.IInterestRateModel__factory = exports.IGearToken__factory = exports.IDegenDistributor__factory = exports.external = exports.adapters = exports.v1 = exports.iPriceOracleSol = exports.iPoolServiceSol = exports.ilpPriceFeedSol = exports.iDieselTokenSol = exports.iDegenNftSol = exports.iDataCompressorSol = exports.iCreditManagerV2Sol = exports.iCreditFacadeSol = exports.iCreditConfiguratorSol = exports.iCreditAccountSol = exports.iContractsRegisterSol = exports.iAddressProviderSol = exports.iAccountFactorySol = exports.iaclSol = void 0;
27
27
  /* Autogenerated file. Do not edit manually. */
28
28
  /* tslint:disable */
29
29
  /* eslint-disable */
@@ -44,6 +44,8 @@ exports.iPriceOracleSol = __importStar(require("./IPriceOracle.sol"));
44
44
  exports.v1 = __importStar(require("./V1"));
45
45
  exports.adapters = __importStar(require("./adapters"));
46
46
  exports.external = __importStar(require("./external"));
47
+ var IDegenDistributor__factory_1 = require("./IDegenDistributor__factory");
48
+ Object.defineProperty(exports, "IDegenDistributor__factory", { enumerable: true, get: function () { return IDegenDistributor__factory_1.IDegenDistributor__factory; } });
47
49
  var IGearToken__factory_1 = require("./IGearToken__factory");
48
50
  Object.defineProperty(exports, "IGearToken__factory", { enumerable: true, get: function () { return IGearToken__factory_1.IGearToken__factory; } });
49
51
  var IInterestRateModel__factory_1 = require("./IInterestRateModel__factory");
@@ -8,26 +8,48 @@ var ethers_1 = require("ethers");
8
8
  var _abi = [
9
9
  {
10
10
  inputs: [
11
+ {
12
+ internalType: "address",
13
+ name: "tokenIn",
14
+ type: "address",
15
+ },
16
+ {
17
+ internalType: "uint256",
18
+ name: "amountIn",
19
+ type: "uint256",
20
+ },
21
+ {
22
+ internalType: "bool",
23
+ name: "isAll",
24
+ type: "bool",
25
+ },
11
26
  {
12
27
  components: [
13
- {
14
- internalType: "enum SwapOperation",
15
- name: "swapOperation",
16
- type: "uint8",
17
- },
18
28
  {
19
29
  internalType: "address",
20
30
  name: "creditAccount",
21
31
  type: "address",
22
32
  },
23
33
  {
24
- internalType: "address",
25
- name: "tokenIn",
26
- type: "address",
34
+ components: [
35
+ {
36
+ internalType: "address",
37
+ name: "token",
38
+ type: "address",
39
+ },
40
+ {
41
+ internalType: "uint256",
42
+ name: "balance",
43
+ type: "uint256",
44
+ },
45
+ ],
46
+ internalType: "struct Balance[]",
47
+ name: "balances",
48
+ type: "tuple[]",
27
49
  },
28
50
  {
29
51
  internalType: "address",
30
- name: "tokenOut",
52
+ name: "target",
31
53
  type: "address",
32
54
  },
33
55
  {
@@ -36,70 +58,198 @@ var _abi = [
36
58
  type: "address[]",
37
59
  },
38
60
  {
39
- internalType: "uint256",
40
- name: "amount",
41
- type: "uint256",
61
+ internalType: "address[]",
62
+ name: "adapters",
63
+ type: "address[]",
42
64
  },
43
65
  {
44
66
  internalType: "uint256",
45
- name: "slippage",
67
+ name: "slippagePerStep",
46
68
  type: "uint256",
47
69
  },
48
70
  {
49
71
  internalType: "bool",
50
- name: "externalSlippage",
72
+ name: "force",
51
73
  type: "bool",
52
74
  },
75
+ {
76
+ internalType: "enum TokenType",
77
+ name: "targetType",
78
+ type: "uint8",
79
+ },
80
+ {
81
+ components: [
82
+ {
83
+ internalType: "address",
84
+ name: "token",
85
+ type: "address",
86
+ },
87
+ {
88
+ internalType: "address",
89
+ name: "depositAdapter",
90
+ type: "address",
91
+ },
92
+ {
93
+ internalType: "address",
94
+ name: "withdrawAdapter",
95
+ type: "address",
96
+ },
97
+ ],
98
+ internalType: "struct TokenAdapters[]",
99
+ name: "foundAdapters",
100
+ type: "tuple[]",
101
+ },
102
+ {
103
+ internalType: "uint256",
104
+ name: "gasPriceTargetRAY",
105
+ type: "uint256",
106
+ },
107
+ {
108
+ internalType: "uint256",
109
+ name: "gasUsage",
110
+ type: "uint256",
111
+ },
112
+ {
113
+ internalType: "uint256",
114
+ name: "initTargetBalance",
115
+ type: "uint256",
116
+ },
117
+ {
118
+ components: [
119
+ {
120
+ internalType: "address",
121
+ name: "target",
122
+ type: "address",
123
+ },
124
+ {
125
+ internalType: "bytes",
126
+ name: "callData",
127
+ type: "bytes",
128
+ },
129
+ ],
130
+ internalType: "struct MultiCall[]",
131
+ name: "calls",
132
+ type: "tuple[]",
133
+ },
53
134
  ],
54
- internalType: "struct SwapTask",
55
- name: "swapTask",
135
+ internalType: "struct StrategyPathTask",
136
+ name: "task",
56
137
  type: "tuple",
57
138
  },
58
- {
59
- internalType: "address[]",
60
- name: "adapters",
61
- type: "address[]",
62
- },
63
139
  ],
64
140
  name: "findAllSwaps",
65
141
  outputs: [
66
142
  {
67
143
  components: [
144
+ {
145
+ internalType: "address",
146
+ name: "creditAccount",
147
+ type: "address",
148
+ },
68
149
  {
69
150
  components: [
70
151
  {
71
152
  internalType: "address",
72
- name: "target",
153
+ name: "token",
73
154
  type: "address",
74
155
  },
75
156
  {
76
- internalType: "bytes",
77
- name: "callData",
78
- type: "bytes",
157
+ internalType: "uint256",
158
+ name: "balance",
159
+ type: "uint256",
79
160
  },
80
161
  ],
81
- internalType: "struct MultiCall",
82
- name: "multiCall",
83
- type: "tuple",
162
+ internalType: "struct Balance[]",
163
+ name: "balances",
164
+ type: "tuple[]",
165
+ },
166
+ {
167
+ internalType: "address",
168
+ name: "target",
169
+ type: "address",
170
+ },
171
+ {
172
+ internalType: "address[]",
173
+ name: "connectors",
174
+ type: "address[]",
175
+ },
176
+ {
177
+ internalType: "address[]",
178
+ name: "adapters",
179
+ type: "address[]",
84
180
  },
85
181
  {
86
182
  internalType: "uint256",
87
- name: "amount",
183
+ name: "slippagePerStep",
88
184
  type: "uint256",
89
185
  },
90
186
  {
91
187
  internalType: "bool",
92
- name: "found",
188
+ name: "force",
93
189
  type: "bool",
94
190
  },
191
+ {
192
+ internalType: "enum TokenType",
193
+ name: "targetType",
194
+ type: "uint8",
195
+ },
196
+ {
197
+ components: [
198
+ {
199
+ internalType: "address",
200
+ name: "token",
201
+ type: "address",
202
+ },
203
+ {
204
+ internalType: "address",
205
+ name: "depositAdapter",
206
+ type: "address",
207
+ },
208
+ {
209
+ internalType: "address",
210
+ name: "withdrawAdapter",
211
+ type: "address",
212
+ },
213
+ ],
214
+ internalType: "struct TokenAdapters[]",
215
+ name: "foundAdapters",
216
+ type: "tuple[]",
217
+ },
218
+ {
219
+ internalType: "uint256",
220
+ name: "gasPriceTargetRAY",
221
+ type: "uint256",
222
+ },
95
223
  {
96
224
  internalType: "uint256",
97
225
  name: "gasUsage",
98
226
  type: "uint256",
99
227
  },
228
+ {
229
+ internalType: "uint256",
230
+ name: "initTargetBalance",
231
+ type: "uint256",
232
+ },
233
+ {
234
+ components: [
235
+ {
236
+ internalType: "address",
237
+ name: "target",
238
+ type: "address",
239
+ },
240
+ {
241
+ internalType: "bytes",
242
+ name: "callData",
243
+ type: "bytes",
244
+ },
245
+ ],
246
+ internalType: "struct MultiCall[]",
247
+ name: "calls",
248
+ type: "tuple[]",
249
+ },
100
250
  ],
101
- internalType: "struct SwapQuote[]",
102
- name: "results",
251
+ internalType: "struct StrategyPathTask[]",
252
+ name: "",
103
253
  type: "tuple[]",
104
254
  },
105
255
  ],
@@ -191,6 +191,8 @@ export type { IDataCompressor } from "./contracts/interfaces/IDataCompressor.sol
191
191
  export { IDataCompressor__factory } from "./factories/contracts/interfaces/IDataCompressor.sol/IDataCompressor__factory";
192
192
  export type { IDataCompressorExceptions } from "./contracts/interfaces/IDataCompressor.sol/IDataCompressorExceptions";
193
193
  export { IDataCompressorExceptions__factory } from "./factories/contracts/interfaces/IDataCompressor.sol/IDataCompressorExceptions__factory";
194
+ export type { IDegenDistributor } from "./contracts/interfaces/IDegenDistributor";
195
+ export { IDegenDistributor__factory } from "./factories/contracts/interfaces/IDegenDistributor__factory";
194
196
  export type { IDegenNFT } from "./contracts/interfaces/IDegenNFT.sol/IDegenNFT";
195
197
  export { IDegenNFT__factory } from "./factories/contracts/interfaces/IDegenNFT.sol/IDegenNFT__factory";
196
198
  export type { IDegenNFTExceptions } from "./contracts/interfaces/IDegenNFT.sol/IDegenNFTExceptions";
@@ -24,8 +24,8 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.IConvexV1BaseRewardPoolAdapter__factory = exports.IYVault__factory = exports.IUniswapV3SwapCallback__factory = exports.ISwapRouter__factory = exports.IUniswapV2Router02__factory = exports.IUniswapV2Router01__factory = exports.IQuoter__factory = exports.IwstETHGateWay__factory = exports.IwstETHGetters__factory = exports.IwstETH__factory = exports.IstETHGetters__factory = exports.IstETH__factory = exports.ILidoOracle__factory = exports.ICurveRegistry__factory = exports.ICurvePoolStETH__factory = exports.ICurvePool__factory = exports.ICurvePool4Assets__factory = exports.ICurvePool3Assets__factory = exports.ICurvePool2Assets__factory = exports.ICRVToken__factory = exports.IBasicRewards__factory = exports.IWalletChecker__factory = exports.IVoting__factory = exports.IVestedEscrow__factory = exports.ITokenMinter__factory = exports.ITokenFactory__factory = exports.IStashFactory__factory = exports.IStash__factory = exports.IStaker__factory = exports.IRewards__factory = exports.IRewardFactory__factory = exports.IRegistry__factory = exports.IPools__factory = exports.IMinter__factory = exports.IFeeDistro__factory = exports.IDeposit__factory = exports.ICurveVoteEscrow__factory = exports.ICurveGauge__factory = exports.ICrvDeposit__factory = exports.IConvexToken__factory = exports.IClaimZap__factory = exports.IBooster__factory = exports.IBaseRewardPool__factory = exports.IERC165__factory = exports.IERC721Receiver__factory = exports.IERC721__factory = exports.IERC721Metadata__factory = exports.IERC20__factory = exports.IERC20Metadata__factory = exports.factories = void 0;
27
- exports.IInterestRateModel__factory = exports.IGearToken__factory = exports.IDieselTokenExceptions__factory = exports.IDieselToken__factory = exports.IDegenNFTExceptions__factory = exports.IDegenNFT__factory = exports.IDataCompressorExceptions__factory = exports.IDataCompressor__factory = exports.ICreditManagerV2Exceptions__factory = exports.ICreditManagerV2Events__factory = exports.ICreditManagerV2__factory = exports.ICreditFacadeExtended__factory = exports.ICreditFacadeExceptions__factory = exports.ICreditFacadeEvents__factory = exports.ICreditFacade__factory = exports.ICreditConfiguratorExceptions__factory = exports.ICreditConfiguratorEvents__factory = exports.ICreditConfigurator__factory = exports.ICreditAccount__factory = exports.ICrediAccountExceptions__factory = exports.IContractsRegisterEvents__factory = exports.IContractsRegister__factory = exports.IAddressProviderEvents__factory = exports.IAddressProvider__factory = exports.IACLExceptions__factory = exports.IACLEvents__factory = exports.IACL__factory = exports.IAccountFactoryGetters__factory = exports.IAccountFactoryEvents__factory = exports.IAccountFactory__factory = exports.IWETH__factory = exports.IYearnV2Adapter__factory = exports.IUniswapV3AdapterExceptions__factory = exports.IUniswapV3Adapter__factory = exports.IUniswapV2Adapter__factory = exports.IwstETHV1Adapter__factory = exports.ILidoV1AdapterExceptions__factory = exports.ILidoV1AdapterEvents__factory = exports.ILidoV1Adapter__factory = exports.IUniversalAdapterExceptions__factory = exports.IUniversalAdapter__factory = exports.IAdapterExceptions__factory = exports.IAdapter__factory = exports.ICurveV1AdapterExceptions__factory = exports.ICurveV1Adapter__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = exports.ICurveV1_2AssetsAdapter__factory = exports.IConvexV1BoosterAdapter__factory = exports.IConvexV1BaseRewardPoolAdapterErrors__factory = void 0;
28
- exports.Multicall2__factory = exports.AggregatorV3Interface__factory = exports.IToken__factory = exports.ISupportedContracts__factory = exports.ITokenTestSuite__factory = exports.ILockedCvx__factory = exports.ILidoMockEvents__factory = exports.IWrapper__factory = exports.IWithdrawerOptions__factory = exports.IWithdrawer__factory = exports.ISwapper__factory = exports.ISwapAggregator__factory = exports.IPathResolver__factory = exports.IPathFinderComponent__factory = exports.IPathFinder__factory = exports.ILPWorkerOptions__factory = exports.ILPWorker__factory = exports.IGasPricer__factory = exports.IDepositorOptions__factory = exports.IDepositor__factory = exports.IClosePathResolver__factory = exports.IPriceOracle__factory = exports.ICreditManager__factory = exports.ICreditFilter__factory = exports.IWETHGateway__factory = exports.IVersion__factory = exports.IPriceOracleV2Ext__factory = exports.IPriceOracleV2Exceptions__factory = exports.IPriceOracleV2Events__factory = exports.IPriceOracleV2__factory = exports.IPriceFeedType__factory = exports.IPriceFeedAddress__factory = exports.IPoolServiceEvents__factory = exports.IPoolService__factory = exports.IPhantomERC20__factory = exports.IMerkleDistributor__factory = exports.ILPPriceFeedExceptions__factory = exports.ILPPriceFeedEvents__factory = exports.ILPPriceFeed__factory = void 0;
27
+ exports.IGearToken__factory = exports.IDieselTokenExceptions__factory = exports.IDieselToken__factory = exports.IDegenNFTExceptions__factory = exports.IDegenNFT__factory = exports.IDegenDistributor__factory = exports.IDataCompressorExceptions__factory = exports.IDataCompressor__factory = exports.ICreditManagerV2Exceptions__factory = exports.ICreditManagerV2Events__factory = exports.ICreditManagerV2__factory = exports.ICreditFacadeExtended__factory = exports.ICreditFacadeExceptions__factory = exports.ICreditFacadeEvents__factory = exports.ICreditFacade__factory = exports.ICreditConfiguratorExceptions__factory = exports.ICreditConfiguratorEvents__factory = exports.ICreditConfigurator__factory = exports.ICreditAccount__factory = exports.ICrediAccountExceptions__factory = exports.IContractsRegisterEvents__factory = exports.IContractsRegister__factory = exports.IAddressProviderEvents__factory = exports.IAddressProvider__factory = exports.IACLExceptions__factory = exports.IACLEvents__factory = exports.IACL__factory = exports.IAccountFactoryGetters__factory = exports.IAccountFactoryEvents__factory = exports.IAccountFactory__factory = exports.IWETH__factory = exports.IYearnV2Adapter__factory = exports.IUniswapV3AdapterExceptions__factory = exports.IUniswapV3Adapter__factory = exports.IUniswapV2Adapter__factory = exports.IwstETHV1Adapter__factory = exports.ILidoV1AdapterExceptions__factory = exports.ILidoV1AdapterEvents__factory = exports.ILidoV1Adapter__factory = exports.IUniversalAdapterExceptions__factory = exports.IUniversalAdapter__factory = exports.IAdapterExceptions__factory = exports.IAdapter__factory = exports.ICurveV1AdapterExceptions__factory = exports.ICurveV1Adapter__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = exports.ICurveV1_2AssetsAdapter__factory = exports.IConvexV1BoosterAdapter__factory = exports.IConvexV1BaseRewardPoolAdapterErrors__factory = void 0;
28
+ exports.Multicall2__factory = exports.AggregatorV3Interface__factory = exports.IToken__factory = exports.ISupportedContracts__factory = exports.ITokenTestSuite__factory = exports.ILockedCvx__factory = exports.ILidoMockEvents__factory = exports.IWrapper__factory = exports.IWithdrawerOptions__factory = exports.IWithdrawer__factory = exports.ISwapper__factory = exports.ISwapAggregator__factory = exports.IPathResolver__factory = exports.IPathFinderComponent__factory = exports.IPathFinder__factory = exports.ILPWorkerOptions__factory = exports.ILPWorker__factory = exports.IGasPricer__factory = exports.IDepositorOptions__factory = exports.IDepositor__factory = exports.IClosePathResolver__factory = exports.IPriceOracle__factory = exports.ICreditManager__factory = exports.ICreditFilter__factory = exports.IWETHGateway__factory = exports.IVersion__factory = exports.IPriceOracleV2Ext__factory = exports.IPriceOracleV2Exceptions__factory = exports.IPriceOracleV2Events__factory = exports.IPriceOracleV2__factory = exports.IPriceFeedType__factory = exports.IPriceFeedAddress__factory = exports.IPoolServiceEvents__factory = exports.IPoolService__factory = exports.IPhantomERC20__factory = exports.IMerkleDistributor__factory = exports.ILPPriceFeedExceptions__factory = exports.ILPPriceFeedEvents__factory = exports.ILPPriceFeed__factory = exports.IInterestRateModel__factory = void 0;
29
29
  exports.factories = __importStar(require("./factories"));
30
30
  var IERC20Metadata__factory_1 = require("./factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory");
31
31
  Object.defineProperty(exports, "IERC20Metadata__factory", { enumerable: true, get: function () { return IERC20Metadata__factory_1.IERC20Metadata__factory; } });
@@ -213,6 +213,8 @@ var IDataCompressor__factory_1 = require("./factories/contracts/interfaces/IData
213
213
  Object.defineProperty(exports, "IDataCompressor__factory", { enumerable: true, get: function () { return IDataCompressor__factory_1.IDataCompressor__factory; } });
214
214
  var IDataCompressorExceptions__factory_1 = require("./factories/contracts/interfaces/IDataCompressor.sol/IDataCompressorExceptions__factory");
215
215
  Object.defineProperty(exports, "IDataCompressorExceptions__factory", { enumerable: true, get: function () { return IDataCompressorExceptions__factory_1.IDataCompressorExceptions__factory; } });
216
+ var IDegenDistributor__factory_1 = require("./factories/contracts/interfaces/IDegenDistributor__factory");
217
+ Object.defineProperty(exports, "IDegenDistributor__factory", { enumerable: true, get: function () { return IDegenDistributor__factory_1.IDegenDistributor__factory; } });
216
218
  var IDegenNFT__factory_1 = require("./factories/contracts/interfaces/IDegenNFT.sol/IDegenNFT__factory");
217
219
  Object.defineProperty(exports, "IDegenNFT__factory", { enumerable: true, get: function () { return IDegenNFT__factory_1.IDegenNFT__factory; } });
218
220
  var IDegenNFTExceptions__factory_1 = require("./factories/contracts/interfaces/IDegenNFT.sol/IDegenNFTExceptions__factory");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.11.6",
3
+ "version": "1.11.8",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",