@gearbox-protocol/sdk 3.0.0-prevfour.13 → 3.0.0-prevfour.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/contracts/index.sol +1 -0
  2. package/lib/apy/defiLamaAPY.js +1 -0
  3. package/lib/core/endpoint.d.ts +1 -0
  4. package/lib/core/endpoint.js +3 -0
  5. package/lib/gearboxRewards/api.js +2 -2
  6. package/lib/gearboxRewards/extraAPY.js +7 -7
  7. package/lib/types/IPToken.d.ts +21 -0
  8. package/lib/types/{IPendleSY.js → IPToken.js} +11 -4
  9. package/lib/types/IPendleMarket.d.ts +3 -27
  10. package/lib/types/IPendleMarket.js +3 -19
  11. package/lib/types/IPendleRouter.d.ts +536 -0
  12. package/lib/types/IPendleRouter.js +370 -0
  13. package/lib/types/IPendleRouterAdapter.d.ts +831 -0
  14. package/lib/types/IPendleRouterAdapter.js +572 -0
  15. package/lib/types/IPendleRouterAdapterEvents.d.ts +26 -0
  16. package/lib/types/IPendleRouterAdapterEvents.js +39 -0
  17. package/lib/types/IPendleRouterAdapterExceptions.d.ts +9 -0
  18. package/lib/types/IPendleRouterAdapterExceptions.js +10 -0
  19. package/lib/types/{IPendleYT.d.ts → IRouterComponent.d.ts} +8 -8
  20. package/lib/types/{IPendleYT.js → IRouterComponent.js} +8 -8
  21. package/lib/types/IRouterStatic.d.ts +128 -0
  22. package/lib/types/IRouterStatic.js +68 -0
  23. package/lib/types/ISwapper.d.ts +100 -0
  24. package/lib/types/ISwapper.js +75 -0
  25. package/lib/types/IYToken.d.ts +21 -0
  26. package/lib/types/IYToken.js +22 -0
  27. package/lib/types/PendleSwapper.d.ts +182 -0
  28. package/lib/types/PendleSwapper.js +130 -0
  29. package/lib/types/RouterComponentConfigurator.d.ts +61 -0
  30. package/lib/types/RouterComponentConfigurator.js +48 -0
  31. package/lib/types/index.d.ts +11 -2
  32. package/lib/types/index.js +11 -2
  33. package/package.json +7 -8
  34. package/lib/types/IPendleSY.d.ts +0 -11
@@ -84,6 +84,7 @@ import {IStakingRewardsAdapter} from
84
84
  import {IMulticall3} from "@gearbox-protocol/router-v3/lib/forge-std/src/interfaces/IMulticall3.sol";
85
85
  import {IRouterV3} from "@gearbox-protocol/router-v3/contracts/interfaces/IRouterV3.sol";
86
86
  import {IRouter} from "@gearbox-protocol/router/contracts/interfaces/IRouter.sol";
87
+ import {PendleSwapper} from "@gearbox-protocol/router-v3/contracts/workers/PendleSwapper.sol";
87
88
 
88
89
  import {IFarmingPool} from "@1inch/farming/contracts/interfaces/IFarmingPool.sol";
89
90
 
@@ -48,6 +48,7 @@ const NORMAL_TO_LAMA = {
48
48
  PT_corn_eBTC_27MAR2025: "eb7de368-b460-4638-bde1-50a129109b7b",
49
49
  PT_corn_pumpBTC_26DEC2024: "a23e2b97-ff92-4ebf-8c7d-171cad8431ad",
50
50
  PT_sUSDe_27MAR2025: "6b28892f-0909-418d-b4bb-3106fff72449",
51
+ scrvUSD: "5fd328af-4203-471b-bd16-1705c726d926",
51
52
  },
52
53
  Optimism: { rETH: "d4b3c522-6127-4b89-bedf-83641cdcd2eb" },
53
54
  Arbitrum: {
@@ -10,6 +10,7 @@ export declare class GearboxBackendApi {
10
10
  static getNFTMerkleUrl: (network: NetworkType, root: Address) => string;
11
11
  static getLeaderboardUrl: (url: string, chainId: number) => string;
12
12
  static getReferralUrl: () => string;
13
+ static apyServerAllRewards: (chainId: number) => string;
13
14
  }
14
15
  interface Options {
15
16
  params?: Record<string, string | number>;
@@ -62,6 +62,9 @@ class GearboxBackendApi {
62
62
  return `${LEADERBOARD_APIS[chainId]}${url}`;
63
63
  };
64
64
  static getReferralUrl = () => REFERRAL_API;
65
+ static apyServerAllRewards = (chainId) => URLApi.getRelativeUrl("https://testnet.gearbox.foundation/apy-server/api/rewards/all", {
66
+ params: { chain_id: chainId },
67
+ });
65
68
  }
66
69
  exports.GearboxBackendApi = GearboxBackendApi;
67
70
  class URLApi {
@@ -13,9 +13,9 @@ const formatter_1 = require("../utils/formatter");
13
13
  const math_1 = require("../utils/math");
14
14
  const merklAPI_1 = require("./merklAPI");
15
15
  const DEFAULT_POOLS_WITH_EXTRA_REWARDS = {
16
- Mainnet: ["sdcrvUSDV3"],
16
+ Mainnet: [],
17
17
  Arbitrum: [],
18
- Optimism: ["sdUSDC_eV3", "sdWETHV3"],
18
+ Optimism: ["sdWETHV3"],
19
19
  Base: [],
20
20
  };
21
21
  class GearboxRewardsApi {
@@ -13,13 +13,6 @@ const math_1 = require("../utils/math");
13
13
  const POOL_POINTS = {
14
14
  Mainnet: {
15
15
  [contractsRegister_1.poolByNetwork.Mainnet.WETH_V3_TRADE]: {
16
- // !& ezETH
17
- // ezETH: {
18
- // amount: PERCENTAGE_FACTOR,
19
- // symbol: "ezETH",
20
- // duration: "hour",
21
- // name: "ezPoint",
22
- // },
23
16
  rsETH: {
24
17
  amount: 7500n * 10000n,
25
18
  symbol: "rsETH",
@@ -36,6 +29,13 @@ const POOL_POINTS = {
36
29
  name: "Lombard LUX",
37
30
  estimation: "absolute",
38
31
  },
32
+ pumpBTC: {
33
+ amount: 172800n * 10000n,
34
+ symbol: "pumpBTC",
35
+ duration: "day",
36
+ name: "Pump BTC",
37
+ estimation: "absolute",
38
+ },
39
39
  },
40
40
  },
41
41
  Arbitrum: {},
@@ -0,0 +1,21 @@
1
+ export declare const ipTokenAbi: readonly [{
2
+ readonly type: "function";
3
+ readonly inputs: readonly [];
4
+ readonly name: "YT";
5
+ readonly outputs: readonly [{
6
+ readonly name: "";
7
+ readonly internalType: "address";
8
+ readonly type: "address";
9
+ }];
10
+ readonly stateMutability: "view";
11
+ }, {
12
+ readonly type: "function";
13
+ readonly inputs: readonly [];
14
+ readonly name: "expiry";
15
+ readonly outputs: readonly [{
16
+ readonly name: "";
17
+ readonly internalType: "uint256";
18
+ readonly type: "uint256";
19
+ }];
20
+ readonly stateMutability: "view";
21
+ }];
@@ -1,14 +1,21 @@
1
1
  "use strict";
2
2
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
3
- // IPendleSY
3
+ // IPToken
4
4
  //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.iPendleSyAbi = void 0;
7
- exports.iPendleSyAbi = [
6
+ exports.ipTokenAbi = void 0;
7
+ exports.ipTokenAbi = [
8
8
  {
9
9
  type: "function",
10
10
  inputs: [],
11
- name: "exchangeRate",
11
+ name: "YT",
12
+ outputs: [{ name: "", internalType: "address", type: "address" }],
13
+ stateMutability: "view",
14
+ },
15
+ {
16
+ type: "function",
17
+ inputs: [],
18
+ name: "expiry",
12
19
  outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
13
20
  stateMutability: "view",
14
21
  },
@@ -1,41 +1,17 @@
1
1
  export declare const iPendleMarketAbi: readonly [{
2
- readonly type: "function";
3
- readonly inputs: readonly [];
4
- readonly name: "expiry";
5
- readonly outputs: readonly [{
6
- readonly name: "";
7
- readonly internalType: "uint256";
8
- readonly type: "uint256";
9
- }];
10
- readonly stateMutability: "view";
11
- }, {
12
- readonly type: "function";
13
- readonly inputs: readonly [{
14
- readonly name: "secondsAgos";
15
- readonly internalType: "uint32[]";
16
- readonly type: "uint32[]";
17
- }];
18
- readonly name: "observe";
19
- readonly outputs: readonly [{
20
- readonly name: "";
21
- readonly internalType: "uint216[]";
22
- readonly type: "uint216[]";
23
- }];
24
- readonly stateMutability: "view";
25
- }, {
26
2
  readonly type: "function";
27
3
  readonly inputs: readonly [];
28
4
  readonly name: "readTokens";
29
5
  readonly outputs: readonly [{
30
- readonly name: "";
6
+ readonly name: "sy";
31
7
  readonly internalType: "address";
32
8
  readonly type: "address";
33
9
  }, {
34
- readonly name: "";
10
+ readonly name: "pt";
35
11
  readonly internalType: "address";
36
12
  readonly type: "address";
37
13
  }, {
38
- readonly name: "";
14
+ readonly name: "yt";
39
15
  readonly internalType: "address";
40
16
  readonly type: "address";
41
17
  }];
@@ -5,30 +5,14 @@
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.iPendleMarketAbi = void 0;
7
7
  exports.iPendleMarketAbi = [
8
- {
9
- type: "function",
10
- inputs: [],
11
- name: "expiry",
12
- outputs: [{ name: "", internalType: "uint256", type: "uint256" }],
13
- stateMutability: "view",
14
- },
15
- {
16
- type: "function",
17
- inputs: [
18
- { name: "secondsAgos", internalType: "uint32[]", type: "uint32[]" },
19
- ],
20
- name: "observe",
21
- outputs: [{ name: "", internalType: "uint216[]", type: "uint216[]" }],
22
- stateMutability: "view",
23
- },
24
8
  {
25
9
  type: "function",
26
10
  inputs: [],
27
11
  name: "readTokens",
28
12
  outputs: [
29
- { name: "", internalType: "address", type: "address" },
30
- { name: "", internalType: "address", type: "address" },
31
- { name: "", internalType: "address", type: "address" },
13
+ { name: "sy", internalType: "address", type: "address" },
14
+ { name: "pt", internalType: "address", type: "address" },
15
+ { name: "yt", internalType: "address", type: "address" },
32
16
  ],
33
17
  stateMutability: "view",
34
18
  },