Implement ZamaEthereumConfigInitializable contract #1374
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.
This PR introduces ZamaEthereumConfigInitializable, an abstract contract designed to support EIP-1167 Minimal Proxy Clones (and other proxy patterns) when using the fhevm library.
It allows developers to initialize the FHEVM coprocessor configuration within an initialize() function, solving the issue where configuration is lost because constructors do not execute in the context of a proxy.
Todo:
Constructor ideally should have bool
isTestingvariable to ensure both local tests & prod follows best practices:This is in a way breaking API change as current constructor takes no arguments. I just leave it open for maintainers to edit PR and figure out approach.