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

WEB3-208: Add IRiscZeroSelectable interface #313

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

capossele
Copy link
Contributor

@capossele capossele commented Oct 29, 2024

Thi PR introduces a new interface called IRiscZeroSelectable that leverages the already existing SELECTOR constant of the RiscZeroGroth16Verifier (and more in general of any base implementation) to abstract from the base implementation when requiring the value of its selector (e.g., during deployment).

It also adds a Makefile to quickly deploy a local devnet and fixes some printing to create a proper TOML block e.g.,

  [[chains.anvil.verifiers]]
  version = "1.2.0-alpha.1"
  selector = "0x50bd1769"
  verifier = "0x9fe46736679d2d9a65f0992f2272de9f3c7fa6e0"
  estop = "0xcf7ed3acca5a467e9e704c703e8d87f634fb0fc9"

@github-actions github-actions bot changed the title Add IRiscZeroSelectable interface WEB3-208: Add IRiscZeroSelectable interface Oct 29, 2024
@capossele capossele marked this pull request as ready for review October 29, 2024 14:23
@capossele capossele requested a review from a team as a code owner October 29, 2024 14:23
Comment on lines 141 to 143
require(verifier.SELECTOR() == hex"50bd1769");
IRiscZeroSelectable selectable = IRiscZeroSelectable(verifier);
require(selectable.SELECTOR() == hex"50bd1769");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this change should be required, right? Because the SELECTOR function exists on RiscZeroGroth16Verifier

contracts/src/IRiscZeroSelectable.sol Outdated Show resolved Hide resolved
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.

2 participants