Skip to content

Commit

Permalink
fix: update to sdk-gov v2
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed May 7, 2024
1 parent 86f6e69 commit cee27d7
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 123 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@aws-sdk/client-s3": "^3.564.0",
"@flashbots/ethers-provider-bundle": "^1.0.0",
"@gearbox-protocol/liquidator-v2-contracts": "^2.0.0",
"@gearbox-protocol/sdk-gov": "^1.67.0",
"@gearbox-protocol/sdk-gov": "^2.1.0",
"@gearbox-protocol/types": "^1.6.1",
"@redstone-finance/evm-connector": "^0.4.0",
"@uniswap/sdk-core": "^5.0.0",
Expand Down
8 changes: 4 additions & 4 deletions src/services/OracleServiceV3.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ADDRESS_0X0, type NetworkType, WAD } from "@gearbox-protocol/sdk-gov";
import type { MCall, NetworkType } from "@gearbox-protocol/sdk-gov";
import { ADDRESS_0X0, safeMulticall, WAD } from "@gearbox-protocol/sdk-gov";
import type {
IPriceOracleV3,
IRedstonePriceFeed,
Expand All @@ -14,8 +15,7 @@ import { Inject, Service } from "typedi";
import { CONFIG, type ConfigSchema } from "../config";
import { Logger, type LoggerInterface } from "../log";
import { PROVIDER } from "../utils";
import type { CreditAccountData, MCall } from "../utils/ethers-6-temp";
import { safeMulticall } from "../utils/ethers-6-temp";
import type { CreditAccountData } from "../utils/ethers-6-temp";
import { TxParser } from "../utils/ethers-6-temp/txparser";
import { AddressProviderService } from "./AddressProviderService";

Expand Down Expand Up @@ -259,7 +259,7 @@ export default class OracleServiceV3 {
f.main.dataFeedId = dataFeedId;
}
if (f.reserve?.address === feedAddress) {
f.reserve.dataFeedId = dataFeedId;
f.reserve!.dataFeedId = dataFeedId;
}
}
}
Expand Down
5 changes: 3 additions & 2 deletions src/services/scan/ScanServiceV3.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import type { MCall } from "@gearbox-protocol/sdk-gov";
import {
PERCENTAGE_FACTOR,
safeMulticall,
tokenSymbolByAddress,
} from "@gearbox-protocol/sdk-gov";
import type {
Expand All @@ -16,8 +18,7 @@ import type { Overrides } from "ethers";
import { Inject, Service } from "typedi";

import { Logger, type LoggerInterface } from "../../log";
import type { MCall } from "../../utils/ethers-6-temp";
import { CreditAccountData, safeMulticall } from "../../utils/ethers-6-temp";
import { CreditAccountData } from "../../utils/ethers-6-temp";
import type { ILiquidatorService } from "../liquidate";
import { LiquidatorService } from "../liquidate";
import OracleServiceV3 from "../OracleServiceV3";
Expand Down
1 change: 0 additions & 1 deletion src/utils/ethers-6-temp/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
export * from "./CreditAccountData";
export * from "./CreditManagerData";
export * from "./detect-network";
export * from "./multicall";
111 changes: 0 additions & 111 deletions src/utils/ethers-6-temp/multicall.ts

This file was deleted.

8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1370,10 +1370,10 @@
resolved "https://registry.yarnpkg.com/@gearbox-protocol/prettier-config/-/prettier-config-2.0.0-next.0.tgz#8183cfa8c6ee538543089961ecb4d03fe77045de"
integrity sha512-hDokre6TjEkpNdf+tTk/Gh2dTJpkJFgMPTpE7KS4KFddUqGLqDKMaE4/ZzBA8kvYNm5gSXytCwWrxPXO8kFKYA==

"@gearbox-protocol/sdk-gov@^1.67.0":
version "1.67.1"
resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk-gov/-/sdk-gov-1.67.1.tgz#75b1b9c423aab814cb8d647804842a48dcc7e764"
integrity sha512-TPkCW94lnJpa3dmmmh2sL/f6FwtQxofq2fT279CqqK633FyM1ae8fPeeO9x5XrFbra210DY2018byqjRcxOb8g==
"@gearbox-protocol/sdk-gov@^2.1.0":
version "2.1.0"
resolved "https://registry.yarnpkg.com/@gearbox-protocol/sdk-gov/-/sdk-gov-2.1.0.tgz#0fa3526198095d30158c30b49ab87616242703d6"
integrity sha512-2jWPEdYqvMBM+Z3Ue0KQ9ioF55CvNWVlb5fMBiogxp3W103pXxJuTdBsh4LdDunnGgUaLScDItd8YHbNkmBhiw==
dependencies:
"@types/yaml" "^1.9.7"
add "^2.0.6"
Expand Down

0 comments on commit cee27d7

Please sign in to comment.