Skip to content

Commit

Permalink
Remove @foundry-rs/hardhat-anvil
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Apr 26, 2024
1 parent 1b23186 commit 38aa2c3
Show file tree
Hide file tree
Showing 3 changed files with 2,300 additions and 7,970 deletions.
19 changes: 1 addition & 18 deletions crates/tools/js/benchmark/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,6 @@ const { _ } = require("lodash");
const {
createHardhatNetworkProvider,
} = require("hardhat/internal/hardhat-network/provider/provider");
const {
AnvilServer,
} = require("@foundry-rs/hardhat-anvil/dist/src/anvil-server");
const { HttpProvider } = require("hardhat/internal/core/providers/http");

const SCENARIOS_DIR = "../../scenarios/";
Expand Down Expand Up @@ -256,18 +253,8 @@ async function benchmarkScenario(scenarioFileName, useAnvil) {
const start = performance.now();

let provider;
let anvilServer;
if (useAnvil) {
try {
// Wrapper doesn't support `--prune-history` argument, hence `launch: false`
anvilServer = await AnvilServer.launch({ launch: false });
provider = new HttpProvider(ANVIL_HOST, "anvil");
} catch (e) {
if (anvilServer) {
anvilServer.kill();
}
throw e;
}
provider = new HttpProvider(ANVIL_HOST, "anvil");
} else {
provider = await createHardhatNetworkProvider(config.providerConfig, {
enabled: config.loggerEnabled,
Expand All @@ -290,10 +277,6 @@ async function benchmarkScenario(scenarioFileName, useAnvil) {

const timeMs = performance.now() - start;

if (anvilServer) {
anvilServer.kill();
}

console.error(
`${name} finished in ${
Math.round(100 * (timeMs / 1000)) / 100
Expand Down
1 change: 0 additions & 1 deletion crates/tools/js/benchmark/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
"author": "",
"license": "ISC",
"dependencies": {
"@foundry-rs/hardhat-anvil": "^0.1.7",
"argparse": "^2.0.1",
"hardhat": "^2.22.3",
"lodash": "^4.17.11",
Expand Down
Loading

0 comments on commit 38aa2c3

Please sign in to comment.