@gearbox-protocol/sdk 1.20.5 → 1.20.7
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/contracts/contractsRegister.d.ts +2 -1
- package/lib/contracts/contractsRegister.js +4 -1
- package/lib/core/pool.d.ts +9 -1
- package/lib/core/pool.js +46 -0
- package/lib/core/rewardConvex.spec.js +0 -1
- package/lib/oracles/priceFeeds.js +10 -0
- package/lib/pathfinder/pathfinder.d.ts +2 -3
- package/lib/tokens/decimals.js +1 -0
- package/lib/tokens/gear.d.ts +1 -1
- package/lib/tokens/gear.js +5 -0
- package/lib/tokens/token.js +2 -0
- package/lib/types/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.d.ts +106 -0
- package/lib/types/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.d.ts +218 -0
- package/lib/types/@chainlink/contracts/src/v0.8/interfaces/index.d.ts +2 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/index.d.ts +2 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator.d.ts +28 -1
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents.d.ts +11 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/adapters/IAdapter.sol/IAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/core-v2/contracts/interfaces/adapters/IUniversalAdapter.sol/IUniversalAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/core-v2/contracts/pool/PoolService.d.ts +570 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/pool/index.d.ts +1 -0
- package/lib/types/@gearbox-protocol/core-v2/contracts/pool/index.js +2 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/convex/IConvexV1BaseRewardPoolAdapter.sol/IConvexV1BaseRewardPoolAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/convex/IConvexV1BoosterAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1Adapter.sol/ICurveV1Adapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1_2AssetsAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1_3AssetsAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1_4AssetsAdapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/lido/ILidoV1Adapter.sol/ILidoV1Adapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/lido/IwstETHV1Adapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapPathChecker.d.ts +106 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapPathChecker.js +2 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/{IUniswapV2Adapter.d.ts → IUniswapV2Adapter.sol/IUniswapV2Adapter.d.ts} +2 -10
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/IUniswapV2Adapter.js +2 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions.d.ts +27 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions.js +2 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/index.d.ts +2 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/index.js +2 -0
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV3Adapter.sol/IUniswapV3Adapter.d.ts +1 -9
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/index.d.ts +3 -1
- package/lib/types/@gearbox-protocol/integrations-v2/contracts/interfaces/yearn/IYearnV2Adapter.d.ts +1 -9
- package/lib/types/contracts/IGnosisSafeSignatureValidator.d.ts +42 -0
- package/lib/types/contracts/IGnosisSafeSignatureValidator.js +2 -0
- package/lib/types/contracts/index.d.ts +3 -2
- package/lib/types/contracts/{MultiCall.sol → support/MultiCall.sol}/Multicall2.d.ts +1 -1
- package/lib/types/contracts/support/MultiCall.sol/Multicall2.js +2 -0
- package/lib/types/contracts/support/MultiCall.sol/index.js +2 -0
- package/lib/types/contracts/support/index.d.ts +2 -0
- package/lib/types/factories/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface__factory.d.ts +35 -0
- package/lib/types/factories/@chainlink/contracts/src/v0.8/interfaces/AggregatorInterface__factory.js +149 -0
- package/lib/types/factories/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface__factory.d.ts +35 -0
- package/lib/types/factories/@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface__factory.js +260 -0
- package/lib/types/factories/@chainlink/contracts/src/v0.8/interfaces/index.d.ts +2 -0
- package/lib/types/factories/@chainlink/contracts/src/v0.8/interfaces/index.js +5 -1
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/index.d.ts +1 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/index.js +2 -1
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditConfigurator.sol/ICreditConfiguratorEvents__factory.js +13 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/ICreditConfigurator.sol/ICreditConfigurator__factory.js +26 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/adapters/IAdapter.sol/IAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/interfaces/adapters/IUniversalAdapter.sol/IUniversalAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/pool/PoolService__factory.d.ts +65 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/pool/PoolService__factory.js +884 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/pool/index.d.ts +1 -0
- package/lib/types/factories/@gearbox-protocol/core-v2/contracts/pool/index.js +8 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/convex/IConvexV1BaseRewardPoolAdapter.sol/IConvexV1BaseRewardPoolAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/convex/IConvexV1BoosterAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1Adapter.sol/ICurveV1Adapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1_2AssetsAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1_3AssetsAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/curve/ICurveV1_4AssetsAdapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/lido/ILidoV1Adapter.sol/ILidoV1Adapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/lido/IwstETHV1Adapter__factory.js +0 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapPathChecker__factory.d.ts +22 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapPathChecker__factory.js +99 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions__factory.d.ts +12 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/IUniswapV2AdapterExceptions__factory.js +27 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/{IUniswapV2Adapter__factory.d.ts → IUniswapV2Adapter.sol/IUniswapV2Adapter__factory.d.ts} +1 -1
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/{IUniswapV2Adapter__factory.js → IUniswapV2Adapter.sol/IUniswapV2Adapter__factory.js} +5 -13
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/index.d.ts +2 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.sol/index.js +10 -0
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV3Adapter.sol/IUniswapV3AdapterExceptions__factory.js +1 -1
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV3Adapter.sol/IUniswapV3Adapter__factory.js +1 -14
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/index.d.ts +2 -1
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/index.js +4 -3
- package/lib/types/factories/@gearbox-protocol/integrations-v2/contracts/interfaces/yearn/IYearnV2Adapter__factory.js +0 -13
- package/lib/types/factories/contracts/IGnosisSafeSignatureValidator__factory.d.ts +22 -0
- package/lib/types/factories/contracts/IGnosisSafeSignatureValidator__factory.js +46 -0
- package/lib/types/factories/contracts/index.d.ts +2 -1
- package/lib/types/factories/contracts/index.js +4 -2
- package/lib/types/factories/contracts/{MultiCall.sol → support/MultiCall.sol}/Multicall2__factory.d.ts +2 -2
- package/lib/types/factories/contracts/{MultiCall.sol → support/MultiCall.sol}/Multicall2__factory.js +1 -1
- package/lib/types/factories/contracts/support/index.d.ts +1 -0
- package/lib/types/factories/contracts/support/index.js +25 -1
- package/lib/types/index.d.ts +16 -4
- package/lib/types/index.js +15 -3
- package/package.json +1 -1
- /package/lib/types/{@gearbox-protocol/integrations-v2/contracts/interfaces/uniswap/IUniswapV2Adapter.js → @chainlink/contracts/src/v0.8/interfaces/AggregatorInterface.js} +0 -0
- /package/lib/types/{contracts/MultiCall.sol/Multicall2.js → @chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.js} +0 -0
- /package/lib/types/{contracts/MultiCall.sol/index.js → @gearbox-protocol/core-v2/contracts/pool/PoolService.js} +0 -0
- /package/lib/types/contracts/{MultiCall.sol → support/MultiCall.sol}/index.d.ts +0 -0
- /package/lib/types/factories/contracts/{MultiCall.sol → support/MultiCall.sol}/index.d.ts +0 -0
- /package/lib/types/factories/contracts/{MultiCall.sol → support/MultiCall.sol}/index.js +0 -0
|
@@ -5,11 +5,12 @@ export declare const CREDIT_MANAGER_USDC_V2_MAINNET: string;
|
|
|
5
5
|
export declare const CREDIT_MANAGER_WETH_V2_MAINNET: string;
|
|
6
6
|
export declare const CREDIT_MANAGER_WSTETH_V2_MAINNET: string;
|
|
7
7
|
export declare const CREDIT_MANAGER_WBTC_V2_MAINNET: string;
|
|
8
|
+
export declare const CREDIT_MANAGER_FRAX_V2_MAINNET: string;
|
|
8
9
|
export declare const CREDIT_MANAGER_DAI_V2_GOERLI: string;
|
|
9
10
|
export declare const CREDIT_MANAGER_USDC_V2_GOERLI: string;
|
|
10
11
|
export declare const CREDIT_MANAGER_WETH_V2_GOERLI: string;
|
|
11
12
|
export declare const CREDIT_MANAGER_WSTETH_V2_GOERLI: string;
|
|
12
13
|
export declare const CREDIT_MANAGER_WBTC_V2_GOERLI: string;
|
|
13
|
-
export declare type CreditManagersV2 = typeof CREDIT_MANAGER_DAI_V2_MAINNET | typeof CREDIT_MANAGER_USDC_V2_MAINNET | typeof CREDIT_MANAGER_WETH_V2_MAINNET | typeof CREDIT_MANAGER_WSTETH_V2_MAINNET | typeof CREDIT_MANAGER_WBTC_V2_MAINNET | typeof CREDIT_MANAGER_DAI_V2_GOERLI | typeof CREDIT_MANAGER_USDC_V2_GOERLI | typeof CREDIT_MANAGER_WETH_V2_GOERLI | typeof CREDIT_MANAGER_WSTETH_V2_GOERLI | typeof CREDIT_MANAGER_WBTC_V2_GOERLI;
|
|
14
|
+
export declare type CreditManagersV2 = typeof CREDIT_MANAGER_DAI_V2_MAINNET | typeof CREDIT_MANAGER_USDC_V2_MAINNET | typeof CREDIT_MANAGER_WETH_V2_MAINNET | typeof CREDIT_MANAGER_WSTETH_V2_MAINNET | typeof CREDIT_MANAGER_WBTC_V2_MAINNET | typeof CREDIT_MANAGER_DAI_V2_GOERLI | typeof CREDIT_MANAGER_USDC_V2_GOERLI | typeof CREDIT_MANAGER_WETH_V2_GOERLI | typeof CREDIT_MANAGER_WSTETH_V2_GOERLI | typeof CREDIT_MANAGER_WBTC_V2_GOERLI | typeof CREDIT_MANAGER_FRAX_V2_MAINNET;
|
|
14
15
|
export declare const deployedContracts: Record<string, string>;
|
|
15
16
|
export declare function getContractName(address: string): string;
|
|
@@ -12,7 +12,7 @@ var __assign = (this && this.__assign) || function () {
|
|
|
12
12
|
};
|
|
13
13
|
var _a;
|
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
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;
|
|
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_FRAX_V2_MAINNET = 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
16
|
var mappers_1 = require("../utils/mappers");
|
|
17
17
|
var contracts_1 = require("./contracts");
|
|
18
18
|
exports.stEthPoolWrapper = {
|
|
@@ -24,6 +24,7 @@ exports.CREDIT_MANAGER_USDC_V2_MAINNET = "0x95357303f995e184A7998dA6C6eA35cC728A
|
|
|
24
24
|
exports.CREDIT_MANAGER_WETH_V2_MAINNET = "0x5887ad4cb2352e7f01527035faa3ae0ef2ce2b9b".toLowerCase();
|
|
25
25
|
exports.CREDIT_MANAGER_WSTETH_V2_MAINNET = "0xe0bce4460795281d39c91da9b0275bca968293de".toLowerCase();
|
|
26
26
|
exports.CREDIT_MANAGER_WBTC_V2_MAINNET = "0xc62bf8a7889adf1c5dc4665486c7683ae6e74e0f".toLowerCase();
|
|
27
|
+
exports.CREDIT_MANAGER_FRAX_V2_MAINNET = "0xa3e1e0d58fe8dd8c9dd48204699a1178f1b274d8".toLowerCase();
|
|
27
28
|
// GOERLI
|
|
28
29
|
exports.CREDIT_MANAGER_DAI_V2_GOERLI = "0xf7ba434952acaa2e12035a2c3643ca327914a470".toLowerCase();
|
|
29
30
|
exports.CREDIT_MANAGER_USDC_V2_GOERLI = "0x2144a7785baecbab32295188285717cad6c1a11c".toLowerCase();
|
|
@@ -36,6 +37,7 @@ exports.deployedContracts = (_a = {
|
|
|
36
37
|
"0x2664cc24CBAd28749B3Dd6fC97A6B402484De527": "USDC",
|
|
37
38
|
"0x968f9a68a98819E2e6Bb910466e191A7b6cf02F0": "WETH",
|
|
38
39
|
"0xC38478B0A4bAFE964C3526EEFF534d70E1E09017": "WBTC",
|
|
40
|
+
"0x79012c8d491dcf3a30db20d1f449b14caf01da6c": "FRAX",
|
|
39
41
|
// MAINNET POOLS
|
|
40
42
|
"0x24946bCbBd028D5ABb62ad9B635EB1b1a67AF668": "DAI",
|
|
41
43
|
"0x86130bDD69143D8a4E5fc50bf4323D48049E98E4": "USDC",
|
|
@@ -49,6 +51,7 @@ exports.deployedContracts = (_a = {
|
|
|
49
51
|
_a[exports.CREDIT_MANAGER_WETH_V2_MAINNET] = "WETH",
|
|
50
52
|
_a[exports.CREDIT_MANAGER_WSTETH_V2_MAINNET] = "wstETH",
|
|
51
53
|
_a[exports.CREDIT_MANAGER_WBTC_V2_MAINNET] = "WBTC",
|
|
54
|
+
_a[exports.CREDIT_MANAGER_FRAX_V2_MAINNET] = "FRAX",
|
|
52
55
|
// GOERLI CM
|
|
53
56
|
_a[exports.CREDIT_MANAGER_DAI_V2_GOERLI] = "DAI",
|
|
54
57
|
_a[exports.CREDIT_MANAGER_USDC_V2_GOERLI] = "USDC",
|
package/lib/core/pool.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BigNumber, Signer } from "ethers";
|
|
1
|
+
import { BigNumber, providers, Signer } from "ethers";
|
|
2
2
|
import { ChartsPoolDataPayload, PoolDataPayload } from "../payload/pool";
|
|
3
3
|
import { IPoolService } from "../types";
|
|
4
4
|
export declare class PoolData {
|
|
@@ -22,6 +22,13 @@ export declare class PoolData {
|
|
|
22
22
|
readonly isPaused: boolean;
|
|
23
23
|
constructor(payload: PoolDataPayload);
|
|
24
24
|
getContractETH(signer: Signer): IPoolService;
|
|
25
|
+
static calculateBorrowRate({ modelAddress, provider, expectedLiquidity, availableLiquidity, }: calculateBorrowRateProps): Promise<BigNumber>;
|
|
26
|
+
}
|
|
27
|
+
interface calculateBorrowRateProps {
|
|
28
|
+
modelAddress: string;
|
|
29
|
+
provider: providers.Provider;
|
|
30
|
+
expectedLiquidity: BigNumber;
|
|
31
|
+
availableLiquidity: BigNumber;
|
|
25
32
|
}
|
|
26
33
|
export declare class ChartsPoolData extends PoolData {
|
|
27
34
|
readonly expectedLiquidityInUSD: number;
|
|
@@ -35,3 +42,4 @@ export declare class ChartsPoolData extends PoolData {
|
|
|
35
42
|
readonly lmAPY: number;
|
|
36
43
|
constructor({ expectedLiquidityInUSD, expectedLiquidityLimitInUSD, availableLiquidityInUSD, totalBorrowedInUSD, caLockedValueInUSD, uniqueLPs, dieselAPY7D, dieselAPY30D, lmAPY, ...restPayload }: ChartsPoolDataPayload);
|
|
37
44
|
}
|
|
45
|
+
export {};
|
package/lib/core/pool.js
CHANGED
|
@@ -25,6 +25,42 @@ var __assign = (this && this.__assign) || function () {
|
|
|
25
25
|
};
|
|
26
26
|
return __assign.apply(this, arguments);
|
|
27
27
|
};
|
|
28
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
29
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
30
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
31
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
32
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
33
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
34
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
|
+
});
|
|
36
|
+
};
|
|
37
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
38
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
39
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
40
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
41
|
+
function step(op) {
|
|
42
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
43
|
+
while (_) try {
|
|
44
|
+
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;
|
|
45
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
46
|
+
switch (op[0]) {
|
|
47
|
+
case 0: case 1: t = op; break;
|
|
48
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
49
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
50
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
51
|
+
default:
|
|
52
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
53
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
54
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
55
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
56
|
+
if (t[2]) _.ops.pop();
|
|
57
|
+
_.trys.pop(); continue;
|
|
58
|
+
}
|
|
59
|
+
op = body.call(thisArg, _);
|
|
60
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
61
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
62
|
+
}
|
|
63
|
+
};
|
|
28
64
|
var __rest = (this && this.__rest) || function (s, e) {
|
|
29
65
|
var t = {};
|
|
30
66
|
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
@@ -67,6 +103,16 @@ var PoolData = /** @class */ (function () {
|
|
|
67
103
|
PoolData.prototype.getContractETH = function (signer) {
|
|
68
104
|
return types_1.IPoolService__factory.connect(this.address, signer);
|
|
69
105
|
};
|
|
106
|
+
PoolData.calculateBorrowRate = function (_a) {
|
|
107
|
+
var modelAddress = _a.modelAddress, provider = _a.provider, expectedLiquidity = _a.expectedLiquidity, availableLiquidity = _a.availableLiquidity;
|
|
108
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
109
|
+
var model;
|
|
110
|
+
return __generator(this, function (_b) {
|
|
111
|
+
model = types_1.IInterestRateModel__factory.connect(modelAddress, provider);
|
|
112
|
+
return [2 /*return*/, model.calcBorrowRate(expectedLiquidity, availableLiquidity)];
|
|
113
|
+
});
|
|
114
|
+
});
|
|
115
|
+
};
|
|
70
116
|
return PoolData;
|
|
71
117
|
}());
|
|
72
118
|
exports.PoolData = PoolData;
|
|
@@ -80,7 +80,6 @@ describe("RewardConvex test", function () {
|
|
|
80
80
|
},
|
|
81
81
|
];
|
|
82
82
|
var result = rewardConvex_1.RewardConvex.prepareMultiCalls(CREDIT_ACCOUNT, cm, "Mainnet");
|
|
83
|
-
console.log(result);
|
|
84
83
|
(0, chai_1.expect)(result).to.be.eql({ calls: calls, distribution: distribution });
|
|
85
84
|
});
|
|
86
85
|
it("parseResults parse data correctly", function () {
|
|
@@ -567,6 +567,16 @@ exports.priceFeedsByNetwork = {
|
|
|
567
567
|
address: { Mainnet: "", Goerli: "" },
|
|
568
568
|
},
|
|
569
569
|
},
|
|
570
|
+
dFRAX: {
|
|
571
|
+
priceFeedETH: {
|
|
572
|
+
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
573
|
+
address: { Mainnet: "", Goerli: "" },
|
|
574
|
+
},
|
|
575
|
+
priceFeedUSD: {
|
|
576
|
+
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
577
|
+
address: { Mainnet: "", Goerli: "" },
|
|
578
|
+
},
|
|
579
|
+
},
|
|
570
580
|
GEAR: {
|
|
571
581
|
priceFeedETH: {
|
|
572
582
|
type: oracles_1.OracleType.CHAINLINK_ORACLE,
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { BigNumberish, Signer } from "ethers";
|
|
1
|
+
import { BigNumberish, providers, Signer } from "ethers";
|
|
3
2
|
import { NetworkType } from "../core/chains";
|
|
4
3
|
import { CreditAccountData } from "../core/creditAccount";
|
|
5
4
|
import { CreditManagerData } from "../core/creditManager";
|
|
@@ -16,7 +15,7 @@ export declare class PathFinder {
|
|
|
16
15
|
network: NetworkType;
|
|
17
16
|
static connectors: Array<SupportedToken>;
|
|
18
17
|
protected readonly _connectors: Array<string>;
|
|
19
|
-
constructor(address: string, provider: Signer | Provider, network?: NetworkType, connectors?: Array<SupportedToken>);
|
|
18
|
+
constructor(address: string, provider: Signer | providers.Provider, network?: NetworkType, connectors?: Array<SupportedToken>);
|
|
20
19
|
findAllSwaps(creditAccount: CreditAccountData, swapOperation: SwapOperation, tokenIn: SupportedToken | string, tokenOut: SupportedToken | string, amount: BigNumberish, slippage: number): Promise<Array<PathFinderResult>>;
|
|
21
20
|
findOneTokenPath(creditAccount: CreditAccountData, tokenIn: SupportedToken | string, tokenOut: SupportedToken | string, amount: BigNumberish, slippage: number): Promise<PathFinderResult>;
|
|
22
21
|
/**
|
package/lib/tokens/decimals.js
CHANGED
package/lib/tokens/gear.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TradeAction } from "../pathfinder/tradeTypes";
|
|
2
2
|
import type { TokenBase } from "./token";
|
|
3
3
|
import { TokenType } from "./tokenType";
|
|
4
|
-
export declare type DieselTokenTypes = "dDAI" | "dUSDC" | "dWBTC" | "dWETH" | "dwstETH";
|
|
4
|
+
export declare type DieselTokenTypes = "dDAI" | "dUSDC" | "dWBTC" | "dWETH" | "dwstETH" | "dFRAX";
|
|
5
5
|
export declare type GearboxToken = "GEAR";
|
|
6
6
|
export declare type DieselTokenData = {
|
|
7
7
|
symbol: DieselTokenTypes;
|
package/lib/tokens/gear.js
CHANGED
package/lib/tokens/token.js
CHANGED
|
@@ -88,6 +88,7 @@ exports.tokenDataByNetwork = {
|
|
|
88
88
|
dWBTC: "0xe753260F1955e8678DCeA8887759e07aa57E8c54",
|
|
89
89
|
dWETH: "0xF21fc650C1B34eb0FDE786D52d23dA99Db3D6278",
|
|
90
90
|
dwstETH: "0x2158034dB06f06dcB9A786D2F1F8c38781bA779d",
|
|
91
|
+
dFRAX: "0x8a1112afef7f4fc7c066a77aabbc01b3fff31d47",
|
|
91
92
|
GEAR: "0xBa3335588D9403515223F109EdC4eB7269a9Ab5D",
|
|
92
93
|
},
|
|
93
94
|
///
|
|
@@ -159,6 +160,7 @@ exports.tokenDataByNetwork = {
|
|
|
159
160
|
dWBTC: "0xd7f208de8d5b5301e7018dcc6D312A4305382330",
|
|
160
161
|
dWETH: "0xfb906E19E71ED61bcb5eA0E11d77941A058eafBD",
|
|
161
162
|
dwstETH: "0xAB20D04aF0f79aB21cC66431F6BAc03b74003d4d",
|
|
163
|
+
dFRAX: "deploy me",
|
|
162
164
|
GEAR: "0x3321F5dA65165042903eDe71617F912942f4E70F",
|
|
163
165
|
},
|
|
164
166
|
};
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../../common";
|
|
5
|
+
export interface AggregatorInterfaceInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"getAnswer(uint256)": FunctionFragment;
|
|
8
|
+
"getTimestamp(uint256)": FunctionFragment;
|
|
9
|
+
"latestAnswer()": FunctionFragment;
|
|
10
|
+
"latestRound()": FunctionFragment;
|
|
11
|
+
"latestTimestamp()": FunctionFragment;
|
|
12
|
+
};
|
|
13
|
+
getFunction(nameOrSignatureOrTopic: "getAnswer" | "getTimestamp" | "latestAnswer" | "latestRound" | "latestTimestamp"): FunctionFragment;
|
|
14
|
+
encodeFunctionData(functionFragment: "getAnswer", values: [BigNumberish]): string;
|
|
15
|
+
encodeFunctionData(functionFragment: "getTimestamp", values: [BigNumberish]): string;
|
|
16
|
+
encodeFunctionData(functionFragment: "latestAnswer", values?: undefined): string;
|
|
17
|
+
encodeFunctionData(functionFragment: "latestRound", values?: undefined): string;
|
|
18
|
+
encodeFunctionData(functionFragment: "latestTimestamp", values?: undefined): string;
|
|
19
|
+
decodeFunctionResult(functionFragment: "getAnswer", data: BytesLike): Result;
|
|
20
|
+
decodeFunctionResult(functionFragment: "getTimestamp", data: BytesLike): Result;
|
|
21
|
+
decodeFunctionResult(functionFragment: "latestAnswer", data: BytesLike): Result;
|
|
22
|
+
decodeFunctionResult(functionFragment: "latestRound", data: BytesLike): Result;
|
|
23
|
+
decodeFunctionResult(functionFragment: "latestTimestamp", data: BytesLike): Result;
|
|
24
|
+
events: {
|
|
25
|
+
"AnswerUpdated(int256,uint256,uint256)": EventFragment;
|
|
26
|
+
"NewRound(uint256,address,uint256)": EventFragment;
|
|
27
|
+
};
|
|
28
|
+
getEvent(nameOrSignatureOrTopic: "AnswerUpdated"): EventFragment;
|
|
29
|
+
getEvent(nameOrSignatureOrTopic: "NewRound"): EventFragment;
|
|
30
|
+
}
|
|
31
|
+
export interface AnswerUpdatedEventObject {
|
|
32
|
+
current: BigNumber;
|
|
33
|
+
roundId: BigNumber;
|
|
34
|
+
updatedAt: BigNumber;
|
|
35
|
+
}
|
|
36
|
+
export declare type AnswerUpdatedEvent = TypedEvent<[
|
|
37
|
+
BigNumber,
|
|
38
|
+
BigNumber,
|
|
39
|
+
BigNumber
|
|
40
|
+
], AnswerUpdatedEventObject>;
|
|
41
|
+
export declare type AnswerUpdatedEventFilter = TypedEventFilter<AnswerUpdatedEvent>;
|
|
42
|
+
export interface NewRoundEventObject {
|
|
43
|
+
roundId: BigNumber;
|
|
44
|
+
startedBy: string;
|
|
45
|
+
startedAt: BigNumber;
|
|
46
|
+
}
|
|
47
|
+
export declare type NewRoundEvent = TypedEvent<[
|
|
48
|
+
BigNumber,
|
|
49
|
+
string,
|
|
50
|
+
BigNumber
|
|
51
|
+
], NewRoundEventObject>;
|
|
52
|
+
export declare type NewRoundEventFilter = TypedEventFilter<NewRoundEvent>;
|
|
53
|
+
export interface AggregatorInterface extends BaseContract {
|
|
54
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
55
|
+
attach(addressOrName: string): this;
|
|
56
|
+
deployed(): Promise<this>;
|
|
57
|
+
interface: AggregatorInterfaceInterface;
|
|
58
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
59
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
60
|
+
listeners(eventName?: string): Array<Listener>;
|
|
61
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
62
|
+
removeAllListeners(eventName?: string): this;
|
|
63
|
+
off: OnEvent<this>;
|
|
64
|
+
on: OnEvent<this>;
|
|
65
|
+
once: OnEvent<this>;
|
|
66
|
+
removeListener: OnEvent<this>;
|
|
67
|
+
functions: {
|
|
68
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
69
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
70
|
+
latestAnswer(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
71
|
+
latestRound(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
72
|
+
latestTimestamp(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
73
|
+
};
|
|
74
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
75
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
76
|
+
latestAnswer(overrides?: CallOverrides): Promise<BigNumber>;
|
|
77
|
+
latestRound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
78
|
+
latestTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
|
|
79
|
+
callStatic: {
|
|
80
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
81
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
82
|
+
latestAnswer(overrides?: CallOverrides): Promise<BigNumber>;
|
|
83
|
+
latestRound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
84
|
+
latestTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
|
|
85
|
+
};
|
|
86
|
+
filters: {
|
|
87
|
+
"AnswerUpdated(int256,uint256,uint256)"(current?: BigNumberish | null, roundId?: BigNumberish | null, updatedAt?: null): AnswerUpdatedEventFilter;
|
|
88
|
+
AnswerUpdated(current?: BigNumberish | null, roundId?: BigNumberish | null, updatedAt?: null): AnswerUpdatedEventFilter;
|
|
89
|
+
"NewRound(uint256,address,uint256)"(roundId?: BigNumberish | null, startedBy?: string | null, startedAt?: null): NewRoundEventFilter;
|
|
90
|
+
NewRound(roundId?: BigNumberish | null, startedBy?: string | null, startedAt?: null): NewRoundEventFilter;
|
|
91
|
+
};
|
|
92
|
+
estimateGas: {
|
|
93
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
94
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
95
|
+
latestAnswer(overrides?: CallOverrides): Promise<BigNumber>;
|
|
96
|
+
latestRound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
97
|
+
latestTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
|
|
98
|
+
};
|
|
99
|
+
populateTransaction: {
|
|
100
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
101
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
102
|
+
latestAnswer(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
103
|
+
latestRound(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
104
|
+
latestTimestamp(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
105
|
+
};
|
|
106
|
+
}
|
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
import type { BaseContract, BigNumber, BigNumberish, BytesLike, CallOverrides, PopulatedTransaction, Signer, utils } from "ethers";
|
|
2
|
+
import type { FunctionFragment, Result, EventFragment } from "@ethersproject/abi";
|
|
3
|
+
import type { Listener, Provider } from "@ethersproject/providers";
|
|
4
|
+
import type { TypedEventFilter, TypedEvent, TypedListener, OnEvent } from "../../../../../common";
|
|
5
|
+
export interface AggregatorV2V3InterfaceInterface extends utils.Interface {
|
|
6
|
+
functions: {
|
|
7
|
+
"decimals()": FunctionFragment;
|
|
8
|
+
"description()": FunctionFragment;
|
|
9
|
+
"getAnswer(uint256)": FunctionFragment;
|
|
10
|
+
"getRoundData(uint80)": FunctionFragment;
|
|
11
|
+
"getTimestamp(uint256)": FunctionFragment;
|
|
12
|
+
"latestAnswer()": FunctionFragment;
|
|
13
|
+
"latestRound()": FunctionFragment;
|
|
14
|
+
"latestRoundData()": FunctionFragment;
|
|
15
|
+
"latestTimestamp()": FunctionFragment;
|
|
16
|
+
"version()": FunctionFragment;
|
|
17
|
+
};
|
|
18
|
+
getFunction(nameOrSignatureOrTopic: "decimals" | "description" | "getAnswer" | "getRoundData" | "getTimestamp" | "latestAnswer" | "latestRound" | "latestRoundData" | "latestTimestamp" | "version"): FunctionFragment;
|
|
19
|
+
encodeFunctionData(functionFragment: "decimals", values?: undefined): string;
|
|
20
|
+
encodeFunctionData(functionFragment: "description", values?: undefined): string;
|
|
21
|
+
encodeFunctionData(functionFragment: "getAnswer", values: [BigNumberish]): string;
|
|
22
|
+
encodeFunctionData(functionFragment: "getRoundData", values: [BigNumberish]): string;
|
|
23
|
+
encodeFunctionData(functionFragment: "getTimestamp", values: [BigNumberish]): string;
|
|
24
|
+
encodeFunctionData(functionFragment: "latestAnswer", values?: undefined): string;
|
|
25
|
+
encodeFunctionData(functionFragment: "latestRound", values?: undefined): string;
|
|
26
|
+
encodeFunctionData(functionFragment: "latestRoundData", values?: undefined): string;
|
|
27
|
+
encodeFunctionData(functionFragment: "latestTimestamp", values?: undefined): string;
|
|
28
|
+
encodeFunctionData(functionFragment: "version", values?: undefined): string;
|
|
29
|
+
decodeFunctionResult(functionFragment: "decimals", data: BytesLike): Result;
|
|
30
|
+
decodeFunctionResult(functionFragment: "description", data: BytesLike): Result;
|
|
31
|
+
decodeFunctionResult(functionFragment: "getAnswer", data: BytesLike): Result;
|
|
32
|
+
decodeFunctionResult(functionFragment: "getRoundData", data: BytesLike): Result;
|
|
33
|
+
decodeFunctionResult(functionFragment: "getTimestamp", data: BytesLike): Result;
|
|
34
|
+
decodeFunctionResult(functionFragment: "latestAnswer", data: BytesLike): Result;
|
|
35
|
+
decodeFunctionResult(functionFragment: "latestRound", data: BytesLike): Result;
|
|
36
|
+
decodeFunctionResult(functionFragment: "latestRoundData", data: BytesLike): Result;
|
|
37
|
+
decodeFunctionResult(functionFragment: "latestTimestamp", data: BytesLike): Result;
|
|
38
|
+
decodeFunctionResult(functionFragment: "version", data: BytesLike): Result;
|
|
39
|
+
events: {
|
|
40
|
+
"AnswerUpdated(int256,uint256,uint256)": EventFragment;
|
|
41
|
+
"NewRound(uint256,address,uint256)": EventFragment;
|
|
42
|
+
};
|
|
43
|
+
getEvent(nameOrSignatureOrTopic: "AnswerUpdated"): EventFragment;
|
|
44
|
+
getEvent(nameOrSignatureOrTopic: "NewRound"): EventFragment;
|
|
45
|
+
}
|
|
46
|
+
export interface AnswerUpdatedEventObject {
|
|
47
|
+
current: BigNumber;
|
|
48
|
+
roundId: BigNumber;
|
|
49
|
+
updatedAt: BigNumber;
|
|
50
|
+
}
|
|
51
|
+
export declare type AnswerUpdatedEvent = TypedEvent<[
|
|
52
|
+
BigNumber,
|
|
53
|
+
BigNumber,
|
|
54
|
+
BigNumber
|
|
55
|
+
], AnswerUpdatedEventObject>;
|
|
56
|
+
export declare type AnswerUpdatedEventFilter = TypedEventFilter<AnswerUpdatedEvent>;
|
|
57
|
+
export interface NewRoundEventObject {
|
|
58
|
+
roundId: BigNumber;
|
|
59
|
+
startedBy: string;
|
|
60
|
+
startedAt: BigNumber;
|
|
61
|
+
}
|
|
62
|
+
export declare type NewRoundEvent = TypedEvent<[
|
|
63
|
+
BigNumber,
|
|
64
|
+
string,
|
|
65
|
+
BigNumber
|
|
66
|
+
], NewRoundEventObject>;
|
|
67
|
+
export declare type NewRoundEventFilter = TypedEventFilter<NewRoundEvent>;
|
|
68
|
+
export interface AggregatorV2V3Interface extends BaseContract {
|
|
69
|
+
connect(signerOrProvider: Signer | Provider | string): this;
|
|
70
|
+
attach(addressOrName: string): this;
|
|
71
|
+
deployed(): Promise<this>;
|
|
72
|
+
interface: AggregatorV2V3InterfaceInterface;
|
|
73
|
+
queryFilter<TEvent extends TypedEvent>(event: TypedEventFilter<TEvent>, fromBlockOrBlockhash?: string | number | undefined, toBlock?: string | number | undefined): Promise<Array<TEvent>>;
|
|
74
|
+
listeners<TEvent extends TypedEvent>(eventFilter?: TypedEventFilter<TEvent>): Array<TypedListener<TEvent>>;
|
|
75
|
+
listeners(eventName?: string): Array<Listener>;
|
|
76
|
+
removeAllListeners<TEvent extends TypedEvent>(eventFilter: TypedEventFilter<TEvent>): this;
|
|
77
|
+
removeAllListeners(eventName?: string): this;
|
|
78
|
+
off: OnEvent<this>;
|
|
79
|
+
on: OnEvent<this>;
|
|
80
|
+
once: OnEvent<this>;
|
|
81
|
+
removeListener: OnEvent<this>;
|
|
82
|
+
functions: {
|
|
83
|
+
decimals(overrides?: CallOverrides): Promise<[number]>;
|
|
84
|
+
description(overrides?: CallOverrides): Promise<[string]>;
|
|
85
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
86
|
+
getRoundData(_roundId: BigNumberish, overrides?: CallOverrides): Promise<[
|
|
87
|
+
BigNumber,
|
|
88
|
+
BigNumber,
|
|
89
|
+
BigNumber,
|
|
90
|
+
BigNumber,
|
|
91
|
+
BigNumber
|
|
92
|
+
] & {
|
|
93
|
+
roundId: BigNumber;
|
|
94
|
+
answer: BigNumber;
|
|
95
|
+
startedAt: BigNumber;
|
|
96
|
+
updatedAt: BigNumber;
|
|
97
|
+
answeredInRound: BigNumber;
|
|
98
|
+
}>;
|
|
99
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
100
|
+
latestAnswer(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
101
|
+
latestRound(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
102
|
+
latestRoundData(overrides?: CallOverrides): Promise<[
|
|
103
|
+
BigNumber,
|
|
104
|
+
BigNumber,
|
|
105
|
+
BigNumber,
|
|
106
|
+
BigNumber,
|
|
107
|
+
BigNumber
|
|
108
|
+
] & {
|
|
109
|
+
roundId: BigNumber;
|
|
110
|
+
answer: BigNumber;
|
|
111
|
+
startedAt: BigNumber;
|
|
112
|
+
updatedAt: BigNumber;
|
|
113
|
+
answeredInRound: BigNumber;
|
|
114
|
+
}>;
|
|
115
|
+
latestTimestamp(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
116
|
+
version(overrides?: CallOverrides): Promise<[BigNumber]>;
|
|
117
|
+
};
|
|
118
|
+
decimals(overrides?: CallOverrides): Promise<number>;
|
|
119
|
+
description(overrides?: CallOverrides): Promise<string>;
|
|
120
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
121
|
+
getRoundData(_roundId: BigNumberish, overrides?: CallOverrides): Promise<[
|
|
122
|
+
BigNumber,
|
|
123
|
+
BigNumber,
|
|
124
|
+
BigNumber,
|
|
125
|
+
BigNumber,
|
|
126
|
+
BigNumber
|
|
127
|
+
] & {
|
|
128
|
+
roundId: BigNumber;
|
|
129
|
+
answer: BigNumber;
|
|
130
|
+
startedAt: BigNumber;
|
|
131
|
+
updatedAt: BigNumber;
|
|
132
|
+
answeredInRound: BigNumber;
|
|
133
|
+
}>;
|
|
134
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
135
|
+
latestAnswer(overrides?: CallOverrides): Promise<BigNumber>;
|
|
136
|
+
latestRound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
137
|
+
latestRoundData(overrides?: CallOverrides): Promise<[
|
|
138
|
+
BigNumber,
|
|
139
|
+
BigNumber,
|
|
140
|
+
BigNumber,
|
|
141
|
+
BigNumber,
|
|
142
|
+
BigNumber
|
|
143
|
+
] & {
|
|
144
|
+
roundId: BigNumber;
|
|
145
|
+
answer: BigNumber;
|
|
146
|
+
startedAt: BigNumber;
|
|
147
|
+
updatedAt: BigNumber;
|
|
148
|
+
answeredInRound: BigNumber;
|
|
149
|
+
}>;
|
|
150
|
+
latestTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
|
|
151
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
152
|
+
callStatic: {
|
|
153
|
+
decimals(overrides?: CallOverrides): Promise<number>;
|
|
154
|
+
description(overrides?: CallOverrides): Promise<string>;
|
|
155
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
156
|
+
getRoundData(_roundId: BigNumberish, overrides?: CallOverrides): Promise<[
|
|
157
|
+
BigNumber,
|
|
158
|
+
BigNumber,
|
|
159
|
+
BigNumber,
|
|
160
|
+
BigNumber,
|
|
161
|
+
BigNumber
|
|
162
|
+
] & {
|
|
163
|
+
roundId: BigNumber;
|
|
164
|
+
answer: BigNumber;
|
|
165
|
+
startedAt: BigNumber;
|
|
166
|
+
updatedAt: BigNumber;
|
|
167
|
+
answeredInRound: BigNumber;
|
|
168
|
+
}>;
|
|
169
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
170
|
+
latestAnswer(overrides?: CallOverrides): Promise<BigNumber>;
|
|
171
|
+
latestRound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
172
|
+
latestRoundData(overrides?: CallOverrides): Promise<[
|
|
173
|
+
BigNumber,
|
|
174
|
+
BigNumber,
|
|
175
|
+
BigNumber,
|
|
176
|
+
BigNumber,
|
|
177
|
+
BigNumber
|
|
178
|
+
] & {
|
|
179
|
+
roundId: BigNumber;
|
|
180
|
+
answer: BigNumber;
|
|
181
|
+
startedAt: BigNumber;
|
|
182
|
+
updatedAt: BigNumber;
|
|
183
|
+
answeredInRound: BigNumber;
|
|
184
|
+
}>;
|
|
185
|
+
latestTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
|
|
186
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
187
|
+
};
|
|
188
|
+
filters: {
|
|
189
|
+
"AnswerUpdated(int256,uint256,uint256)"(current?: BigNumberish | null, roundId?: BigNumberish | null, updatedAt?: null): AnswerUpdatedEventFilter;
|
|
190
|
+
AnswerUpdated(current?: BigNumberish | null, roundId?: BigNumberish | null, updatedAt?: null): AnswerUpdatedEventFilter;
|
|
191
|
+
"NewRound(uint256,address,uint256)"(roundId?: BigNumberish | null, startedBy?: string | null, startedAt?: null): NewRoundEventFilter;
|
|
192
|
+
NewRound(roundId?: BigNumberish | null, startedBy?: string | null, startedAt?: null): NewRoundEventFilter;
|
|
193
|
+
};
|
|
194
|
+
estimateGas: {
|
|
195
|
+
decimals(overrides?: CallOverrides): Promise<BigNumber>;
|
|
196
|
+
description(overrides?: CallOverrides): Promise<BigNumber>;
|
|
197
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
198
|
+
getRoundData(_roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
199
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<BigNumber>;
|
|
200
|
+
latestAnswer(overrides?: CallOverrides): Promise<BigNumber>;
|
|
201
|
+
latestRound(overrides?: CallOverrides): Promise<BigNumber>;
|
|
202
|
+
latestRoundData(overrides?: CallOverrides): Promise<BigNumber>;
|
|
203
|
+
latestTimestamp(overrides?: CallOverrides): Promise<BigNumber>;
|
|
204
|
+
version(overrides?: CallOverrides): Promise<BigNumber>;
|
|
205
|
+
};
|
|
206
|
+
populateTransaction: {
|
|
207
|
+
decimals(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
208
|
+
description(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
209
|
+
getAnswer(roundId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
210
|
+
getRoundData(_roundId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
211
|
+
getTimestamp(roundId: BigNumberish, overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
212
|
+
latestAnswer(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
213
|
+
latestRound(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
214
|
+
latestRoundData(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
215
|
+
latestTimestamp(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
216
|
+
version(overrides?: CallOverrides): Promise<PopulatedTransaction>;
|
|
217
|
+
};
|
|
218
|
+
}
|