Skip to content

Commit

Permalink
Add target setting for InputValidatorPolicy contract during deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
ryardley committed Feb 3, 2025
1 parent bca477b commit 604a2d1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/evm/deploy/mocks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,14 @@ const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
enclaveDeployment.address,
);

const inputValidatorPolicyContract = await hre.ethers.getContractAt(
"InputValidatorPolicy",
inputValidatorPolicy.address,
);

// NOTE: We must ensure that the target has been set for the policy so that the enclave contract is allowed to call the policy
await inputValidatorPolicyContract.setTarget(enclaveDeployment.address);

const encryptionSchemeId = hre.ethers.keccak256(
hre.ethers.toUtf8Bytes("fhe.rs:BFV"),
);
Expand Down

0 comments on commit 604a2d1

Please sign in to comment.