Beginner FriendlyFoundry
100 EXP
View results
Submission Details
Severity: medium
Valid

Using solc 0.8.23 and default EVM version, deployment on Arbitrum will fail

Summary

Solc 0.8.23 on Arbitrum won’t be able to deploy, as Arbitrum doesn’t support the PUSH0 opcode, as seen here: https://docs.arbitrum.io/for-devs/concepts/differences-between-arbitrum-ethereum/solidity-support.

Impact

The contract cannot be deployed on Arbitrum (or other chains that doen't support PUSH0).

Recommendations

The compiler version should be changed to 0.8.19 or the foundry.toml file should use the paris EVM version.
Suggestion would be to use the latter solution, so the contract benefits from the integrated "unchecked loop increment" gas savings feature that was introduced in solc 0.8.22 (https://github.com/ethereum/solidity/releases/tag/v0.8.22).

Updates

Lead Judging Commences

0xnevi Lead Judge over 1 year ago
Submission Judgement Published
Validated
Assigned finding tags:

PUSH0 not supported for solidity solidity ^0.8.20

Support

FAQs

Can't find an answer? Chat with us on Discord, Twitter or Linkedin.