The Game
struct in the Rock Paper Scissors contract contains 16 storage variables, risking "Stack Too Deep" errors during compilation and inefficient gas usage. The EVM
has a 16-slot stack limit, and large structs such as this causes the contract compilation failure.
Compilation Failures: Solidity throws Stack too deep
errors when compiling the contract
Increased gas costs for players
Storage inefficiencies
Remix IDE: Confirmed compilation error
Split the Struct
The oversized Game struct poses compilation risks and gas inefficiencies. Splitting the struct is the most robust solution, while --via-ir offers a temporary workaround. Recommended actions:
Short-term: Enable via_ir for deployment.
Long-term: Refactor into smaller structs (Solution 1).
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.