-
Notifications
You must be signed in to change notification settings - Fork 30
Use symlinks to vanilla when possible #65
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
Conversation
✅ Deploy Preview for confidential-tokens ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
| import { setCode } from "@nomicfoundation/hardhat-network-helpers"; | ||
| import { ethers } from "ethers"; | ||
| import { task } from "hardhat/config"; | ||
| import { impersonate } from '../test/helpers/accounts'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that could be imported from @openzeppelin/contracts/test/helpers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an added function for this repo.
openzeppelin-confidential-contracts/test/helpers/accounts.ts
Lines 15 to 22 in d442fb1
| export async function allowHandle(hre: HardhatRuntimeEnvironment, from: Signer, to: Addressable, handle: string) { | |
| const acl_abi = JSON.parse( | |
| fs.readFileSync('node_modules/fhevm-core-contracts/artifacts/contracts/ACL.sol/ACL.json', 'utf8'), | |
| ).abi; | |
| const aclContract = await hre.ethers.getContractAt(acl_abi, ACL_ADDRESS); | |
| await aclContract.connect(from).allow(handle, to); | |
| } |
| import { ACL_ADDRESS, GATEWAYCONTRACT_ADDRESS, KMSVERIFIER_ADDRESS, PRIVATE_KEY_KMS_SIGNER } from "./constants"; | ||
| import { awaitCoprocessor, getClearText } from "./coprocessorUtils"; | ||
| import { waitNBlocks } from "./utils"; | ||
| import { impersonate } from '../helpers/accounts'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
some comment: can import from @openzeppelin/contracts/test/helpers
Add vanilla as a submodule and use symlinks to files to avoid code duplication. Inherit styling and rules from vanilla.