Skip to content

Commit

Permalink
feat: migrate to ethers-6
Browse files Browse the repository at this point in the history
  • Loading branch information
doomsower committed May 7, 2024
1 parent 6869851 commit 86f6e69
Show file tree
Hide file tree
Showing 74 changed files with 4,199 additions and 3,145 deletions.
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
"skipFiles": ["<node_internals>/**"],
"program": "${workspaceFolder}/build/index.js",
"preLaunchTask": "tsc: build - tsconfig.json",
"outFiles": ["${workspaceFolder}/build/**/*.js"]
"outFiles": ["${workspaceFolder}/build/**/*.js"],
"envFile": "${workspaceFolder}/.env"
}
]
}
25 changes: 8 additions & 17 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
"version": "1.0.0",
"license": "MIT",
"private": true,
"bin": {
"tsliq": "./lib/index.js"
},
"scripts": {
"clean": "rm -rf build",
"build": "tsc --p tsconfig.build.json",
Expand All @@ -21,29 +18,23 @@
},
"dependencies": {
"@aws-sdk/client-s3": "^3.564.0",
"@aws-sdk/client-secrets-manager": "^3.564.0",
"@flashbots/ethers-provider-bundle": "^1.0.0",
"@gearbox-protocol/devops": "^1.6.3",
"@gearbox-protocol/liquidator-v2-contracts": "^1.2.1",
"@gearbox-protocol/sdk": "^3.0.0-next.175",
"@gearbox-protocol/liquidator-v2-contracts": "^2.0.0",
"@gearbox-protocol/sdk-gov": "^1.67.0",
"@gearbox-protocol/types": "^1.6.1",
"@redstone-finance/evm-connector": "^0.4.0",
"@types/express": "^4.17.20",
"@uniswap/sdk-core": "^4.2.0",
"@uniswap/sdk-core": "^5.0.0",
"@uniswap/v3-sdk": "^3.11.1",
"amqplib": "^0.10.4",
"axios": "^1.6.8",
"axios-retry": "^4.1.0",
"cors": "^2.8.5",
"date-fns": "^3.6.0",
"ethers": "^5.7.1",
"ethers-decode-error": "^1.0.0",
"express": "^4.19.2",
"ethers": "^6.12.1",
"ethers-decode-error": "^2.1.3",
"p-retry": "4.6.2",
"pino": "^8.20.0",
"prom-client": "^15.1.2",
"pino": "^9.0.0",
"redstone-protocol": "^1.0.5",
"reflect-metadata": "^0.2.2",
"tslib": "^2.6.2",
"typedi": "^0.10.0"
},
"devDependencies": {
Expand All @@ -59,7 +50,7 @@
"lint-staged": "^15.2.2",
"pino-pretty": "^11.0.0",
"prettier": "^3.2.5",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"typescript": "^5.4.5",
"vitest": "^1.5.2"
},
Expand Down
18 changes: 9 additions & 9 deletions src/app.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import { providers, Wallet } from "ethers";
import { Wallet } from "ethers";
import { Container, Inject, Service } from "typedi";

import { CONFIG, ConfigSchema, loadConfig } from "./config";
import { Logger, LoggerInterface } from "./log";
import { CONFIG, type ConfigSchema, loadConfig } from "./config";
import { Logger, type LoggerInterface } from "./log";
import { AddressProviderService } from "./services/AddressProviderService";
import { AMPQService } from "./services/ampqService";
import ExecutorService from "./services/ExecutorService";
import { HealthChecker } from "./services/healthChecker";
import HealthCheckerService from "./services/HealthCheckerService";
import { OptimisticResults } from "./services/liquidate";
import { IOptimisticOutputWriter, OUTPUT_WRITER } from "./services/output";
import { type IOptimisticOutputWriter, OUTPUT_WRITER } from "./services/output";
import { RedstoneServiceV3 } from "./services/RedstoneServiceV3";
import { ScanServiceV3 } from "./services/scan";
import { ISwapper, SWAPPER } from "./services/swap";
import { getProvider } from "./services/utils";
import { type ISwapper, SWAPPER } from "./services/swap";
import { getProvider, PROVIDER } from "./utils";
import version from "./version";

@Service()
Expand All @@ -33,7 +33,7 @@ class App {
ampqService: AMPQService;

@Inject()
healthChecker: HealthChecker;
healthChecker: HealthCheckerService;

@Inject()
optimistic: OptimisticResults;
Expand Down Expand Up @@ -89,7 +89,7 @@ export async function launchApp(): Promise<void> {
Container.set(CONFIG, config);

const provider = getProvider();
Container.set(providers.Provider, provider);
Container.set(PROVIDER, provider);

const wallet = new Wallet(config.privateKey, provider);
Container.set(Wallet, wallet);
Expand Down
Loading

0 comments on commit 86f6e69

Please sign in to comment.