Skip to content

Conversation

@ilitteri
Copy link
Contributor

Motivation

We want to optionally generate the ABI in JSON format when compiling Solidity code.

@ilitteri ilitteri self-assigned this Nov 17, 2025
Copilot AI review requested due to automatic review settings November 17, 2025 00:51
@ilitteri ilitteri requested a review from a team as a code owner November 17, 2025 00:51
@ilitteri ilitteri added the L2 Rollup client label Nov 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds an abi_json boolean parameter to the compile_contract function that enables optional ABI JSON generation during Solidity compilation by passing the --abi flag to the solc compiler.

  • Added abi_json parameter to compile_contract function
  • Updated all call sites to pass false for backward compatibility
  • The flag conditionally adds --abi to the solc command when enabled

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
crates/l2/sdk/contract_utils/src/compile.rs Added abi_json parameter to compile_contract function and conditional --abi flag logic
crates/l2/tests/tests.rs Updated test calls to compile_contract with new abi_json parameter set to false
crates/l2/sdk/build.rs Updated build script call to compile_contract with new abi_json parameter set to false
cmd/ethrex/build_l2.rs Updated all compilation calls with new abi_json parameter set to false

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

Lines of code report

Total lines added: 14
Total lines removed: 0
Total lines changed: 14

Detailed view
+----------------------------------------------------+-------+------+
| File                                               | Lines | Diff |
+----------------------------------------------------+-------+------+
| ethrex/cmd/ethrex/build_l2.rs                      | 421   | +9   |
+----------------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/build.rs                      | 48    | +1   |
+----------------------------------------------------+-------+------+
| ethrex/crates/l2/sdk/contract_utils/src/compile.rs | 95    | +4   |
+----------------------------------------------------+-------+------+

@tomip01 tomip01 added this pull request to the merge queue Nov 17, 2025
Merged via the queue into main with commit da11206 Nov 17, 2025
58 of 60 checks passed
@tomip01 tomip01 deleted the add_abi_option branch November 17, 2025 20:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

L2 Rollup client

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants