New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
0.8.20 produces contract that works on Ethereum but not Arbitrum (PUSH0) #14254
Comments
I did just find a reference: https://developer.arbitrum.io/solidity-support |
I had this issue today as well. I see this project follows Semantic Versioning. To me updating the
Is this the reason why 0.8.20 breaks the compatibility with 0.8.19? This would help me assess and understand how and when I should update to a new patch version of Solidity. |
To be fair, this is the solidity repo for github username But yeah. Was a gotcha. |
When compiled using 0.8.19, this works fine.
When compiled using 0.8.20, the contract deploys but is non-functional.
See: https://arbiscan.io/address/0x504ada2360ac822faf7ac703b350fadc8d931211#code
In File 16, you'll see for example:
bool public constant isRECustodian = true;
, but if you click theRead Contract
tab you'll see that it returnsfalse
(or rather, it returns nothing at all and Arbiscan just showsfalse
). This is similarly true with all the other valuesWhen reading
amountRecovered
using a dummy parameter like0x1234567812345678123456781234567812345678
, we see this:Error: Returned error: invalid opcode: PUSH0
I note that using
push0
was a new feature in 0.8.20Perhaps it's "not a bug, it's Arbitrum's problem for not supporting push0". But it would be helpful to know how to disable
push0
generation, if that's the case. And it's probably worth some documentation. It's a confusing trap to fall into.The text was updated successfully, but these errors were encountered: