Skip to content
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

Closed
ghost opened this issue May 20, 2023 · 3 comments
Closed

0.8.20 produces contract that works on Ethereum but not Arbitrum (PUSH0) #14254

ghost opened this issue May 20, 2023 · 3 comments
Labels

Comments

@ghost
Copy link

ghost commented May 20, 2023

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 the Read Contract tab you'll see that it returns false (or rather, it returns nothing at all and Arbiscan just shows false). This is similarly true with all the other values

When reading amountRecovered using a dummy parameter like 0x1234567812345678123456781234567812345678, we see this: Error: Returned error: invalid opcode: PUSH0

I note that using push0 was a new feature in 0.8.20

Perhaps 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.

@ghost ghost added the bug 🐛 label May 20, 2023
@ghost
Copy link
Author

ghost commented May 20, 2023

I did just find a reference: https://developer.arbitrum.io/solidity-support

@ghost ghost closed this as completed May 20, 2023
@vrde
Copy link

vrde commented May 24, 2023

I had this issue today as well. I see this project follows Semantic Versioning. To me updating the patch number should not introduce breaking changes. On the other side semver says:

Major version zero (0.y.z) is for initial development. Anything MAY change at any time. The public API SHOULD NOT be considered stable.

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.

@joshlang
Copy link

To be fair, this is the solidity repo for github username ethereum, not everychain hehe

But yeah. Was a gotcha.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants