@gearbox-protocol/sdk 8.1.3 → 8.1.5

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.
@@ -490,6 +490,16 @@ const normalTokens = {
490
490
  name: "cp0xLRT",
491
491
  symbol: "cp0xLRT",
492
492
  type: { AllNetworks: import_tokenType.TokenType.NORMAL_TOKEN }
493
+ },
494
+ uptBTC: {
495
+ name: "uptBTC",
496
+ symbol: "uptBTC",
497
+ type: { AllNetworks: import_tokenType.TokenType.NORMAL_TOKEN }
498
+ },
499
+ PT_uptBTC_14AUG2025: {
500
+ name: "Pendle PT uptBTC 14 August 2025 expiry",
501
+ symbol: "PT_uptBTC_14AUG2025",
502
+ type: { AllNetworks: import_tokenType.TokenType.NORMAL_TOKEN }
493
503
  }
494
504
  };
495
505
  const isNormalToken = (t) => typeof t === "string" && !!normalTokens[t];
@@ -334,6 +334,8 @@ const tokenDataByNetwork = {
334
334
  DVstETH: "0x5E362eb2c0706Bd1d134689eC75176018385430B",
335
335
  waEthLidowstETH: "0x775F661b0bD1739349b9A2A3EF60be277c5d2D29",
336
336
  cp0xLRT: "0xB908c9FE885369643adB5FBA4407d52bD726c72d",
337
+ uptBTC: "0x8AcA0841993ef4C87244d519166e767f49362C21",
338
+ PT_uptBTC_14AUG2025: "0x7c853d6bfb49256af65af672dcc3f66c015e96e0",
337
339
  BTCB: import_constants.NOT_DEPLOYED,
338
340
  WBNB: import_constants.NOT_DEPLOYED,
339
341
  dUSDTv310: import_constants.NOT_DEPLOYED,
@@ -652,6 +654,8 @@ const tokenDataByNetwork = {
652
654
  DVstETH: import_constants.NOT_DEPLOYED,
653
655
  waEthLidowstETH: import_constants.NOT_DEPLOYED,
654
656
  cp0xLRT: import_constants.NOT_DEPLOYED,
657
+ uptBTC: import_constants.NOT_DEPLOYED,
658
+ PT_uptBTC_14AUG2025: import_constants.NOT_DEPLOYED,
655
659
  BTCB: import_constants.NOT_DEPLOYED,
656
660
  WBNB: import_constants.NOT_DEPLOYED,
657
661
  dUSDTv310: import_constants.NOT_DEPLOYED,
@@ -970,6 +974,8 @@ const tokenDataByNetwork = {
970
974
  DVstETH: import_constants.NOT_DEPLOYED,
971
975
  waEthLidowstETH: import_constants.NOT_DEPLOYED,
972
976
  cp0xLRT: import_constants.NOT_DEPLOYED,
977
+ uptBTC: import_constants.NOT_DEPLOYED,
978
+ PT_uptBTC_14AUG2025: import_constants.NOT_DEPLOYED,
973
979
  BTCB: import_constants.NOT_DEPLOYED,
974
980
  WBNB: import_constants.NOT_DEPLOYED,
975
981
  dUSDTv310: import_constants.NOT_DEPLOYED,
@@ -1287,6 +1293,8 @@ const tokenDataByNetwork = {
1287
1293
  DVstETH: import_constants.NOT_DEPLOYED,
1288
1294
  waEthLidowstETH: import_constants.NOT_DEPLOYED,
1289
1295
  cp0xLRT: import_constants.NOT_DEPLOYED,
1296
+ uptBTC: import_constants.NOT_DEPLOYED,
1297
+ PT_uptBTC_14AUG2025: import_constants.NOT_DEPLOYED,
1290
1298
  BTCB: import_constants.NOT_DEPLOYED,
1291
1299
  WBNB: import_constants.NOT_DEPLOYED,
1292
1300
  dUSDTv310: import_constants.NOT_DEPLOYED,
@@ -1604,6 +1612,8 @@ const tokenDataByNetwork = {
1604
1612
  DVstETH: import_constants.NOT_DEPLOYED,
1605
1613
  waEthLidowstETH: import_constants.NOT_DEPLOYED,
1606
1614
  cp0xLRT: import_constants.NOT_DEPLOYED,
1615
+ uptBTC: import_constants.NOT_DEPLOYED,
1616
+ PT_uptBTC_14AUG2025: import_constants.NOT_DEPLOYED,
1607
1617
  BTCB: import_constants.NOT_DEPLOYED,
1608
1618
  WBNB: import_constants.NOT_DEPLOYED,
1609
1619
  dUSDTv310: import_constants.NOT_DEPLOYED,
@@ -91,31 +91,13 @@ async function simulateMulticall(client, parameters) {
91
91
  account
92
92
  };
93
93
  const results = [];
94
- let result;
95
- try {
96
- const { data } = await (0, import_utils.getAction)(client, import_actions.call, "call")(request);
97
- result = (0, import_viem.decodeFunctionResult)({
98
- abi: import_viem.multicall3Abi,
99
- args: [calls],
100
- functionName: "aggregate3",
101
- data: data || "0x"
102
- });
103
- } catch (e) {
104
- if (!allowFailure) {
105
- throw e;
106
- }
107
- for (const _ of contracts) {
108
- results.push({
109
- status: "failure",
110
- error: e,
111
- result: void 0
112
- });
113
- }
114
- return {
115
- results,
116
- request
117
- };
118
- }
94
+ const { data } = await (0, import_utils.getAction)(client, import_actions.call, "call")(request);
95
+ const result = (0, import_viem.decodeFunctionResult)({
96
+ abi: import_viem.multicall3Abi,
97
+ args: [calls],
98
+ functionName: "aggregate3",
99
+ data: data || "0x"
100
+ });
119
101
  for (let j = 0; j < result.length; j++) {
120
102
  const { returnData, success } = result[j];
121
103
  const { callData } = calls[j];
@@ -466,6 +466,16 @@ const normalTokens = {
466
466
  name: "cp0xLRT",
467
467
  symbol: "cp0xLRT",
468
468
  type: { AllNetworks: TokenType.NORMAL_TOKEN }
469
+ },
470
+ uptBTC: {
471
+ name: "uptBTC",
472
+ symbol: "uptBTC",
473
+ type: { AllNetworks: TokenType.NORMAL_TOKEN }
474
+ },
475
+ PT_uptBTC_14AUG2025: {
476
+ name: "Pendle PT uptBTC 14 August 2025 expiry",
477
+ symbol: "PT_uptBTC_14AUG2025",
478
+ type: { AllNetworks: TokenType.NORMAL_TOKEN }
469
479
  }
470
480
  };
471
481
  const isNormalToken = (t) => typeof t === "string" && !!normalTokens[t];
@@ -307,6 +307,8 @@ const tokenDataByNetwork = {
307
307
  DVstETH: "0x5E362eb2c0706Bd1d134689eC75176018385430B",
308
308
  waEthLidowstETH: "0x775F661b0bD1739349b9A2A3EF60be277c5d2D29",
309
309
  cp0xLRT: "0xB908c9FE885369643adB5FBA4407d52bD726c72d",
310
+ uptBTC: "0x8AcA0841993ef4C87244d519166e767f49362C21",
311
+ PT_uptBTC_14AUG2025: "0x7c853d6bfb49256af65af672dcc3f66c015e96e0",
310
312
  BTCB: NOT_DEPLOYED,
311
313
  WBNB: NOT_DEPLOYED,
312
314
  dUSDTv310: NOT_DEPLOYED,
@@ -625,6 +627,8 @@ const tokenDataByNetwork = {
625
627
  DVstETH: NOT_DEPLOYED,
626
628
  waEthLidowstETH: NOT_DEPLOYED,
627
629
  cp0xLRT: NOT_DEPLOYED,
630
+ uptBTC: NOT_DEPLOYED,
631
+ PT_uptBTC_14AUG2025: NOT_DEPLOYED,
628
632
  BTCB: NOT_DEPLOYED,
629
633
  WBNB: NOT_DEPLOYED,
630
634
  dUSDTv310: NOT_DEPLOYED,
@@ -943,6 +947,8 @@ const tokenDataByNetwork = {
943
947
  DVstETH: NOT_DEPLOYED,
944
948
  waEthLidowstETH: NOT_DEPLOYED,
945
949
  cp0xLRT: NOT_DEPLOYED,
950
+ uptBTC: NOT_DEPLOYED,
951
+ PT_uptBTC_14AUG2025: NOT_DEPLOYED,
946
952
  BTCB: NOT_DEPLOYED,
947
953
  WBNB: NOT_DEPLOYED,
948
954
  dUSDTv310: NOT_DEPLOYED,
@@ -1260,6 +1266,8 @@ const tokenDataByNetwork = {
1260
1266
  DVstETH: NOT_DEPLOYED,
1261
1267
  waEthLidowstETH: NOT_DEPLOYED,
1262
1268
  cp0xLRT: NOT_DEPLOYED,
1269
+ uptBTC: NOT_DEPLOYED,
1270
+ PT_uptBTC_14AUG2025: NOT_DEPLOYED,
1263
1271
  BTCB: NOT_DEPLOYED,
1264
1272
  WBNB: NOT_DEPLOYED,
1265
1273
  dUSDTv310: NOT_DEPLOYED,
@@ -1577,6 +1585,8 @@ const tokenDataByNetwork = {
1577
1585
  DVstETH: NOT_DEPLOYED,
1578
1586
  waEthLidowstETH: NOT_DEPLOYED,
1579
1587
  cp0xLRT: NOT_DEPLOYED,
1588
+ uptBTC: NOT_DEPLOYED,
1589
+ PT_uptBTC_14AUG2025: NOT_DEPLOYED,
1580
1590
  BTCB: NOT_DEPLOYED,
1581
1591
  WBNB: NOT_DEPLOYED,
1582
1592
  dUSDTv310: NOT_DEPLOYED,
@@ -77,31 +77,13 @@ async function simulateMulticall(client, parameters) {
77
77
  account
78
78
  };
79
79
  const results = [];
80
- let result;
81
- try {
82
- const { data } = await getAction(client, call, "call")(request);
83
- result = decodeFunctionResult({
84
- abi: multicall3Abi,
85
- args: [calls],
86
- functionName: "aggregate3",
87
- data: data || "0x"
88
- });
89
- } catch (e) {
90
- if (!allowFailure) {
91
- throw e;
92
- }
93
- for (const _ of contracts) {
94
- results.push({
95
- status: "failure",
96
- error: e,
97
- result: void 0
98
- });
99
- }
100
- return {
101
- results,
102
- request
103
- };
104
- }
80
+ const { data } = await getAction(client, call, "call")(request);
81
+ const result = decodeFunctionResult({
82
+ abi: multicall3Abi,
83
+ args: [calls],
84
+ functionName: "aggregate3",
85
+ data: data || "0x"
86
+ });
105
87
  for (let j = 0; j < result.length; j++) {
106
88
  const { returnData, success } = result[j];
107
89
  const { callData } = calls[j];
@@ -1,7 +1,7 @@
1
1
  import type { TokenBase } from "./token.js";
2
2
  import type { TokenNetwork } from "./tokenType.js";
3
3
  import { TokenType } from "./tokenType.js";
4
- export type NormalToken = "1INCH" | "AAVE" | "CRV" | "LINK" | "SNX" | "UNI" | "USDT" | "DOLA" | "USDC" | "USDC_e" | "DAI" | "WETH" | "WBTC" | "tBTC" | "YFI" | "WLD" | "OP" | "STETH" | "CVX" | "FRAX" | "FXS" | "LDO" | "LUSD" | "sUSD" | "GUSD" | "LQTY" | "GMX" | "ARB" | "BAL" | "ARB" | "MKR" | "RPL" | "APE" | "rETH" | "AURA" | "LBTC" | "eBTC" | "solvBTC" | "pumpBTC" | "osETH" | "weETH" | "SWISE" | "ezETH" | "rsETH" | "PENDLE" | "frxETH" | "cbETH" | "rswETH" | "USDe" | "GHO" | "pufETH" | "wstETH" | "USDS" | "SKY" | "beraSTONE" | "wS" | "stS" | "scUSD" | "T" | "tETH" | "USDL" | "wUSDL" | "csUSDL" | "RLUSD" | "MORPHO" | "steakLRT" | "Re7LRT" | "amphrETH" | "rstETH" | "pzETH" | "DVstETH" | "waEthLidowstETH" | "PT_rsETH_26SEP2024" | "PT_sUSDe_26DEC2024" | "PT_eETH_26DEC2024" | "PT_ezETH_26DEC2024" | "PT_eBTC_26DEC2024" | "PT_LBTC_27MAR2025" | "PT_corn_solvBTC_BBN_26DEC2024" | "PT_corn_pumpBTC_26DEC2024" | "PT_cornLBTC_26DEC2024" | "PT_corn_eBTC_27MAR2025" | "PT_sUSDe_27MAR2025" | "PT_sUSDe_29MAY2025" | "PT_beraSTONE_10APR2025" | "rstETH_Lido_wstETH" | "DVstETH_Prime_wstETH" | "SHIB" | "crvUSD" | "WBNB" | "BTCB" | "USD1" | "USDX" | "cp0xLRT";
4
+ export type NormalToken = "1INCH" | "AAVE" | "CRV" | "LINK" | "SNX" | "UNI" | "USDT" | "DOLA" | "USDC" | "USDC_e" | "DAI" | "WETH" | "WBTC" | "tBTC" | "YFI" | "WLD" | "OP" | "STETH" | "CVX" | "FRAX" | "FXS" | "LDO" | "LUSD" | "sUSD" | "GUSD" | "LQTY" | "GMX" | "ARB" | "BAL" | "ARB" | "MKR" | "RPL" | "APE" | "rETH" | "AURA" | "LBTC" | "eBTC" | "solvBTC" | "pumpBTC" | "osETH" | "weETH" | "SWISE" | "ezETH" | "rsETH" | "PENDLE" | "frxETH" | "cbETH" | "rswETH" | "USDe" | "GHO" | "pufETH" | "wstETH" | "USDS" | "SKY" | "beraSTONE" | "wS" | "stS" | "scUSD" | "T" | "tETH" | "USDL" | "wUSDL" | "csUSDL" | "RLUSD" | "MORPHO" | "steakLRT" | "Re7LRT" | "amphrETH" | "rstETH" | "pzETH" | "DVstETH" | "waEthLidowstETH" | "PT_rsETH_26SEP2024" | "PT_sUSDe_26DEC2024" | "PT_eETH_26DEC2024" | "PT_ezETH_26DEC2024" | "PT_eBTC_26DEC2024" | "PT_LBTC_27MAR2025" | "PT_corn_solvBTC_BBN_26DEC2024" | "PT_corn_pumpBTC_26DEC2024" | "PT_cornLBTC_26DEC2024" | "PT_corn_eBTC_27MAR2025" | "PT_sUSDe_27MAR2025" | "PT_sUSDe_29MAY2025" | "PT_beraSTONE_10APR2025" | "rstETH_Lido_wstETH" | "DVstETH_Prime_wstETH" | "SHIB" | "crvUSD" | "WBNB" | "BTCB" | "USD1" | "USDX" | "cp0xLRT" | "uptBTC" | "PT_uptBTC_14AUG2025";
5
5
  export type NormalTokenData = {
6
6
  symbol: NormalToken;
7
7
  type: Partial<Record<TokenNetwork, TokenType.NORMAL_TOKEN>>;
@@ -23,6 +23,10 @@ export interface SimulateMulticallReturnType<contracts extends readonly unknown[
23
23
  /**
24
24
  * This is "multicall" action from viem, modified to use "simulateContract" instead of "readContract"
25
25
  * Unlike viem's multicall there's no batching, since for simulation we assume that calls are dependent
26
+ *
27
+ * Another difference is how network errors are threated
28
+ * In case of multicall-level error (network, out of gas, header not found, etc.) this method will throw even with allowFailure=true,
29
+ * while original multicall with allowFailure=true will return `failure` for all calls, and push error down to each call
26
30
  * @param client
27
31
  * @param parameters
28
32
  * @returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gearbox-protocol/sdk",
3
- "version": "8.1.3",
3
+ "version": "8.1.5",
4
4
  "description": "Gearbox SDK",
5
5
  "license": "MIT",
6
6
  "main": "./dist/cjs/sdk/index.js",