renegade_contracts: verifier, darkpool: make verifier contract Ownable
#80
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 adds access control to the verifier, guarding the mutating functions (
queue_verification_job
andstep_verifier
) with an assertion that they are being called by the contract owner, which must be the darkpool.Additionally, this PR changes the deployment pattern of the verifier contracts to be handled by the darkpool contract itself in its initialization. This makes our deployment logic simpler, and ensures that the verifier owner is the darkpool.
Cairo-native access control tests have been added for the verifier, which pass, as do all tests that had to be adapted to fit the new deployment pattern.
Relevant changes to the
starknet_scripts
crate are incomplete, a proper refactor of this crate is left for a future PR pending the completion of the verifier into the darkpool.