@gearbox-protocol/sdk 1.15.11 → 1.15.13

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.
@@ -21,16 +21,23 @@ exports.stEthPoolWrapper = {
21
21
  };
22
22
  exports.deployedContracts = {
23
23
  // MAINNET
24
- "0x24946bCbBd028D5ABb62ad9B635EB1b1a67AF668": "DAI",
25
24
  "0x777E23A2AcB2fCbB35f6ccF98272d03C722Ba6EB": "DAI",
26
- "0x86130bDD69143D8a4E5fc50bf4323D48049E98E4": "USDC",
27
25
  "0x2664cc24CBAd28749B3Dd6fC97A6B402484De527": "USDC",
28
- "0xB03670c20F87f2169A7c4eBE35746007e9575901": "WETH",
29
26
  "0x968f9a68a98819E2e6Bb910466e191A7b6cf02F0": "WETH",
30
- "0xB2A015c71c17bCAC6af36645DEad8c572bA08A08": "WBTC",
31
27
  "0xC38478B0A4bAFE964C3526EEFF534d70E1E09017": "WBTC",
28
+ // MAINNET POOLS
29
+ "0x24946bCbBd028D5ABb62ad9B635EB1b1a67AF668": "DAI",
30
+ "0x86130bDD69143D8a4E5fc50bf4323D48049E98E4": "USDC",
31
+ "0xB03670c20F87f2169A7c4eBE35746007e9575901": "WETH",
32
32
  "0xB8cf3Ed326bB0E51454361Fb37E9E8df6DC5C286": "wstETH",
33
- // GOERLI
33
+ "0xB2A015c71c17bCAC6af36645DEad8c572bA08A08": "WBTC",
34
+ // MAINNET V2 CM
35
+ "0x672461bfc20dd783444a830ad4c38b345ab6e2f7": "DAI",
36
+ "0x95357303f995e184a7998da6c6ea35cc728a1900": "USDC",
37
+ "0x5887ad4cb2352e7f01527035faa3ae0ef2ce2b9b": "WETH",
38
+ "0xe0bce4460795281d39c91da9b0275bca968293de": "wstETH",
39
+ "0xc62bf8a7889adf1c5dc4665486c7683ae6e74e0f": "WBTC",
40
+ // GOERLI CM
34
41
  "0xf7ba434952acaa2e12035a2c3643ca327914a470": "DAI",
35
42
  "0x2144a7785baecbab32295188285717cad6c1a11c": "USDC",
36
43
  "0x2ad4a2f1bdd815e285a22cdcc072fbb43818b09b": "WETH",
@@ -42,8 +42,8 @@ var constants_1 = require("../core/constants");
42
42
  var token_1 = require("../tokens/token");
43
43
  var types_1 = require("../types");
44
44
  var pathOptions_1 = require("./pathOptions");
45
- var MAX_GAS_PER_ROUTE = 14e6;
46
- var GAS_PER_BLOCK = 30e6;
45
+ var MAX_GAS_PER_ROUTE = 200e6;
46
+ var GAS_PER_BLOCK = 400e6;
47
47
  var PathFinder = /** @class */ (function () {
48
48
  function PathFinder(address, provider, network, connectors) {
49
49
  if (network === void 0) { network = "Mainnet"; }
@@ -69,7 +69,9 @@ var PathFinder = /** @class */ (function () {
69
69
  slippage: slippage,
70
70
  externalSlippage: false,
71
71
  };
72
- return [4 /*yield*/, this.pathFinder.callStatic.findAllSwaps(swapTask)];
72
+ return [4 /*yield*/, this.pathFinder.callStatic.findAllSwaps(swapTask, {
73
+ gasLimit: GAS_PER_BLOCK,
74
+ })];
73
75
  case 1:
74
76
  results = _a.sent();
75
77
  unique = {};
@@ -94,7 +96,9 @@ var PathFinder = /** @class */ (function () {
94
96
  switch (_a.label) {
95
97
  case 0:
96
98
  tokenInAddr = token_1.tokenDataByNetwork[this.network][tokenIn] || tokenIn;
97
- return [4 /*yield*/, this.pathFinder.callStatic.findOneTokenPath(tokenInAddr, amount, token_1.tokenDataByNetwork[this.network][tokenOut] || tokenOut, creditAccount.addr, this._connectors, slippage)];
99
+ return [4 /*yield*/, this.pathFinder.callStatic.findOneTokenPath(tokenInAddr, amount, token_1.tokenDataByNetwork[this.network][tokenOut] || tokenOut, creditAccount.addr, this._connectors, slippage, {
100
+ gasLimit: GAS_PER_BLOCK,
101
+ })];
98
102
  case 1:
99
103
  result = _a.sent();
100
104
  return [2 /*return*/, {
@@ -134,7 +138,9 @@ var PathFinder = /** @class */ (function () {
134
138
  token: token,
135
139
  balance: expectedBalancesAddr[token] || 0,
136
140
  }); });
137
- return [4 /*yield*/, this.pathFinder.callStatic.findOpenStrategyPath(cm.address, balances, targetAddr, this._connectors, slippage)];
141
+ return [4 /*yield*/, this.pathFinder.callStatic.findOpenStrategyPath(cm.address, balances, targetAddr, this._connectors, slippage, {
142
+ gasLimit: GAS_PER_BLOCK,
143
+ })];
138
144
  case 1:
139
145
  result = _a.sent();
140
146
  balancesAfter = result[0].reduce(function (acc, b) {
@@ -168,7 +174,9 @@ var PathFinder = /** @class */ (function () {
168
174
  loopsPerTx = Math.floor(GAS_PER_BLOCK / MAX_GAS_PER_ROUTE);
169
175
  pathOptions = pathOptions_1.PathOptionFactory.generatePathOptions(creditAccount.allBalances, loopsPerTx);
170
176
  requests = pathOptions.map(function (po) {
171
- return _this.pathFinder.callStatic.findBestClosePath(creditAccount.addr, _this._connectors, slippage, po, loopsPerTx, false);
177
+ return _this.pathFinder.callStatic.findBestClosePath(creditAccount.addr, _this._connectors, slippage, po, loopsPerTx, false, {
178
+ gasLimit: GAS_PER_BLOCK,
179
+ });
172
180
  });
173
181
  return [4 /*yield*/, Promise.all(requests)];
174
182
  case 1:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "1.15.11",
3
+ "version": "1.15.13",
4
4
  "description": "Gearbox SDK",
5
5
  "main": "./lib/index.js",
6
6
  "types": "./lib/index.d.ts",