Pieces Protocol

First Flight #32
Beginner FriendlyFoundrySolidityNFT
100 EXP
View results
Submission Details
Severity: low
Invalid

PUSH0 Opcode Compatibility

Description

The Solidity version used may generate bytecode with PUSH0 opcode (EIP-3855), which isn't supported by all chains.

Impact

  • Potential deployment failures on L2s

  • Limited cross-chain compatibility

Proof of Concept

contract Push0CompatibilityTest is Test {
function testPush0Deployment() public {
// Set EVM version to Shanghai (includes PUSH0)
vm.chainId(1);
TokenDivider mainnetContract = new TokenDivider();
// Try to deploy on an L2 that doesn't support PUSH0
vm.chainId(10); // Optimism
// This would fail in production on L2s without PUSH0 support
new TokenDivider();
}
}

Note: While our test environment cannot fully simulate opcode restrictions, this remains a real issue for L2 deployments.

Recommendation

Specify EVM version in compiler settings:

{
"evm_version": "paris"
}
Updates

Lead Judging Commences

fishy Lead Judge 6 months ago
Submission Judgement Published
Invalidated
Reason: Out of scope

Support

FAQs

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