chore: pin OZ confidential to v0.4.0 and simplify test helpers#3
Merged
Conversation
Address review feedback:
- Pin @openzeppelin-confidential-contracts to tagged release v0.4.0
instead of commit hash 6edd293. Add explicit @openzeppelin/contracts(-upgradeable)/
remappings, since v0.4.0 ships a lib/ folder with alias stubs that
otherwise hijack forge's auto-remap fallback used by forge-fhevm.
- Replace hardcoded ALICE_PK constant with forge-std's makeAccount("alice")
helper, which returns an Account { addr, key } and labels the address.
- Add a userDecryptAs(pk, handle, contract) helper that combines
signUserDecrypt and userDecrypt into a single call site.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Addresses review feedback on the template:
@openzeppelin-confidential-contractstov0.4.0instead of commit hash6edd293. Adds explicit@openzeppelin/contracts(-upgradeable)/remappings since v0.4.0 ships alib/folder with alias stubs that otherwise hijack Forge's auto-remap fallback used insideforge-fhevm.ALICE_PKconstant with forge-std'smakeAccount("alice")helper. Returns anAccount { addr, key }and labels the address in traces.userDecryptAs(pk, handle, contract)helper that wrapssignUserDecrypt+userDecryptinto a single call, removing the redundant signature step at every test site.forge-fhevmis left on its commit pin since it has no released tag yet (also flagged in review).Test plan
forge clean && forge build— succeedsforge test— 3/3 passing