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

renegade_contracts: darkpool: align parameterize_circuit & add_circuit functions #83

Merged
merged 1 commit into from
Sep 1, 2023

Conversation

akirillo
Copy link
Contributor

@akirillo akirillo commented Sep 1, 2023

This PR exposes the same function selectors (parameterize_circuit, add_circuit) on the darkpool as on the verifier.

The former is for consistency, the latter is to ensure that we can actually add circuits to the darkpool contract. However, since the function on the darkpool accepts a Circuit enum as a parameter instead a circuit_id felt, it means that in practice, adding a circuit to the darkpool would first entail upgrading the darkpool (after having added the new circuit as a variant to the enum), and then calling add_circuit. I think this is fine though, for the sake of readability and type safety around circuit variants.

Cairo & e2e tests pass.

@akirillo akirillo added the enhancement New feature or request label Sep 1, 2023
@akirillo akirillo self-assigned this Sep 1, 2023
@akirillo akirillo merged commit 207498b into main Sep 1, 2023
1 check passed
@akirillo akirillo deleted the andrew/align-darkpool-interface-with-multiverifier branch September 1, 2023 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants