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

Compilation fails with solc 0.8.23 #735

Open
mmv08 opened this issue Jan 28, 2024 · 4 comments
Open

Compilation fails with solc 0.8.23 #735

mmv08 opened this issue Jan 28, 2024 · 4 comments

Comments

@mmv08
Copy link
Member

mmv08 commented Jan 28, 2024

Description

The project cannot be compiled with solc 0.8.23

Environment

  • Compiler version: 0.8.23
  • Compiler options (if applicable, e.g. optimizer enabled): default
  • Operating system: Ubuntu 22.04.3 LTS x86_64

Steps to reproduce

  1. Clone the repo
  2. Checkout to the commit 914d0f8fab0e8f73ef79581f6fbce86e34b049c3 (the latest one on the main branch at the moment of writing)
  3. npm i
  4. run cp .env.sample .env
  5. Set SOLIDITY_VERSION='0.8.23'
  6. run npm run build

Additional context

The command output:

➜  safe-smart-account git:(main) npm run build

> @safe-global/safe-smart-account@1.4.1-build.0 build
> hardhat compile

Solidity 0.8.23 is not fully supported yet. You can still use Hardhat, but some features, like stack traces, might not work correctly.

Learn more at https://hardhat.org/hardhat-runner/docs/reference/solidity-support

TypeError: Function needs to specify overridden contracts "IModuleManager" and "ModuleManager".
  --> contracts/SafeL2.sol:70:14:
   |
70 |     ) public override returns (bool success) {
   |              ^^^^^^^^
Note: This contract: 
  --> contracts/base/ModuleManager.sol:18:1:
   |
18 | abstract contract ModuleManager is SelfAuthorized, Executor, GuardManager, IModuleManager {
   | ^ (Relevant source part starts here and spans across multiple lines).
Note: This contract: 
  --> contracts/interfaces/IModuleManager.sol:14:1:
   |
14 | interface IModuleManager is IGuardManager {
   | ^ (Relevant source part starts here and spans across multiple lines).

@remedcu
Copy link
Member

remedcu commented Jan 28, 2024

Running with compiler version v0.8.11 works, and it starts to have this bug from v0.8.12.

In the release note of v0.8.12, it has this line:

Inheritance: Consider functions in all ancestors during override analysis.

Based on the documentation, it seems we need to pass the path:

In this sense, an override path for a signature is a path through the inheritance graph that starts at the contract under consideration and ends at a contract mentioning a function with that signature that does not override.

But that results in compiling issues with v0.7.x.

@nlordell
Copy link
Collaborator

nlordell commented Feb 2, 2024

Might be worth, once resolving, adding a CI job that compiles with the latest compiler and optimisations so that we don’t regress on this.

mmv08 added a commit that referenced this issue Feb 8, 2024
This PR:
- Fix the benchmark CI job to prebent regressions like
#735. It is
fixed by removing the OR operator because if a benchmark failed, it only
outputted a message but didn't return a non-zero exit code.
- Also bumps the `0.8.x` compiler version to the latest one (0.8.24)
@opensea712
Copy link

@mmv08 so any solution for this issue yet?

@mmv08
Copy link
Member Author

mmv08 commented Mar 21, 2024

@mmv08 so any solution for this issue yet?

not yet, we use compiler v0.7.6 and this issue is a low priority for us

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

No branches or pull requests

4 participants