Beginner FriendlyFoundryNFT
100 EXP
View results
Submission Details
Severity: low
Valid

Both the Solidity and the Huff implementation are not supported by Arbitrum

Summary

Both the Huff and the Solidity implementation are not supported by Arbitrum

Vulnerability Details

Arbitrum does not support the PUSH0 opcode :
https://docs.arbitrum.io/for-devs/concepts/differences-between-arbitrum-ethereum/solidity-support#differences-from-solidity-on-ethereum

It is using shanghai EVM version in foundry.toml :

evm_version = 'shanghai'

The Solidity implementation is using 0.8.20 version

pragma solidity 0.8.20;

Solidity compiled in 0.8.20 with shanghai EVM version and Huff implementation compiled with huffc with EVM version of shanghai will contain PUSH0 opcode that is not yet supported by Arbitrum

Impact

The compiled bytecode contains PUSH0 opcode that is not yet supported by Arbitrum causing it to revert

Tools Used

Manual review

Recommendations

Compile the Huff contract with EVM version lower than shanghai and change Solidity version to <= 0.8.19 if the Solidity implementation is going to be deployed in Arbitrum

Updates

Lead Judging Commences

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

PUSH0 not available on Arb

Support

FAQs

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