Skip to content

Enabled Hardhat viaIR compilation with solc v0.8.30 #2069

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

Merged
merged 1 commit into from
Aug 7, 2025

Conversation

jaybuidl
Copy link
Member

@jaybuidl jaybuidl commented Aug 7, 2025

And hardhat bumped to v2.26.2.


PR-Codex overview

This PR updates the version of hardhat in the package.json and yarn.lock files, modifies the version of the Solidity compiler in hardhat.config.ts, and updates a dependency version in yarn.lock. It also enables the viaIR setting for the compiler.

Detailed summary

  • Updated hardhat from 2.25.0 to 2.26.2 in package.json and yarn.lock.
  • Changed Solidity compiler version from 0.8.28 to 0.8.30 in hardhat.config.ts.
  • Enabled viaIR setting in hardhat.config.ts.
  • Updated @nomicfoundation/edr version from ^0.11.1 to ^0.11.3 in yarn.lock.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Summary by CodeRabbit

  • Chores
    • Updated Solidity compiler version for contract builds.
    • Enabled advanced compiler optimization settings.
    • Upgraded Hardhat development tool to the latest version.

@jaybuidl jaybuidl requested a review from a team as a code owner August 7, 2025 12:23
Copy link

netlify bot commented Aug 7, 2025

Deploy Preview for kleros-v2-testnet ready!

Name Link
🔨 Latest commit 77c8549
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet/deploys/68949ab540a8ad0008e6355b
😎 Deploy Preview https://deploy-preview-2069--kleros-v2-testnet.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Aug 7, 2025

Deploy Preview for kleros-v2-neo ready!

Name Link
🔨 Latest commit 77c8549
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-neo/deploys/68949ab5526b230009d331d3
😎 Deploy Preview https://deploy-preview-2069--kleros-v2-neo.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link

netlify bot commented Aug 7, 2025

Deploy Preview for kleros-v2-university failed. Why did it fail? →

Name Link
🔨 Latest commit 77c8549
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-university/deploys/68949ab5b0ba7600089d029d

Copy link

sonarqubecloud bot commented Aug 7, 2025

Copy link
Contributor

coderabbitai bot commented Aug 7, 2025

Walkthrough

The Solidity compiler version in the Hardhat configuration was updated from 0.8.28 to 0.8.30, and the viaIR setting was enabled for both compiler configurations. Additionally, the Hardhat package version in the project's package.json was upgraded from 2.25.0 to 2.26.2. No other changes were made.

Changes

Cohort / File(s) Change Summary
Solidity Compiler Configuration
contracts/hardhat.config.ts
Updated Solidity compiler version from 0.8.28 to 0.8.30; enabled viaIR for both compiler configs.
Dev Dependency Update
contracts/package.json
Upgraded Hardhat devDependency from version 2.25.0 to 2.26.2.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A hop and a skip, the compilers advance,
With Hardhat now sharper, our contracts can dance.
The IR is enabled, the code flows anew,
Version bumps sparkle with digital dew.
In the warren of code, all is set right—
Onward we burrow, efficiency in sight! 🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e3ed3c9 and 77c8549.

⛔ Files ignored due to path filters (1)
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (2)
  • contracts/hardhat.config.ts (2 hunks)
  • contracts/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: Harman-singh-waraich
PR: kleros/kleros-v2#1846
File: prettier-config/index.js:26-26
Timestamp: 2025-01-23T08:14:47.397Z
Learning: The prettier-plugin-solidity plugin is installed in the kleros-v2 repository, even though it's not visible in the sandbox environment's node_modules (which is expected as node_modules is not committed to the repository).
📚 Learning: the prettier-plugin-solidity plugin is installed in the kleros-v2 repository, even though it's not v...
Learnt from: Harman-singh-waraich
PR: kleros/kleros-v2#1846
File: prettier-config/index.js:26-26
Timestamp: 2025-01-23T08:14:47.397Z
Learning: The prettier-plugin-solidity plugin is installed in the kleros-v2 repository, even though it's not visible in the sandbox environment's node_modules (which is expected as node_modules is not committed to the repository).

Applied to files:

  • contracts/package.json
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (7)
  • GitHub Check: Redirect rules - kleros-v2-testnet-devtools
  • GitHub Check: Header rules - kleros-v2-testnet-devtools
  • GitHub Check: Pages changed - kleros-v2-testnet-devtools
  • GitHub Check: Redirect rules - kleros-v2-testnet
  • GitHub Check: Header rules - kleros-v2-testnet
  • GitHub Check: Pages changed - kleros-v2-testnet
  • GitHub Check: contracts-testing
🔇 Additional comments (3)
contracts/package.json (1)

134-134: Hardhat 2.26 series introduces peer-dependency bumps – double-check plugin compatibility & minimum Node version

Hardhat 2.26.x internally pulls @nomicfoundation/hardhat-toolbox@^3 and upgrades ethers peer-dependency expectations. Some auxiliary plugins (e.g. hardhat-tracer, hardhat-watcher) occasionally lag behind new Hardhat majors/minors. Please run a full yarn hardhat compile && yarn test locally or on CI with --show-stack-traces enabled to catch latent incompatibilities before merge.

Also confirm the project’s runtime environment uses Node ≥18—the engines.node field still allows 16, which is nearing EOL and will stop receiving Hardhat support soon.

contracts/hardhat.config.ts (2)

29-32: Enabling viaIR may alter byte-code gas profiles & storage layout – re-run size and storage-diff checks

viaIR: true forces the new Yul-IR pipeline. Contracts sometimes grow a few KB (or shrink) and optimiser corner-cases differ from legacy. Please:

  1. Execute yarn size to ensure no contract now exceeds the 24 KB limit.
  2. Re-run hardhat compare-storage (already scripted) to verify no unexpected storage layout drift.
  3. Keep an eye on known Solidity 0.8.30 + viaIR issues (see Solidity release notes).

47-48: Consistent compiler settings between 0.8.30 and 0.8.24

Both compilers now use viaIR. Good for uniformity. Just confirm all 0.8.24 contracts (Vea) were audited with IR pipeline—there are subtle semantic differences, especially around inline assembly.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/solc-0.8.30-viaIR

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai or @coderabbitai title anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

netlify bot commented Aug 7, 2025

Deploy Preview for kleros-v2-testnet-devtools ready!

Name Link
🔨 Latest commit 77c8549
🔍 Latest deploy log https://app.netlify.com/projects/kleros-v2-testnet-devtools/deploys/68949ab52911ba0008b4567d
😎 Deploy Preview https://deploy-preview-2069--kleros-v2-testnet-devtools.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@jaybuidl jaybuidl merged commit 0cdc07d into dev Aug 7, 2025
20 of 25 checks passed
@jaybuidl jaybuidl deleted the chore/solc-0.8.30-viaIR branch August 7, 2025 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Solidity version bump to 0.8.30 Contracts: enable IR compilation pipeline with Hardhat
1 participant