Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: removed useless 5seconds pause in mocked mode #34

Merged
merged 2 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions hardhat.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ task("test", async (taskArgs, hre, runSuper) => {
// Run modified test task
if (hre.network.name === "hardhat") {
// in fhevm mode all this block is done when launching the node via `pnmp fhevm:start`
await hre.run("clean");
await hre.run("compile:specific", { contract: "contracts" });
const sourceDir = path.resolve(__dirname, "node_modules/fhevm/");
const destinationDir = path.resolve(__dirname, "fhevmTemp/");
Expand All @@ -99,11 +98,10 @@ task("test", async (taskArgs, hre, runSuper) => {
fs.copyFileSync(sourceFile, destinationFile);

const targetAddress = "0x000000000000000000000000000000000000005d";
const NeverRevert = await hre.artifacts.readArtifact("MockedPrecompile");
const bytecode = NeverRevert.deployedBytecode;
const MockedPrecompile = await hre.artifacts.readArtifact("MockedPrecompile");
const bytecode = MockedPrecompile.deployedBytecode;
await hre.network.provider.send("hardhat_setCode", [targetAddress, bytecode]);
console.log(`Code of Mocked Pre-compile set at address: ${targetAddress}`);
fs.removeSync("fhevmTemp/");

const privKeyDeployer = process.env.PRIVATE_KEY_GATEWAY_DEPLOYER;
await hre.run("task:computePredeployAddress", { privateKey: privKeyDeployer });
Expand Down
2 changes: 1 addition & 1 deletion tasks/taskGatewayRelayer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ task("task:launchFhevm")
const p2 = getCoin(ownerAddress);
const p3 = getCoin(relayerAddress);
await Promise.all([p1, p2, p3]);
await new Promise((res) => setTimeout(res, 5000)); // wait 5 seconds
}
}
await new Promise((res) => setTimeout(res, 5000)); // wait 5 seconds
console.log(`privateKey ${privKeyDeployer}`);
console.log(`ownerAddress ${ownerAddress}`);
await hre.run("task:deployGateway", { privateKey: privKeyDeployer, ownerAddress: ownerAddress });
Expand Down
Loading