-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
ISemver policy #13508
Labels
T-evm-safety
Team: EVM Safety
Comments
If there was only one actionable thing to come out of this, it would be adding a semgrep check to ensure onchain contracts conform to some standard. |
|
Abuchtela
added a commit
to Abuchtela/optimism
that referenced
this issue
Jan 2, 2025
Fixes ethereum-optimism#13508 Add `ISemver` implementation to `RISCV.sol` and semgrep rule for `ISemver` compliance. * **RISCV.sol** - Add `ISemver` to the list of inherited contracts. - Add the `version()` function from `ISemver`. - Set the `version` constant to "1.2.0-rc.1". * **.semgrep/rules/sol-rules.yaml** - Add a semgrep rule to ensure all on-chain contracts implement `ISemver`. --- For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/ethereum-optimism/optimism/issues/13508?shareId=XXXX-XXXX-XXXX-XXXX).
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This issue stems from a discussion with @maurelian about whether RISC-V.sol should implement the
ISemver
interface and the need to clarify and potentially standardize our policy on the use ofISemver
across contracts.The file RISC-V.sol is currently vendored and does not inherit from
ISemver
. This might be due to its origin as a copy-paste from another repository whereISemver
does not exist. While its inclusion could improve consistency, this raises questions about our general approach to vendor contracts andISemver
.In our discussion, we also noted that
ISemver
is primarily used to enforce implementation of versioning. However, this practice might be inconsistent with other parts of the codebase.Questions that raised:
ISemver
?ISemver
interface only through checks rather than inheritance, especially for vendor contracts?The text was updated successfully, but these errors were encountered: