MorpheusAI

MorpheusAI
Foundry
22,500 USDC
View results
Submission Details
Severity: medium
Invalid

Unsupported opcode PUSH0 in Solidity 0.8.20 for deployment on Arbitrum

Summary

Various contracts that need to be deployed on Arbitrum use Solidity version ^0.8.20. Solidity versions above 0.8.19 include the opcode PUSH0, which is not yet supported on Arbitrum. Therefore, it may not be possible to deploy those contracts to Arbitrum and even if some of the contracts may deploy, there is a high risk that they will not function properly. This concerns all the smart contracts of the project that need to be deployed to Arbitrum - not all links have been provided above (eg: interfaces...).

Vulnerability Details

Various contracts that need to be deployed on Arbitrum use Solidity version ^0.8.20. Solidity versions above 0.8.19 include the opcode PUSH0, which is not yet supported on Arbitrum. Therefore, it may not be possible to deploy those contracts to Arbitrum and even if some of the contracts may deploy, there is a high risk that they will not function properly.

Impact

As already mentioned, Solidity 0.8.20 uses the PUSH0 opcode, which is not supported on Arbitrum. this will cause the smart contracts to malfunction and it may not even be possible to deploy the contracts.

Tools Used

Manual Review

Recommendations

Use Solidity version 0.8.19. This will make the smart contract fully compatible with the Arbitrum network.

For example, in L2MessageReceiver.sol, use the following:

- pragma solidity ^0.8.20;
+ pragma solidity 0.8.19;
Updates

Lead Judging Commences

inallhonesty Lead Judge
over 1 year ago
inallhonesty Lead Judge over 1 year ago
Submission Judgement Published
Invalidated
Reason: Known issue

Support

FAQs

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