Skip to content

Commit

Permalink
fix: removed useless cleaning in mocked
Browse files Browse the repository at this point in the history
  • Loading branch information
jatZama committed Aug 22, 2024
1 parent 9bdbc6b commit 723908a
Showing 1 changed file with 2 additions and 4 deletions.
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

0 comments on commit 723908a

Please sign in to comment.