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

via-ir causes abicoder v1 results mismatch #15562

Open
2xic opened this issue Nov 2, 2024 · 1 comment
Open

via-ir causes abicoder v1 results mismatch #15562

2xic opened this issue Nov 2, 2024 · 1 comment
Labels

Comments

@2xic
Copy link

2xic commented Nov 2, 2024

Description

I have a use case where I need to be able to handle both abicoder v1 and abicoder v2 inputs. Preferably I'm also able to have via-ir enabled, but that seems to cause issues.

Created a minimal reproducible and seems just enabling via-ir with abicoder is enough for it to fail. When running the attached code without via-ir it works, but once it's enabled the code reverts. See sections on how to reproduce.

standard_json_builds.zip

Environment

  • Compiler version: Version: 0.8.28+commit.7893614a.Darwin.appleclang
  • Target EVM version (as per compiler settings): default
  • Framework/IDE (e.g. Truffle or Remix): none
  • EVM execution environment / backend / blockchain client: mainnet
  • Operating system: osx

Steps to Reproduce

Source code used in steps below, standard_json_builds.zip.

First verify that it works without via-ir

  1. Compile the attached standard_json_no_via_ir.json.
6080604052348015600e575f5ffd5b50600436106026575f3560e01c8063c0f8940c14602a575b5f5ffd5b60408051808201825260208082525f199181019190915281516fffffffffffffffffffffffffffffffff81529151918290030190f3fea26469706673582212201116ca6874acbe2a3c87b31bf1d75b23ceede323e55407692d8d977c1c75861364736f6c634300081c0033
  1. Run it an call the code method (link to playground ) and you see 00000000000000000000000000000000ffffffffffffffffffffffffffffffff will be returned

  2. Now we compile it with via-ir (standard_json_with_via_ir.json)

60806004361015600d575f80fd5b5f3560e01c63c0f8940c14601f575f80fd5b346068575f3660031901126068576040810181811067ffffffffffffffff82111760545760405260208082525f199101525f80fd5b634e487b7160e01b5f52604160045260245ffd5b5f80fdfea2646970667358221220256379ce8332b74ed80d9770e158c2012529aa222388614085f1572b384b2e5f64736f6c634300081c0033
  1. Run it (playground) Then it reverts :'(
@2xic 2xic added the bug 🐛 label Nov 2, 2024
@2xic 2xic changed the title via-ir breaks abi encoding v1 via-ir breaks abicoder v1 Nov 2, 2024
@2xic
Copy link
Author

2xic commented Nov 2, 2024

I guess this might be related to #15142 ?

Though, I thought the cleaning of the bits was something that would happen when forcing the abiencoder v1.

@2xic 2xic changed the title via-ir breaks abicoder v1 via-ir causes abicoder v1 results mismatch Nov 2, 2024
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

1 participant