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

Forge cheatcodes to set confidential inputs #31

Merged
merged 2 commits into from
Jan 18, 2024

Conversation

ferranbt
Copy link
Collaborator

@ferranbt ferranbt commented Jan 17, 2024

This PR enables support to use the confidentialInputs precompile inside forge.

How does it work? The confidentialInputs precompile is special because it does not have any logic to perform (i.e. send http request), but it only returns some raw contextual information about the execution. Thus, it is not necessary to use the Connector.sol <> suave-geth integration introduced in #11.

Instead, this PR deploys a ConfidentialInputsWrapper contract on the confidentialInputs address with functions to modify the confidential inputs. Then, it uses the fallback method (like Connector.sol) to return the data in the format expected by the Suave.sol library.

@ferranbt ferranbt requested a review from metachris as a code owner January 17, 2024 09:19
@ferranbt ferranbt merged commit b8e5c4d into main Jan 18, 2024
2 checks passed
@ferranbt ferranbt deleted the feature/forge-mock-confidential-inputs branch March 2, 2024 15:31
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

Successfully merging this pull request may close these issues.

1 participant