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

Add support for compilation via Yul IR #943

Merged
merged 1 commit into from
Jun 21, 2022
Merged

Conversation

CodeSandwich
Copy link
Contributor

Description

Adds support for compilation via Yul IR. Solidity doesn't consider it experimental since 0.8.13.

Checklist

  • tested locally (TBH I have no idea how to do that 😬)
  • added automated tests
  • updated the docs
  • updated the changelog

Copy link
Contributor

@d-xo d-xo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

To test locally I think you should be able to run dapp mk-standard-json adnd check the contents of the resulting file.

src/dapp/README.md Show resolved Hide resolved
@CodeSandwich
Copy link
Contributor Author

To test locally I think you should be able to run dapp mk-standard-json adnd check the contents of the resulting file.

The biggest problem is compilation and setting up the environment, I have no idea how to do that. I have no experience with Haskell, Nix or the pipeline they create and there are no instructions in README for script kiddies.

@d-xo
Copy link
Contributor

d-xo commented Jun 20, 2022

You can do nix-build -A dapp from the root to build a version of dapp from your local checkout. The resulting executable will be placed under ./result/bin/dapp.

@CodeSandwich
Copy link
Contributor Author

I've tried it out and it works! dapp build --via-ir triggers compilation via Yul and so does export DAPP_VIA_IR=1. dapp mk-standard-json with DAPP_VIA_IR=1 does produce a JSON with an extra "viaIR": true,, which makes sense.

The actual compilation and trial showed me a few places where I haven't adjusted code for support of --via-ir, I've fixed it and force-pushed to prevent leaving junk in the commit history, it's a tiny PR anyway.

@d-xo d-xo merged commit e84ae75 into dapphub:master Jun 21, 2022
@d-xo
Copy link
Contributor

d-xo commented Jun 21, 2022

Thanks!!

@CodeSandwich CodeSandwich deleted the via-ir branch June 21, 2022 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants