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: missing artifacts for ACL, TFHEExecutor, KMSVerifier, GatewayContract contracts #23

Open
infinitywarg opened this issue Jul 10, 2024 · 0 comments

Comments

@infinitywarg
Copy link

Bug reproduction steps:

  • create repository from this template
  • cd into the repository
  • run 'pnpm install'
  • run 'pnpm run fhevm:start'

Error:

Nothing to compile
No need to generate any newer typings.
Nothing to compile
No need to generate any newer typings.
gatewayContractAddress written to gateway/.env.gateway successfully!
node_modules/fhevm/gateway/lib/PredeployAddress.sol file has been generated successfully.
ACL address 0x2Fb4341027eb1d2aD8B5D9708187df8633cAFA92 written successfully!
node_modules/fhevm/lib/ACLAddress.sol file generated successfully!
TFHE Executor address 0x05fD9B5EFE0a996095f42Ed7e77c390810CF660c written successfully!
node_modules/fhevm/lib/FHEVMCoprocessorAddress.sol file generated successfully!
KMS Verifier address 0x12B064FB845C1cc05e9493856a1D637a73e944bE written successfully!
node_modules/fhevm/lib/KMSVerifierAddress.sol file generated successfully!
Error HH700: Artifact for contract "ACL" not found. 

For more info go to https://hardhat.org/HH700 or run Hardhat with --show-stack-traces
Error HH700: Artifact for contract "TFHEExecutor" not found. 

For more info go to https://hardhat.org/HH700 or run Hardhat with --show-stack-traces
Error HH700: Artifact for contract "KMSVerifier" not found. 

For more info go to https://hardhat.org/HH700 or run Hardhat with --show-stack-traces
privateKey 717fd99986df414889fd8b51069d4f90a50af72e542c58ee065f5883779099c6
ownerAddress 0x305F1F471e9baCFF2b3549F9601f9A4BEafc94e1
Error HH700: Artifact for contract "GatewayContract" not found. 

For more info go to https://hardhat.org/HH700 or run Hardhat with --show-stack-traces
 ELIFECYCLE  Command failed with exit code 1.

Root Cause:

  • 'npx hardhat clean' in launch-fhevm.sh script removes the entire /artifacts folder
  • TFHEExecutor.sol not imported into EncryptedERC20 contract hence artifact is not available in /artifacts/fhevm/lib/ folder

Fix:

  • remove 'npx hardhat clean' in launch-fhevm.sh script
  • import below contracts into EncryptedERC20 contract
import "fhevm/gateway/GatewayCaller.sol";
import "fhevm/lib/TFHEExecutor.sol";
import "fhevm/lib/TFHE.sol";
import "@openzeppelin/contracts/access/Ownable2Step.sol";

contract EncryptedERC20 is Ownable2Step {
...
...
...
@infinitywarg infinitywarg changed the title fix: missing artifacts for ACL, KMSVerifier and TFHEExecutor contracts fix: missing artifacts for ACL, TFHEExecutor, KMSVerifier, GatewayContract contracts Jul 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant