@gearbox-protocol/sdk 1.18.4 → 1.19.1
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/apy/convexAPY.d.ts +13 -10
- package/lib/apy/convexAPY.js +42 -120
- package/lib/apy/gearCurveAPY.d.ts +22 -0
- package/lib/apy/gearCurveAPY.js +58 -0
- package/lib/apy/index.d.ts +1 -0
- package/lib/apy/index.js +1 -0
- package/lib/apy/lidoAPY.d.ts +23 -2
- package/lib/apy/lidoAPY.js +55 -88
- package/lib/contracts/contracts.d.ts +9 -2
- package/lib/contracts/contracts.js +13 -0
- package/lib/contracts/contractsRegister.js +1 -2
- package/lib/core/constants.d.ts +1 -0
- package/lib/core/constants.js +2 -1
- package/lib/core/errors.d.ts +0 -21
- package/lib/core/errors.js +1 -57
- package/lib/types/contracts/support/IOffchainOracle.d.ts +54 -0
- package/lib/types/contracts/support/IOffchainOracle.js +2 -0
- package/lib/types/contracts/support/index.d.ts +1 -0
- package/lib/types/contracts/support/index.js +2 -0
- package/lib/types/factories/contracts/support/IOffchainOracle__factory.d.ts +22 -0
- package/lib/types/factories/contracts/support/IOffchainOracle__factory.js +75 -0
- package/lib/types/factories/contracts/support/index.d.ts +1 -0
- package/lib/types/factories/contracts/support/index.js +8 -0
- package/lib/types/index.d.ts +2 -0
- package/lib/types/index.js +3 -1
- package/package.json +1 -1
package/lib/apy/convexAPY.d.ts
CHANGED
|
@@ -1,24 +1,27 @@
|
|
|
1
|
-
import { BigNumber
|
|
1
|
+
import { BigNumber } from "ethers";
|
|
2
2
|
import { ConvexPoolContract, ConvexPoolParams } from "../contracts/contracts";
|
|
3
3
|
import { NetworkType } from "../core/chains";
|
|
4
4
|
import { CurveLPToken } from "../tokens/curveLP";
|
|
5
5
|
import { SupportedToken } from "../tokens/token";
|
|
6
|
+
import { MCall } from "../utils/multicall";
|
|
6
7
|
import { CurveAPYResult } from "./curveAPY";
|
|
7
8
|
declare type GetTokenPriceCallback = (tokenAddress: string, currency?: string) => BigNumber;
|
|
8
|
-
export interface
|
|
9
|
-
provider: providers.Provider;
|
|
10
|
-
networkType: NetworkType;
|
|
9
|
+
export interface GetConvexAPYBulkProps {
|
|
11
10
|
getTokenPrice: GetTokenPriceCallback;
|
|
12
11
|
curveAPY: CurveAPYResult;
|
|
12
|
+
generated: GetConvexAPYBulkCallsReturns;
|
|
13
|
+
response: Array<BigNumber>;
|
|
13
14
|
}
|
|
14
|
-
export
|
|
15
|
+
export declare function getConvexAPYBulk({ generated, response, getTokenPrice, curveAPY, }: GetConvexAPYBulkProps): BigNumber[];
|
|
16
|
+
declare type GetConvexAPYBulkCallsReturns = ReturnType<typeof getConvexAPYBulkCalls>;
|
|
17
|
+
export interface GetConvexAPYBulkCallsProps {
|
|
15
18
|
pools: Array<ConvexPoolContract>;
|
|
19
|
+
networkType: NetworkType;
|
|
16
20
|
}
|
|
17
|
-
export declare function
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
export declare function getConvexAPY({ pool, provider, networkType, getTokenPrice, curveAPY, }: GetConvexAPYProps): Promise<BigNumber>;
|
|
21
|
+
export declare function getConvexAPYBulkCalls({ pools, networkType, }: GetConvexAPYBulkCallsProps): {
|
|
22
|
+
poolsInfo: (readonly [ConvexPoolParams, string, string, CurveLPToken, string[], Record<SupportedToken, string>])[];
|
|
23
|
+
calls: [MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/curve/ICurvePool").ICurvePoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IConvexToken").IConvexTokenInterface>, ...MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/convex/IBaseRewardPool").IBaseRewardPoolInterface>[]][];
|
|
24
|
+
};
|
|
22
25
|
export declare function getCVXMintAmount(crvAmount: BigNumber, cvxSupply: BigNumber): BigNumber;
|
|
23
26
|
export interface CalculateConvexAPYProps {
|
|
24
27
|
basePoolRate: BigNumber;
|
package/lib/apy/convexAPY.js
CHANGED
|
@@ -1,40 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
2
|
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
39
3
|
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
4
|
if (ar || !(i in from)) {
|
|
@@ -45,100 +9,43 @@ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
|
45
9
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
10
|
};
|
|
47
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.getCVXMintAmount = exports.
|
|
12
|
+
exports.getCVXMintAmount = exports.getConvexAPYBulkCalls = exports.getConvexAPYBulk = void 0;
|
|
49
13
|
var ethers_1 = require("ethers");
|
|
50
14
|
var contracts_1 = require("../contracts/contracts");
|
|
51
15
|
var constants_1 = require("../core/constants");
|
|
52
16
|
var token_1 = require("../tokens/token");
|
|
53
17
|
var types_1 = require("../types");
|
|
54
|
-
var multicall_1 = require("../utils/multicall");
|
|
55
18
|
function getConvexAPYBulk(_a) {
|
|
56
|
-
var
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
return [acc, end];
|
|
81
|
-
}, [[], 0])[0];
|
|
82
|
-
apyList = parsedResponse.map(function (_a, i) {
|
|
83
|
-
var basePoolRate = _a[0], basePoolSupply = _a[1], vPrice = _a[2], cvxSupply = _a[3], extra = _a.slice(4);
|
|
84
|
-
var _b = poolsInfo[i], poolParams = _b[0], underlying = _b[3], extraPoolAddresses = _b[4], tokenList = _b[5];
|
|
85
|
-
var apy = calculateConvexAPY({
|
|
86
|
-
basePoolRate: basePoolRate,
|
|
87
|
-
basePoolSupply: basePoolSupply,
|
|
88
|
-
vPrice: vPrice,
|
|
89
|
-
cvxSupply: cvxSupply,
|
|
90
|
-
extra: extra,
|
|
91
|
-
extraPoolAddresses: extraPoolAddresses,
|
|
92
|
-
poolParams: poolParams,
|
|
93
|
-
underlying: underlying,
|
|
94
|
-
getTokenPrice: getTokenPrice,
|
|
95
|
-
curveAPY: curveAPY,
|
|
96
|
-
tokenList: tokenList,
|
|
97
|
-
});
|
|
98
|
-
return apy;
|
|
99
|
-
});
|
|
100
|
-
return [2 /*return*/, apyList];
|
|
101
|
-
}
|
|
19
|
+
var generated = _a.generated, response = _a.response, getTokenPrice = _a.getTokenPrice, curveAPY = _a.curveAPY;
|
|
20
|
+
var poolsInfo = generated.poolsInfo, calls = generated.calls;
|
|
21
|
+
var parsedResponse = calls.reduce(function (_a, call) {
|
|
22
|
+
var acc = _a[0], start = _a[1];
|
|
23
|
+
var end = start + call.length;
|
|
24
|
+
var currentResponse = response.slice(start, end);
|
|
25
|
+
acc.push(currentResponse);
|
|
26
|
+
return [acc, end];
|
|
27
|
+
}, [[], 0])[0];
|
|
28
|
+
var apyList = parsedResponse.map(function (_a, i) {
|
|
29
|
+
var basePoolRate = _a[0], basePoolSupply = _a[1], vPrice = _a[2], cvxSupply = _a[3], extra = _a.slice(4);
|
|
30
|
+
var _b = poolsInfo[i], poolParams = _b[0], underlying = _b[3], extraPoolAddresses = _b[4], tokenList = _b[5];
|
|
31
|
+
var apy = calculateConvexAPY({
|
|
32
|
+
basePoolRate: basePoolRate,
|
|
33
|
+
basePoolSupply: basePoolSupply,
|
|
34
|
+
vPrice: vPrice,
|
|
35
|
+
cvxSupply: cvxSupply,
|
|
36
|
+
extra: extra,
|
|
37
|
+
extraPoolAddresses: extraPoolAddresses,
|
|
38
|
+
poolParams: poolParams,
|
|
39
|
+
underlying: underlying,
|
|
40
|
+
getTokenPrice: getTokenPrice,
|
|
41
|
+
curveAPY: curveAPY,
|
|
42
|
+
tokenList: tokenList,
|
|
102
43
|
});
|
|
44
|
+
return apy;
|
|
103
45
|
});
|
|
46
|
+
return apyList;
|
|
104
47
|
}
|
|
105
48
|
exports.getConvexAPYBulk = getConvexAPYBulk;
|
|
106
|
-
function getConvexAPY(_a) {
|
|
107
|
-
var pool = _a.pool, provider = _a.provider, networkType = _a.networkType, getTokenPrice = _a.getTokenPrice, curveAPY = _a.curveAPY;
|
|
108
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
-
var _b, poolParams, basePoolAddress, swapPoolAddress, underlying, extraPoolAddresses, tokenList, calls, _c, basePoolRate, basePoolSupply, vPrice, cvxSupply, extra, apy;
|
|
110
|
-
return __generator(this, function (_d) {
|
|
111
|
-
switch (_d.label) {
|
|
112
|
-
case 0:
|
|
113
|
-
_b = getPoolInfo({ networkType: networkType, pool: pool }), poolParams = _b[0], basePoolAddress = _b[1], swapPoolAddress = _b[2], underlying = _b[3], extraPoolAddresses = _b[4], tokenList = _b[5];
|
|
114
|
-
calls = getPoolDataCalls({
|
|
115
|
-
basePoolAddress: basePoolAddress,
|
|
116
|
-
swapPoolAddress: swapPoolAddress,
|
|
117
|
-
cvxAddress: tokenList.CVX,
|
|
118
|
-
extraPoolAddresses: extraPoolAddresses,
|
|
119
|
-
});
|
|
120
|
-
return [4 /*yield*/, (0, multicall_1.multicall)(calls, provider)];
|
|
121
|
-
case 1:
|
|
122
|
-
_c = _d.sent(), basePoolRate = _c[0], basePoolSupply = _c[1], vPrice = _c[2], cvxSupply = _c[3], extra = _c.slice(4);
|
|
123
|
-
apy = calculateConvexAPY({
|
|
124
|
-
basePoolRate: basePoolRate,
|
|
125
|
-
basePoolSupply: basePoolSupply,
|
|
126
|
-
vPrice: vPrice,
|
|
127
|
-
cvxSupply: cvxSupply,
|
|
128
|
-
extra: extra,
|
|
129
|
-
extraPoolAddresses: extraPoolAddresses,
|
|
130
|
-
poolParams: poolParams,
|
|
131
|
-
underlying: underlying,
|
|
132
|
-
getTokenPrice: getTokenPrice,
|
|
133
|
-
curveAPY: curveAPY,
|
|
134
|
-
tokenList: tokenList,
|
|
135
|
-
});
|
|
136
|
-
return [2 /*return*/, apy];
|
|
137
|
-
}
|
|
138
|
-
});
|
|
139
|
-
});
|
|
140
|
-
}
|
|
141
|
-
exports.getConvexAPY = getConvexAPY;
|
|
142
49
|
function getPoolInfo(_a) {
|
|
143
50
|
var pool = _a.pool, networkType = _a.networkType;
|
|
144
51
|
var tokenList = token_1.tokenDataByNetwork[networkType];
|
|
@@ -159,6 +66,21 @@ function getPoolInfo(_a) {
|
|
|
159
66
|
tokenList,
|
|
160
67
|
];
|
|
161
68
|
}
|
|
69
|
+
function getConvexAPYBulkCalls(_a) {
|
|
70
|
+
var pools = _a.pools, networkType = _a.networkType;
|
|
71
|
+
var poolsInfo = pools.map(function (pool) { return getPoolInfo({ networkType: networkType, pool: pool }); });
|
|
72
|
+
var calls = poolsInfo.map(function (_a) {
|
|
73
|
+
var basePoolAddress = _a[1], swapPoolAddress = _a[2], extraPoolAddresses = _a[4], tokenList = _a[5];
|
|
74
|
+
return getPoolDataCalls({
|
|
75
|
+
basePoolAddress: basePoolAddress,
|
|
76
|
+
swapPoolAddress: swapPoolAddress,
|
|
77
|
+
cvxAddress: tokenList.CVX,
|
|
78
|
+
extraPoolAddresses: extraPoolAddresses,
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
return { poolsInfo: poolsInfo, calls: calls };
|
|
82
|
+
}
|
|
83
|
+
exports.getConvexAPYBulkCalls = getConvexAPYBulkCalls;
|
|
162
84
|
function getPoolDataCalls(_a) {
|
|
163
85
|
var basePoolAddress = _a.basePoolAddress, swapPoolAddress = _a.swapPoolAddress, cvxAddress = _a.cvxAddress, extraPoolAddresses = _a.extraPoolAddresses;
|
|
164
86
|
var calls = __spreadArray([
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { BigNumber } from "ethers";
|
|
2
|
+
import { CurveGEARPoolParams } from "../contracts/contracts";
|
|
3
|
+
import { NetworkType } from "../core/chains";
|
|
4
|
+
import { MCall } from "../utils/multicall";
|
|
5
|
+
export interface GetGEARCurveAPYProps {
|
|
6
|
+
response: Array<BigNumber>;
|
|
7
|
+
}
|
|
8
|
+
export declare function getGEARCurveAPY({ response }: GetGEARCurveAPYProps): {
|
|
9
|
+
tradingAPY: BigNumber;
|
|
10
|
+
cideredAPYPlusLM: BigNumber;
|
|
11
|
+
};
|
|
12
|
+
export interface GetGEARCurveAPYCallsProps {
|
|
13
|
+
pool: "CURVE_GEAR_POOL";
|
|
14
|
+
networkType: NetworkType;
|
|
15
|
+
}
|
|
16
|
+
export declare function getGEARCurveAPYCalls(props: GetGEARCurveAPYCallsProps): {
|
|
17
|
+
poolInfo: {
|
|
18
|
+
poolParams: CurveGEARPoolParams;
|
|
19
|
+
poolAddress: string;
|
|
20
|
+
};
|
|
21
|
+
calls: [MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/curve/ICurvePool").ICurvePoolInterface>, MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/curve/ICurvePool").ICurvePoolInterface>];
|
|
22
|
+
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getGEARCurveAPYCalls = exports.getGEARCurveAPY = void 0;
|
|
4
|
+
var contracts_1 = require("../contracts/contracts");
|
|
5
|
+
var constants_1 = require("../core/constants");
|
|
6
|
+
var types_1 = require("../types");
|
|
7
|
+
var formatter_1 = require("../utils/formatter");
|
|
8
|
+
function getGEARCurveAPY(_a) {
|
|
9
|
+
var response = _a.response;
|
|
10
|
+
return calculateGearCurveAPY(response);
|
|
11
|
+
}
|
|
12
|
+
exports.getGEARCurveAPY = getGEARCurveAPY;
|
|
13
|
+
function getGEARCurveAPYCalls(props) {
|
|
14
|
+
var poolInfo = getPoolInfo(props);
|
|
15
|
+
var calls = getPoolDataCalls(poolInfo);
|
|
16
|
+
return { poolInfo: poolInfo, calls: calls };
|
|
17
|
+
}
|
|
18
|
+
exports.getGEARCurveAPYCalls = getGEARCurveAPYCalls;
|
|
19
|
+
function getPoolDataCalls(_a) {
|
|
20
|
+
var poolAddress = _a.poolAddress, poolParams = _a.poolParams;
|
|
21
|
+
var calls = [
|
|
22
|
+
{
|
|
23
|
+
address: poolAddress,
|
|
24
|
+
interface: types_1.ICurvePool__factory.createInterface(),
|
|
25
|
+
method: "get_virtual_price()",
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
address: poolAddress,
|
|
29
|
+
interface: types_1.ICurvePool__factory.createInterface(),
|
|
30
|
+
method: "balances(uint256)",
|
|
31
|
+
params: [poolParams.tokens.findIndex(function (t) { return t === "GEAR"; })],
|
|
32
|
+
},
|
|
33
|
+
];
|
|
34
|
+
return calls;
|
|
35
|
+
}
|
|
36
|
+
function getPoolInfo(_a) {
|
|
37
|
+
var pool = _a.pool, networkType = _a.networkType;
|
|
38
|
+
var contractsList = contracts_1.contractsByNetwork[networkType];
|
|
39
|
+
var poolParams = contracts_1.contractParams[pool];
|
|
40
|
+
var poolAddress = contractsList[pool];
|
|
41
|
+
return { poolParams: poolParams, poolAddress: poolAddress };
|
|
42
|
+
}
|
|
43
|
+
var POOL_START = 1671264000 * 1000;
|
|
44
|
+
var lmRewardsPerMonth = (0, formatter_1.toBN)("3330000", 18);
|
|
45
|
+
var ciderFees = (0, formatter_1.toBN)("15000000", 18);
|
|
46
|
+
var rewardsAmountPerMonth = lmRewardsPerMonth.add(ciderFees.div(4));
|
|
47
|
+
function calculateGearCurveAPY(response) {
|
|
48
|
+
var vPrice = response[0], gearBalance = response[1];
|
|
49
|
+
var tradingAPY = vPrice
|
|
50
|
+
.sub(constants_1.WAD)
|
|
51
|
+
.mul(constants_1.MS_PER_YEAR)
|
|
52
|
+
.div(Date.now() - POOL_START);
|
|
53
|
+
var cideredAPYPlusLM = rewardsAmountPerMonth
|
|
54
|
+
.mul(constants_1.WAD)
|
|
55
|
+
.mul(12)
|
|
56
|
+
.div(gearBalance.mul(2));
|
|
57
|
+
return { tradingAPY: tradingAPY, cideredAPYPlusLM: cideredAPYPlusLM };
|
|
58
|
+
}
|
package/lib/apy/index.d.ts
CHANGED
|
@@ -6,5 +6,6 @@ export declare type LpTokensAPY = Record<TokensWithAPY, number>;
|
|
|
6
6
|
export declare const isTokenWithAPY: (t: unknown) => t is TokensWithAPY;
|
|
7
7
|
export * from "./convexAPY";
|
|
8
8
|
export * from "./curveAPY";
|
|
9
|
+
export * from "./gearCurveAPY";
|
|
9
10
|
export * from "./lidoAPY";
|
|
10
11
|
export * from "./yearnAPY";
|
package/lib/apy/index.js
CHANGED
|
@@ -27,5 +27,6 @@ var isTokenWithAPY = function (t) {
|
|
|
27
27
|
exports.isTokenWithAPY = isTokenWithAPY;
|
|
28
28
|
__exportStar(require("./convexAPY"), exports);
|
|
29
29
|
__exportStar(require("./curveAPY"), exports);
|
|
30
|
+
__exportStar(require("./gearCurveAPY"), exports);
|
|
30
31
|
__exportStar(require("./lidoAPY"), exports);
|
|
31
32
|
__exportStar(require("./yearnAPY"), exports);
|
package/lib/apy/lidoAPY.d.ts
CHANGED
|
@@ -1,4 +1,25 @@
|
|
|
1
|
-
import { providers } from "ethers";
|
|
2
1
|
import { NetworkType } from "../core/chains";
|
|
3
|
-
|
|
2
|
+
import { ILidoOracle, IstETH } from "../types";
|
|
3
|
+
import { MCall } from "../utils/multicall";
|
|
4
|
+
export declare type LidoDataCallResponse = [
|
|
5
|
+
Awaited<ReturnType<ILidoOracle["getLastCompletedReportDelta"]>>,
|
|
6
|
+
Awaited<ReturnType<IstETH["getFee"]>>
|
|
7
|
+
];
|
|
8
|
+
export interface GetLidoAPYProps {
|
|
9
|
+
generated: GetLidoAPYCallsReturns;
|
|
10
|
+
response: LidoDataCallResponse;
|
|
11
|
+
}
|
|
12
|
+
export declare function getLidoAPY({ response }: GetLidoAPYProps): readonly [import("ethers").BigNumber, number];
|
|
4
13
|
export declare const LIDO_FEE_DECIMALS = 10000;
|
|
14
|
+
export interface GetLidoAPYCallsProps {
|
|
15
|
+
networkType: NetworkType;
|
|
16
|
+
}
|
|
17
|
+
declare type GetLidoAPYCallsReturns = ReturnType<typeof getLidoAPYCalls>;
|
|
18
|
+
export declare function getLidoAPYCalls({ networkType }: GetLidoAPYCallsProps): {
|
|
19
|
+
poolInfo: {
|
|
20
|
+
lidoOracleAddress: string;
|
|
21
|
+
stETHAddress: string;
|
|
22
|
+
};
|
|
23
|
+
calls: [MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/lido/ILidoOracle").ILidoOracleInterface>, ...MCall<import("../types/@gearbox-protocol/integrations-v2/contracts/integrations/lido/IstETH.sol/IstETH").IstETHInterface>[]];
|
|
24
|
+
};
|
|
25
|
+
export {};
|
package/lib/apy/lidoAPY.js
CHANGED
|
@@ -1,103 +1,70 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
37
12
|
};
|
|
38
13
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.LIDO_FEE_DECIMALS = exports.getLidoAPY = void 0;
|
|
14
|
+
exports.getLidoAPYCalls = exports.LIDO_FEE_DECIMALS = exports.getLidoAPY = void 0;
|
|
40
15
|
var contracts_1 = require("../contracts/contracts");
|
|
41
16
|
var constants_1 = require("../core/constants");
|
|
42
17
|
var token_1 = require("../tokens/token");
|
|
43
18
|
var types_1 = require("../types");
|
|
44
|
-
|
|
19
|
+
function getLidoAPY(_a) {
|
|
20
|
+
var response = _a.response;
|
|
21
|
+
var _b = response[0], postTotalPooledEther = _b.postTotalPooledEther, preTotalPooledEther = _b.preTotalPooledEther, timeElapsed = _b.timeElapsed, _c = response[1], fee = _c === void 0 ? Math.floor(exports.LIDO_FEE_DECIMALS / 10) : _c;
|
|
22
|
+
var lidoAPRRay = postTotalPooledEther
|
|
23
|
+
.sub(preTotalPooledEther)
|
|
24
|
+
.mul(constants_1.SECONDS_PER_YEAR)
|
|
25
|
+
.mul(constants_1.WAD)
|
|
26
|
+
.div(preTotalPooledEther.mul(timeElapsed));
|
|
27
|
+
return [lidoAPRRay, fee];
|
|
28
|
+
}
|
|
29
|
+
exports.getLidoAPY = getLidoAPY;
|
|
30
|
+
exports.LIDO_FEE_DECIMALS = 10000;
|
|
31
|
+
function getLidoAPYCalls(_a) {
|
|
32
|
+
var networkType = _a.networkType;
|
|
33
|
+
var poolInfo = getLidoInfo(networkType);
|
|
34
|
+
var calls = getLidoDataCalls(__assign(__assign({}, poolInfo), { network: networkType }));
|
|
35
|
+
return { poolInfo: poolInfo, calls: calls };
|
|
36
|
+
}
|
|
37
|
+
exports.getLidoAPYCalls = getLidoAPYCalls;
|
|
45
38
|
var lidoOracles = contracts_1.contractParams.LIDO_STETH_GATEWAY.oracle;
|
|
46
39
|
var lidoStEth = {
|
|
47
40
|
Mainnet: token_1.tokenDataByNetwork.Mainnet.STETH,
|
|
48
41
|
Goerli: token_1.tokenDataByNetwork.Goerli.STETH,
|
|
49
42
|
};
|
|
50
|
-
function
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
throw new Error("No Lido stETH found on current network: ".concat(networkType));
|
|
61
|
-
}
|
|
62
|
-
return [4 /*yield*/, geLidoData(lidoOracles[networkType], lidoStEth[networkType], provider, networkType)];
|
|
63
|
-
case 1:
|
|
64
|
-
_a = _c.sent(), _b = _a[0], postTotalPooledEther = _b.postTotalPooledEther, preTotalPooledEther = _b.preTotalPooledEther, timeElapsed = _b.timeElapsed, fee = _a[1];
|
|
65
|
-
lidoAPRRay = postTotalPooledEther
|
|
66
|
-
.sub(preTotalPooledEther)
|
|
67
|
-
.mul(constants_1.SECONDS_PER_YEAR)
|
|
68
|
-
.mul(constants_1.WAD)
|
|
69
|
-
.div(preTotalPooledEther.mul(timeElapsed));
|
|
70
|
-
return [2 /*return*/, [lidoAPRRay, fee]];
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
});
|
|
43
|
+
function getLidoInfo(networkType) {
|
|
44
|
+
if (!lidoOracles[networkType]) {
|
|
45
|
+
throw new Error("No Lido APR oracle found on current network: ".concat(networkType));
|
|
46
|
+
}
|
|
47
|
+
if (!lidoStEth[networkType]) {
|
|
48
|
+
throw new Error("No Lido stETH found on current network: ".concat(networkType));
|
|
49
|
+
}
|
|
50
|
+
var lidoOracleAddress = lidoOracles[networkType];
|
|
51
|
+
var stETHAddress = lidoStEth[networkType];
|
|
52
|
+
return { lidoOracleAddress: lidoOracleAddress, stETHAddress: stETHAddress };
|
|
74
53
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
];
|
|
90
|
-
if (network === "Mainnet")
|
|
91
|
-
calls.push({
|
|
92
|
-
address: stETHAddress,
|
|
93
|
-
interface: types_1.IstETH__factory.createInterface(),
|
|
94
|
-
method: "getFee()",
|
|
95
|
-
});
|
|
96
|
-
return [4 /*yield*/, (0, multicall_1.multicall)(calls, provider)];
|
|
97
|
-
case 1:
|
|
98
|
-
_a = _c.sent(), stats = _a[0], _b = _a[1], fee = _b === void 0 ? Math.floor(exports.LIDO_FEE_DECIMALS / 10) : _b;
|
|
99
|
-
return [2 /*return*/, [stats, fee]];
|
|
100
|
-
}
|
|
54
|
+
function getLidoDataCalls(_a) {
|
|
55
|
+
var lidoOracleAddress = _a.lidoOracleAddress, stETHAddress = _a.stETHAddress, network = _a.network;
|
|
56
|
+
var calls = [
|
|
57
|
+
{
|
|
58
|
+
address: lidoOracleAddress,
|
|
59
|
+
interface: types_1.ILidoOracle__factory.createInterface(),
|
|
60
|
+
method: "getLastCompletedReportDelta()",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
if (network === "Mainnet")
|
|
64
|
+
calls.push({
|
|
65
|
+
address: stETHAddress,
|
|
66
|
+
interface: types_1.IstETH__factory.createInterface(),
|
|
67
|
+
method: "getFee()",
|
|
101
68
|
});
|
|
102
|
-
|
|
69
|
+
return calls;
|
|
103
70
|
}
|
|
@@ -9,7 +9,7 @@ export declare type UniswapV2Contract = "UNISWAP_V2_ROUTER" | "SUSHISWAP_ROUTER"
|
|
|
9
9
|
export declare type CurvePoolContract = "CURVE_3CRV_POOL" | "CURVE_FRAX_USDC_POOL" | "CURVE_STETH_GATEWAY" | "CURVE_FRAX_POOL" | "CURVE_LUSD_POOL" | "CURVE_GUSD_POOL" | "CURVE_SUSD_POOL" | "CURVE_SUSD_DEPOSIT";
|
|
10
10
|
export declare type YearnVaultContract = "YEARN_DAI_VAULT" | "YEARN_USDC_VAULT" | "YEARN_WETH_VAULT" | "YEARN_WBTC_VAULT" | "YEARN_CURVE_FRAX_VAULT" | "YEARN_CURVE_STETH_VAULT";
|
|
11
11
|
export declare type ConvexPoolContract = "CONVEX_3CRV_POOL" | "CONVEX_FRAX_USDC_POOL" | "CONVEX_GUSD_POOL" | "CONVEX_SUSD_POOL" | "CONVEX_STECRV_POOL" | "CONVEX_FRAX3CRV_POOL" | "CONVEX_LUSD3CRV_POOL";
|
|
12
|
-
export declare type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY" | "LIDO_WSTETH" | "UNIVERSAL_ADAPTER";
|
|
12
|
+
export declare type SupportedContract = UniswapV2Contract | "UNISWAP_V3_ROUTER" | CurvePoolContract | "CURVE_GEAR_POOL" | YearnVaultContract | "CONVEX_BOOSTER" | ConvexPoolContract | "CONVEX_CLAIM_ZAP" | "LIDO_STETH_GATEWAY" | "LIDO_WSTETH" | "UNIVERSAL_ADAPTER";
|
|
13
13
|
export declare const contractsByNetwork: Record<NetworkType, Record<SupportedContract, string>>;
|
|
14
14
|
export declare const UNISWAP_V3_QUOTER = "0xb27308f9f90d607463bb33ea1bebb41c27ce5ab6";
|
|
15
15
|
export interface BaseContractParams {
|
|
@@ -39,6 +39,13 @@ export declare type CurveSteCRVPoolParams = {
|
|
|
39
39
|
tokens: ["WETH", "STETH"];
|
|
40
40
|
lpToken: "steCRV";
|
|
41
41
|
} & BaseContractParams;
|
|
42
|
+
export declare type CurveGEARPoolParams = {
|
|
43
|
+
protocol: Protocols.Curve;
|
|
44
|
+
type: AdapterInterface.CURVE_V1_2ASSETS;
|
|
45
|
+
pool: Record<NetworkType, string>;
|
|
46
|
+
tokens: ["GEAR", "WETH"];
|
|
47
|
+
lpToken: "GEAR";
|
|
48
|
+
} & BaseContractParams;
|
|
42
49
|
export declare type YearnParams = {
|
|
43
50
|
protocol: Protocols.Yearn;
|
|
44
51
|
type: AdapterInterface.YEARN_V2;
|
|
@@ -72,7 +79,7 @@ export declare type UniversalParams = {
|
|
|
72
79
|
protocol: Protocols.Gearbox;
|
|
73
80
|
type: AdapterInterface.UNIVERSAL;
|
|
74
81
|
} & BaseContractParams;
|
|
75
|
-
export declare type ContractParams = UniswapV2Params | UniswapV3Params | CurveParams | CurveSteCRVPoolParams | YearnParams | ConvexParams | ConvexPoolParams | LidoParams | LidoWsthETHParams | UniversalParams;
|
|
82
|
+
export declare type ContractParams = UniswapV2Params | UniswapV3Params | CurveParams | CurveSteCRVPoolParams | CurveGEARPoolParams | YearnParams | ConvexParams | ConvexPoolParams | LidoParams | LidoWsthETHParams | UniversalParams;
|
|
76
83
|
export declare const contractParams: Record<SupportedContract, ContractParams>;
|
|
77
84
|
export declare const contractsByAddress: Record<string, SupportedContract>;
|
|
78
85
|
export declare const isSupportedContract: (t: unknown) => t is SupportedContract;
|
|
@@ -30,6 +30,7 @@ exports.contractsByNetwork = {
|
|
|
30
30
|
CURVE_SUSD_POOL: "0xA5407eAE9Ba41422680e2e00537571bcC53efBfD",
|
|
31
31
|
CURVE_SUSD_DEPOSIT: "0xFCBa3E75865d2d561BE8D220616520c171F12851",
|
|
32
32
|
CURVE_GUSD_POOL: "0x4f062658EaAF2C1ccf8C8e36D6824CDf41167956",
|
|
33
|
+
CURVE_GEAR_POOL: "0x0e9b5b092cad6f1c5e6bc7f89ffe1abb5c95f1c2",
|
|
33
34
|
// YEARN
|
|
34
35
|
YEARN_DAI_VAULT: token_1.tokenDataByNetwork.Mainnet.yvDAI,
|
|
35
36
|
YEARN_USDC_VAULT: token_1.tokenDataByNetwork.Mainnet.yvUSDC,
|
|
@@ -75,6 +76,7 @@ exports.contractsByNetwork = {
|
|
|
75
76
|
CURVE_SUSD_POOL: "0x2A1b874C86734feA5be050d32fAb02FCF9eB1Bc2",
|
|
76
77
|
CURVE_SUSD_DEPOSIT: "0x9782f1fF1AEFb387F01cae72F668F13E8061d9Dd",
|
|
77
78
|
CURVE_GUSD_POOL: "0x8C954d89C2fB2c96F0195738b8c5538B34D5344E",
|
|
79
|
+
CURVE_GEAR_POOL: "deploy me",
|
|
78
80
|
// YEARN
|
|
79
81
|
YEARN_DAI_VAULT: token_1.tokenDataByNetwork.Goerli.yvDAI,
|
|
80
82
|
YEARN_USDC_VAULT: token_1.tokenDataByNetwork.Goerli.yvUSDC,
|
|
@@ -142,6 +144,17 @@ exports.contractParams = {
|
|
|
142
144
|
tokens: ["WETH", "STETH"],
|
|
143
145
|
lpToken: "steCRV",
|
|
144
146
|
},
|
|
147
|
+
CURVE_GEAR_POOL: {
|
|
148
|
+
name: "Curve GEAR",
|
|
149
|
+
protocol: protocols_1.Protocols.Curve,
|
|
150
|
+
type: adapters_1.AdapterInterface.CURVE_V1_2ASSETS,
|
|
151
|
+
pool: {
|
|
152
|
+
Mainnet: "0x0e9b5b092cad6f1c5e6bc7f89ffe1abb5c95f1c2",
|
|
153
|
+
Goerli: "implement me",
|
|
154
|
+
},
|
|
155
|
+
tokens: ["GEAR", "WETH"],
|
|
156
|
+
lpToken: "GEAR",
|
|
157
|
+
},
|
|
145
158
|
CURVE_FRAX_POOL: {
|
|
146
159
|
name: "Curve FRAX",
|
|
147
160
|
protocol: protocols_1.Protocols.Curve,
|
|
@@ -13,7 +13,6 @@ var __assign = (this && this.__assign) || function () {
|
|
|
13
13
|
var _a;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
exports.getContractName = exports.deployedContracts = exports.CREDIT_MANAGER_WBTC_V2_GOERLI = exports.CREDIT_MANAGER_WSTETH_V2_GOERLI = exports.CREDIT_MANAGER_WETH_V2_GOERLI = exports.CREDIT_MANAGER_USDC_V2_GOERLI = exports.CREDIT_MANAGER_DAI_V2_GOERLI = exports.CREDIT_MANAGER_WBTC_V2_MAINNET = exports.CREDIT_MANAGER_WSTETH_V2_MAINNET = exports.CREDIT_MANAGER_WETH_V2_MAINNET = exports.CREDIT_MANAGER_USDC_V2_MAINNET = exports.CREDIT_MANAGER_DAI_V2_MAINNET = exports.stEthPoolWrapper = void 0;
|
|
16
|
-
var formatter_1 = require("../utils/formatter");
|
|
17
16
|
var mappers_1 = require("../utils/mappers");
|
|
18
17
|
var contracts_1 = require("./contracts");
|
|
19
18
|
exports.stEthPoolWrapper = {
|
|
@@ -73,6 +72,6 @@ var contractNames = Object.entries(contracts_1.contractsByAddress).reduce(functi
|
|
|
73
72
|
}, {});
|
|
74
73
|
var contractsFullList = __assign(__assign({}, (0, mappers_1.keyToLowercase)(exports.deployedContracts)), contractNames);
|
|
75
74
|
function getContractName(address) {
|
|
76
|
-
return contractsFullList[address.toLowerCase()] ||
|
|
75
|
+
return contractsFullList[address.toLowerCase()] || address;
|
|
77
76
|
}
|
|
78
77
|
exports.getContractName = getContractName;
|
package/lib/core/constants.d.ts
CHANGED
|
@@ -8,6 +8,7 @@ export declare const WAD: BigNumber;
|
|
|
8
8
|
export declare const PRICE_DECIMALS_POW = 8;
|
|
9
9
|
export declare const PRICE_DECIMALS: BigNumber;
|
|
10
10
|
export declare const SECONDS_PER_YEAR: number;
|
|
11
|
+
export declare const MS_PER_YEAR: number;
|
|
11
12
|
export declare const PERCENTAGE_DECIMALS = 100;
|
|
12
13
|
export declare const PERCENTAGE_FACTOR = 10000;
|
|
13
14
|
export declare const timeRanges: Record<string, number>;
|
package/lib/core/constants.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DUMB_ADDRESS4 = exports.DUMB_ADDRESS3 = exports.DUMB_ADDRESS2 = exports.DUMB_ADDRESS = exports.ADDRESS_0X0 = exports.SLIPPAGE_DECIMALS = exports.LEVERAGE_DECIMALS = exports.timeRanges = exports.PERCENTAGE_FACTOR = exports.PERCENTAGE_DECIMALS = exports.SECONDS_PER_YEAR = exports.PRICE_DECIMALS = exports.PRICE_DECIMALS_POW = exports.WAD = exports.WAD_DECIMALS_POW = exports.halfRAY = exports.RAY = exports.RAY_DECIMALS_POW = exports.MAX_INT = void 0;
|
|
3
|
+
exports.DUMB_ADDRESS4 = exports.DUMB_ADDRESS3 = exports.DUMB_ADDRESS2 = exports.DUMB_ADDRESS = exports.ADDRESS_0X0 = exports.SLIPPAGE_DECIMALS = exports.LEVERAGE_DECIMALS = exports.timeRanges = exports.PERCENTAGE_FACTOR = exports.PERCENTAGE_DECIMALS = exports.MS_PER_YEAR = exports.SECONDS_PER_YEAR = exports.PRICE_DECIMALS = exports.PRICE_DECIMALS_POW = exports.WAD = exports.WAD_DECIMALS_POW = exports.halfRAY = exports.RAY = exports.RAY_DECIMALS_POW = exports.MAX_INT = void 0;
|
|
4
4
|
var ethers_1 = require("ethers");
|
|
5
5
|
exports.MAX_INT = ethers_1.BigNumber.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");
|
|
6
6
|
exports.RAY_DECIMALS_POW = 27;
|
|
@@ -11,6 +11,7 @@ exports.WAD = ethers_1.BigNumber.from(10).pow(exports.WAD_DECIMALS_POW);
|
|
|
11
11
|
exports.PRICE_DECIMALS_POW = 8;
|
|
12
12
|
exports.PRICE_DECIMALS = ethers_1.BigNumber.from(10).pow(exports.PRICE_DECIMALS_POW);
|
|
13
13
|
exports.SECONDS_PER_YEAR = 365 * 24 * 3600;
|
|
14
|
+
exports.MS_PER_YEAR = exports.SECONDS_PER_YEAR * 1000;
|
|
14
15
|
exports.PERCENTAGE_DECIMALS = 100;
|
|
15
16
|
exports.PERCENTAGE_FACTOR = 1e4;
|
|
16
17
|
// export const LIQUIDATION_DISCOUNTED_SUM = 9600;
|
package/lib/core/errors.d.ts
CHANGED
|
@@ -4,27 +4,6 @@ export interface MetamaskError {
|
|
|
4
4
|
message: string;
|
|
5
5
|
data: string;
|
|
6
6
|
}
|
|
7
|
-
export declare class NetworkError extends Error {
|
|
8
|
-
constructor();
|
|
9
|
-
}
|
|
10
|
-
export declare class IncorrectEthAddressError extends Error {
|
|
11
|
-
constructor();
|
|
12
|
-
}
|
|
13
|
-
export declare class PoolNotExistsError extends Error {
|
|
14
|
-
constructor();
|
|
15
|
-
}
|
|
16
|
-
export declare class CreditManagerNotExistsError extends Error {
|
|
17
|
-
constructor();
|
|
18
|
-
}
|
|
19
|
-
export declare class UserHasNotAccountError extends Error {
|
|
20
|
-
constructor();
|
|
21
|
-
}
|
|
22
|
-
export declare class PathNotFoundError extends Error {
|
|
23
|
-
constructor();
|
|
24
|
-
}
|
|
25
|
-
export declare class AccountsInAllCreditManagersError extends Error {
|
|
26
|
-
constructor();
|
|
27
|
-
}
|
|
28
7
|
export declare type OpenAccountErrorTypes = "insufficientPoolLiquidity" | "leverageGreaterMax" | "wrongLeverage" | "amountGreaterMax" | "amountLessMin";
|
|
29
8
|
export declare class OpenAccountError extends Error {
|
|
30
9
|
message: OpenAccountErrorTypes;
|
package/lib/core/errors.js
CHANGED
|
@@ -15,63 +15,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
15
15
|
};
|
|
16
16
|
})();
|
|
17
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
-
exports.OpenAccountError =
|
|
19
|
-
var NetworkError = /** @class */ (function (_super) {
|
|
20
|
-
__extends(NetworkError, _super);
|
|
21
|
-
function NetworkError() {
|
|
22
|
-
return _super.call(this, "errors.networkError") || this;
|
|
23
|
-
}
|
|
24
|
-
return NetworkError;
|
|
25
|
-
}(Error));
|
|
26
|
-
exports.NetworkError = NetworkError;
|
|
27
|
-
var IncorrectEthAddressError = /** @class */ (function (_super) {
|
|
28
|
-
__extends(IncorrectEthAddressError, _super);
|
|
29
|
-
function IncorrectEthAddressError() {
|
|
30
|
-
return _super.call(this, "errors.incorrectEthAddressError") || this;
|
|
31
|
-
}
|
|
32
|
-
return IncorrectEthAddressError;
|
|
33
|
-
}(Error));
|
|
34
|
-
exports.IncorrectEthAddressError = IncorrectEthAddressError;
|
|
35
|
-
var PoolNotExistsError = /** @class */ (function (_super) {
|
|
36
|
-
__extends(PoolNotExistsError, _super);
|
|
37
|
-
function PoolNotExistsError() {
|
|
38
|
-
return _super.call(this, "errors.poolDoesntExistsError") || this;
|
|
39
|
-
}
|
|
40
|
-
return PoolNotExistsError;
|
|
41
|
-
}(Error));
|
|
42
|
-
exports.PoolNotExistsError = PoolNotExistsError;
|
|
43
|
-
var CreditManagerNotExistsError = /** @class */ (function (_super) {
|
|
44
|
-
__extends(CreditManagerNotExistsError, _super);
|
|
45
|
-
function CreditManagerNotExistsError() {
|
|
46
|
-
return _super.call(this, "errors.creditManagerDoesntExistsError") || this;
|
|
47
|
-
}
|
|
48
|
-
return CreditManagerNotExistsError;
|
|
49
|
-
}(Error));
|
|
50
|
-
exports.CreditManagerNotExistsError = CreditManagerNotExistsError;
|
|
51
|
-
var UserHasNotAccountError = /** @class */ (function (_super) {
|
|
52
|
-
__extends(UserHasNotAccountError, _super);
|
|
53
|
-
function UserHasNotAccountError() {
|
|
54
|
-
return _super.call(this, "errors.noOpenedAccountsError") || this;
|
|
55
|
-
}
|
|
56
|
-
return UserHasNotAccountError;
|
|
57
|
-
}(Error));
|
|
58
|
-
exports.UserHasNotAccountError = UserHasNotAccountError;
|
|
59
|
-
var PathNotFoundError = /** @class */ (function (_super) {
|
|
60
|
-
__extends(PathNotFoundError, _super);
|
|
61
|
-
function PathNotFoundError() {
|
|
62
|
-
return _super.call(this, "errors.pathNotFoundError") || this;
|
|
63
|
-
}
|
|
64
|
-
return PathNotFoundError;
|
|
65
|
-
}(Error));
|
|
66
|
-
exports.PathNotFoundError = PathNotFoundError;
|
|
67
|
-
var AccountsInAllCreditManagersError = /** @class */ (function (_super) {
|
|
68
|
-
__extends(AccountsInAllCreditManagersError, _super);
|
|
69
|
-
function AccountsInAllCreditManagersError() {
|
|
70
|
-
return _super.call(this, "errors.youOpenedAccountsInAllCreditManagersError") || this;
|
|
71
|
-
}
|
|
72
|
-
return AccountsInAllCreditManagersError;
|
|
73
|
-
}(Error));
|
|
74
|
-
exports.AccountsInAllCreditManagersError = AccountsInAllCreditManagersError;
|
|
18
|
+
exports.OpenAccountError = void 0;
|
|
75
19
|
var OpenAccountError = /** @class */ (function (_super) {
|
|
76
20
|
__extends(OpenAccountError, _super);
|
|
77
21
|
function OpenAccountError(errorType, amount) {
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../common";
|
|
5
|
+
export interface IOffchainOracleInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"getRate(address,address,bool)": FunctionFragment;
|
|
8
|
+
"getRateToEth(address,bool)": FunctionFragment;
|
|
9
|
+
};
|
|
10
|
+
getFunction(nameOrSignatureOrTopic: "getRate" | "getRateToEth"): FunctionFragment;
|
|
11
|
+
encodeFunctionData(functionFragment: "getRate", values: [string, string, boolean]): string;
|
|
12
|
+
encodeFunctionData(functionFragment: "getRateToEth", values: [string, boolean]): string;
|
|
13
|
+
decodeFunctionResult(functionFragment: "getRate", data: BytesLike): Result;
|
|
14
|
+
decodeFunctionResult(functionFragment: "getRateToEth", data: BytesLike): Result;
|
|
15
|
+
events: {};
|
|
16
|
+
}
|
|
17
|
+
export interface IOffchainOracle extends BaseContract {
|
|
18
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
19
|
+
attach(addressOrName: string): this;
|
|
20
|
+
deployed(): Promise<this>;
|
|
21
|
+
interface: IOffchainOracleInterface;
|
|
22
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
23
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
24
|
+
listeners(eventName?: string): Array<Listener>;
|
|
25
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
26
|
+
removeAllListeners(eventName?: string): this;
|
|
27
|
+
off: OnEvent<this>;
|
|
28
|
+
on: OnEvent<this>;
|
|
29
|
+
once: OnEvent<this>;
|
|
30
|
+
removeListener: OnEvent<this>;
|
|
31
|
+
functions: {
|
|
32
|
+
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
33
|
+
weightedRate: BigNumber;
|
|
34
|
+
}>;
|
|
35
|
+
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<[BigNumber] & {
|
|
36
|
+
weightedRate: BigNumber;
|
|
37
|
+
}>;
|
|
38
|
+
};
|
|
39
|
+
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
|
|
40
|
+
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
|
|
41
|
+
callStatic: {
|
|
42
|
+
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
|
|
43
|
+
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
|
|
44
|
+
};
|
|
45
|
+
filters: {};
|
|
46
|
+
estimateGas: {
|
|
47
|
+
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
|
|
48
|
+
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<BigNumber>;
|
|
49
|
+
};
|
|
50
|
+
populateTransaction: {
|
|
51
|
+
getRate(srcToken: string, dstToken: string, useWrappers: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
52
|
+
getRateToEth(srcToken: string, useSrcWrappers: boolean, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type { IOffchainOracle } from "./IOffchainOracle";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Signer } from "ethers";
|
|
2
|
+
import type { Provider } from "@ethersproject/providers";
|
|
3
|
+
import type { IOffchainOracle, IOffchainOracleInterface } from "../../../contracts/support/IOffchainOracle";
|
|
4
|
+
export declare class IOffchainOracle__factory {
|
|
5
|
+
static readonly abi: {
|
|
6
|
+
inputs: {
|
|
7
|
+
internalType: string;
|
|
8
|
+
name: string;
|
|
9
|
+
type: string;
|
|
10
|
+
}[];
|
|
11
|
+
name: string;
|
|
12
|
+
outputs: {
|
|
13
|
+
internalType: string;
|
|
14
|
+
name: string;
|
|
15
|
+
type: string;
|
|
16
|
+
}[];
|
|
17
|
+
stateMutability: string;
|
|
18
|
+
type: string;
|
|
19
|
+
}[];
|
|
20
|
+
static createInterface(): IOffchainOracleInterface;
|
|
21
|
+
static connect(address: string, signerOrProvider: Signer | Provider): IOffchainOracle;
|
|
22
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
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.IOffchainOracle__factory = void 0;
|
|
7
|
+
var ethers_1 = require("ethers");
|
|
8
|
+
var _abi = [
|
|
9
|
+
{
|
|
10
|
+
inputs: [
|
|
11
|
+
{
|
|
12
|
+
internalType: "address",
|
|
13
|
+
name: "srcToken",
|
|
14
|
+
type: "address",
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
internalType: "address",
|
|
18
|
+
name: "dstToken",
|
|
19
|
+
type: "address",
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
internalType: "bool",
|
|
23
|
+
name: "useWrappers",
|
|
24
|
+
type: "bool",
|
|
25
|
+
},
|
|
26
|
+
],
|
|
27
|
+
name: "getRate",
|
|
28
|
+
outputs: [
|
|
29
|
+
{
|
|
30
|
+
internalType: "uint256",
|
|
31
|
+
name: "weightedRate",
|
|
32
|
+
type: "uint256",
|
|
33
|
+
},
|
|
34
|
+
],
|
|
35
|
+
stateMutability: "view",
|
|
36
|
+
type: "function",
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
inputs: [
|
|
40
|
+
{
|
|
41
|
+
internalType: "address",
|
|
42
|
+
name: "srcToken",
|
|
43
|
+
type: "address",
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
internalType: "bool",
|
|
47
|
+
name: "useSrcWrappers",
|
|
48
|
+
type: "bool",
|
|
49
|
+
},
|
|
50
|
+
],
|
|
51
|
+
name: "getRateToEth",
|
|
52
|
+
outputs: [
|
|
53
|
+
{
|
|
54
|
+
internalType: "uint256",
|
|
55
|
+
name: "weightedRate",
|
|
56
|
+
type: "uint256",
|
|
57
|
+
},
|
|
58
|
+
],
|
|
59
|
+
stateMutability: "view",
|
|
60
|
+
type: "function",
|
|
61
|
+
},
|
|
62
|
+
];
|
|
63
|
+
var IOffchainOracle__factory = /** @class */ (function () {
|
|
64
|
+
function IOffchainOracle__factory() {
|
|
65
|
+
}
|
|
66
|
+
IOffchainOracle__factory.createInterface = function () {
|
|
67
|
+
return new ethers_1.utils.Interface(_abi);
|
|
68
|
+
};
|
|
69
|
+
IOffchainOracle__factory.connect = function (address, signerOrProvider) {
|
|
70
|
+
return new ethers_1.Contract(address, _abi, signerOrProvider);
|
|
71
|
+
};
|
|
72
|
+
IOffchainOracle__factory.abi = _abi;
|
|
73
|
+
return IOffchainOracle__factory;
|
|
74
|
+
}());
|
|
75
|
+
exports.IOffchainOracle__factory = IOffchainOracle__factory;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { IOffchainOracle__factory } from "./IOffchainOracle__factory";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.IOffchainOracle__factory = void 0;
|
|
4
|
+
/* Autogenerated file. Do not edit manually. */
|
|
5
|
+
/* tslint:disable */
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
var IOffchainOracle__factory_1 = require("./IOffchainOracle__factory");
|
|
8
|
+
Object.defineProperty(exports, "IOffchainOracle__factory", { enumerable: true, get: function () { return IOffchainOracle__factory_1.IOffchainOracle__factory; } });
|
package/lib/types/index.d.ts
CHANGED
|
@@ -281,6 +281,8 @@ export type { ITokenDistributorEvents } from "./contracts/ITokenDistributor.sol/
|
|
|
281
281
|
export { ITokenDistributorEvents__factory } from "./factories/contracts/ITokenDistributor.sol/ITokenDistributorEvents__factory";
|
|
282
282
|
export type { ITokenDistributorExceptions } from "./contracts/ITokenDistributor.sol/ITokenDistributorExceptions";
|
|
283
283
|
export { ITokenDistributorExceptions__factory } from "./factories/contracts/ITokenDistributor.sol/ITokenDistributorExceptions__factory";
|
|
284
|
+
export type { IOffchainOracle } from "./contracts/support/IOffchainOracle";
|
|
285
|
+
export { IOffchainOracle__factory } from "./factories/contracts/support/IOffchainOracle__factory";
|
|
284
286
|
export type { AggregatorV3Interface } from "./@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface";
|
|
285
287
|
export { AggregatorV3Interface__factory } from "./factories/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface__factory";
|
|
286
288
|
export type { Multicall2 } from "./contracts/MultiCall.sol/Multicall2";
|
package/lib/types/index.js
CHANGED
|
@@ -25,7 +25,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
25
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
26
|
exports.IPriceOracleV2Exceptions__factory = exports.IPriceOracleV2Events__factory = exports.IPriceOracleV2__factory = exports.IPriceFeedType__factory = exports.IPoolServiceEvents__factory = exports.IPoolService__factory = exports.IPhantomERC20__factory = exports.ILPPriceFeedExceptions__factory = exports.ILPPriceFeedEvents__factory = exports.ILPPriceFeed__factory = exports.IInterestRateModel__factory = exports.IDieselTokenExceptions__factory = exports.IDieselToken__factory = exports.IDegenNFTExceptions__factory = exports.IDegenNFTEvents__factory = exports.IDegenNFT__factory = exports.IDegenDistributorEvents__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.IAirdropDistributorEvents__factory = exports.IAirdropDistributor__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.IUniversalAdapterExceptions__factory = exports.IUniversalAdapter__factory = exports.IAdapterExceptions__factory = exports.IAdapter__factory = exports.factories = void 0;
|
|
27
27
|
exports.ICurveV1_2AssetsAdapter__factory = exports.IConvexV1BoosterAdapter__factory = exports.IConvexV1BaseRewardPoolAdapterErrors__factory = exports.IConvexV1BaseRewardPoolAdapter__factory = exports.IYVault__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.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.ITokenTestSuite__factory = exports.ICreditManager__factory = exports.ICreditFilter__factory = exports.IWETHGateway__factory = exports.IVersion__factory = exports.IPriceOracleV2Ext__factory = void 0;
|
|
28
|
-
exports.Multicall2__factory = exports.AggregatorV3Interface__factory = exports.ITokenDistributorExceptions__factory = exports.ITokenDistributorEvents__factory = exports.ITokenDistributor__factory = exports.IGas__factory = exports.IERC165__factory = exports.IERC721Receiver__factory = exports.IERC721__factory = exports.IERC721Metadata__factory = exports.IERC20__factory = exports.IERC20Metadata__factory = exports.IWrapper__factory = exports.IWithdrawerOptions__factory = exports.IWithdrawer__factory = exports.ISwapper__factory = exports.ISwapAggregator__factory = exports.IRouterComponent__factory = exports.IRouter__factory = exports.IPathResolver__factory = exports.ILPWorkerOptions__factory = exports.ILPWorker__factory = exports.IGasPricer__factory = exports.IDepositorOptions__factory = exports.IDepositor__factory = exports.IClosePathResolver__factory = exports.ILidoMockEvents__factory = exports.ISupportedContracts__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.ICurveV1AdapterExceptions__factory = exports.ICurveV1Adapter__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = void 0;
|
|
28
|
+
exports.Multicall2__factory = exports.AggregatorV3Interface__factory = exports.IOffchainOracle__factory = exports.ITokenDistributorExceptions__factory = exports.ITokenDistributorEvents__factory = exports.ITokenDistributor__factory = exports.IGas__factory = exports.IERC165__factory = exports.IERC721Receiver__factory = exports.IERC721__factory = exports.IERC721Metadata__factory = exports.IERC20__factory = exports.IERC20Metadata__factory = exports.IWrapper__factory = exports.IWithdrawerOptions__factory = exports.IWithdrawer__factory = exports.ISwapper__factory = exports.ISwapAggregator__factory = exports.IRouterComponent__factory = exports.IRouter__factory = exports.IPathResolver__factory = exports.ILPWorkerOptions__factory = exports.ILPWorker__factory = exports.IGasPricer__factory = exports.IDepositorOptions__factory = exports.IDepositor__factory = exports.IClosePathResolver__factory = exports.ILidoMockEvents__factory = exports.ISupportedContracts__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.ICurveV1AdapterExceptions__factory = exports.ICurveV1Adapter__factory = exports.ICurveV1_4AssetsAdapter__factory = exports.ICurveV1_3AssetsAdapter__factory = void 0;
|
|
29
29
|
exports.factories = __importStar(require("./factories"));
|
|
30
30
|
var IAdapter__factory_1 = require("./factories/@gearbox-protocol/core-v2/contracts/interfaces/adapters/IAdapter.sol/IAdapter__factory");
|
|
31
31
|
Object.defineProperty(exports, "IAdapter__factory", { enumerable: true, get: function () { return IAdapter__factory_1.IAdapter__factory; } });
|
|
@@ -301,6 +301,8 @@ var ITokenDistributorEvents__factory_1 = require("./factories/contracts/ITokenDi
|
|
|
301
301
|
Object.defineProperty(exports, "ITokenDistributorEvents__factory", { enumerable: true, get: function () { return ITokenDistributorEvents__factory_1.ITokenDistributorEvents__factory; } });
|
|
302
302
|
var ITokenDistributorExceptions__factory_1 = require("./factories/contracts/ITokenDistributor.sol/ITokenDistributorExceptions__factory");
|
|
303
303
|
Object.defineProperty(exports, "ITokenDistributorExceptions__factory", { enumerable: true, get: function () { return ITokenDistributorExceptions__factory_1.ITokenDistributorExceptions__factory; } });
|
|
304
|
+
var IOffchainOracle__factory_1 = require("./factories/contracts/support/IOffchainOracle__factory");
|
|
305
|
+
Object.defineProperty(exports, "IOffchainOracle__factory", { enumerable: true, get: function () { return IOffchainOracle__factory_1.IOffchainOracle__factory; } });
|
|
304
306
|
var AggregatorV3Interface__factory_1 = require("./factories/@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface__factory");
|
|
305
307
|
Object.defineProperty(exports, "AggregatorV3Interface__factory", { enumerable: true, get: function () { return AggregatorV3Interface__factory_1.AggregatorV3Interface__factory; } });
|
|
306
308
|
var Multicall2__factory_1 = require("./factories/contracts/MultiCall.sol/Multicall2__factory");
|