@gearbox-protocol/sdk 3.0.0-next.207 → 3.0.0-next.209
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/lib/core/strategy.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ export interface StrategyPayload {
|
|
|
6
6
|
name: string;
|
|
7
7
|
lpTokenSymbol: AllLPTokens;
|
|
8
8
|
protocolSymbol: string;
|
|
9
|
-
creditManagers: Array<Address>;
|
|
10
9
|
collateralTokens: Array<SupportedToken>;
|
|
11
10
|
liquidationTokens: Array<SupportedToken>;
|
|
12
11
|
}
|
|
@@ -22,7 +21,6 @@ export declare class Strategy {
|
|
|
22
21
|
readonly protocolSymbol: string;
|
|
23
22
|
readonly collateralTokens: Array<SupportedToken>;
|
|
24
23
|
readonly liquidationTokens: Array<SupportedToken>;
|
|
25
|
-
readonly creditManagers: Array<Address>;
|
|
26
24
|
constructor(payload: StrategyPayload);
|
|
27
25
|
static maxLeverage(lpToken: Address, cms: Array<PartialCM>): number;
|
|
28
26
|
static maxAPY({ apy, leverage, baseRateWithFee, quotaRateWithFee, }: CalculateMaxAPYProps): number;
|
package/lib/core/strategy.js
CHANGED
|
@@ -8,12 +8,10 @@ class Strategy {
|
|
|
8
8
|
protocolSymbol;
|
|
9
9
|
collateralTokens;
|
|
10
10
|
liquidationTokens;
|
|
11
|
-
creditManagers;
|
|
12
11
|
constructor(payload) {
|
|
13
12
|
this.name = payload.name;
|
|
14
13
|
this.lpTokenSymbol = payload.lpTokenSymbol;
|
|
15
14
|
this.protocolSymbol = payload.protocolSymbol;
|
|
16
|
-
this.creditManagers = payload.creditManagers.map(addr => addr.toLowerCase());
|
|
17
15
|
this.collateralTokens = payload.collateralTokens;
|
|
18
16
|
this.liquidationTokens = payload.liquidationTokens;
|
|
19
17
|
}
|
|
@@ -14,7 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./abi"), exports);
|
|
18
17
|
__exportStar(require("./api"), exports);
|
|
19
18
|
__exportStar(require("./apy"), exports);
|
|
20
19
|
__exportStar(require("./extraAPY"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gearbox-protocol/sdk",
|
|
3
|
-
"version": "3.0.0-next.
|
|
3
|
+
"version": "3.0.0-next.209",
|
|
4
4
|
"description": "Gearbox SDK",
|
|
5
5
|
"main": "./lib/index.js",
|
|
6
6
|
"types": "./lib/index.d.ts",
|
|
@@ -52,7 +52,6 @@
|
|
|
52
52
|
"@gearbox-protocol/router-v3": "^1.27.1",
|
|
53
53
|
"@openzeppelin/contracts": "^4.9.3",
|
|
54
54
|
"@redstone-finance/evm-connector": "^0.5.4",
|
|
55
|
-
"@typechain/ethers-v6": "^0.5.1",
|
|
56
55
|
"@types/chai": "^4.3.3",
|
|
57
56
|
"@types/deep-eql": "^4.0.0",
|
|
58
57
|
"@types/jest": "^28.1.7",
|
|
@@ -62,7 +61,6 @@
|
|
|
62
61
|
"chai": "^4.3.6",
|
|
63
62
|
"dotenv": "^16.0.1",
|
|
64
63
|
"eslint": "^8.22.0",
|
|
65
|
-
"ethers": "6.12.1",
|
|
66
64
|
"husky": ">=6",
|
|
67
65
|
"jest": "^28.1.3",
|
|
68
66
|
"lint-staged": ">=10",
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MULTICALL_EXTENDED_INTERFACE = void 0;
|
|
4
|
-
const sdk_gov_1 = require("@gearbox-protocol/sdk-gov");
|
|
5
|
-
const ethers_1 = require("ethers");
|
|
6
|
-
const MULTICALL_GET_ABI = [
|
|
7
|
-
...sdk_gov_1.multicallInterface.fragments,
|
|
8
|
-
{
|
|
9
|
-
inputs: [
|
|
10
|
-
{
|
|
11
|
-
internalType: "address",
|
|
12
|
-
name: "addr",
|
|
13
|
-
type: "address",
|
|
14
|
-
},
|
|
15
|
-
],
|
|
16
|
-
name: "getEthBalance",
|
|
17
|
-
outputs: [
|
|
18
|
-
{
|
|
19
|
-
internalType: "uint256",
|
|
20
|
-
name: "balance",
|
|
21
|
-
type: "uint256",
|
|
22
|
-
},
|
|
23
|
-
],
|
|
24
|
-
stateMutability: "view",
|
|
25
|
-
type: "function",
|
|
26
|
-
},
|
|
27
|
-
{
|
|
28
|
-
inputs: [],
|
|
29
|
-
name: "getBlockNumber",
|
|
30
|
-
outputs: [
|
|
31
|
-
{
|
|
32
|
-
internalType: "uint256",
|
|
33
|
-
name: "blockNumber",
|
|
34
|
-
type: "uint256",
|
|
35
|
-
},
|
|
36
|
-
],
|
|
37
|
-
stateMutability: "view",
|
|
38
|
-
type: "function",
|
|
39
|
-
},
|
|
40
|
-
{
|
|
41
|
-
inputs: [],
|
|
42
|
-
name: "getCurrentBlockTimestamp",
|
|
43
|
-
outputs: [
|
|
44
|
-
{
|
|
45
|
-
internalType: "uint256",
|
|
46
|
-
name: "timestamp",
|
|
47
|
-
type: "uint256",
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
stateMutability: "view",
|
|
51
|
-
type: "function",
|
|
52
|
-
},
|
|
53
|
-
];
|
|
54
|
-
exports.MULTICALL_EXTENDED_INTERFACE = new ethers_1.Interface(MULTICALL_GET_ABI);
|