-
Notifications
You must be signed in to change notification settings - Fork 2k
feat(forge): Support library linking #586
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
Conversation
woot |
dropping trying to support |
how does dapptools do it? ig u deploy lib manually and then pass it as an opt? |
ye - we already support dapptools style compile-time linking. also the official solidity docs recommend not manually linking and letting the compiler do it. For contracts going on mainnet, I tend to agree. |
any chance we can dedupe the linking part by extracting it as a function? |
ye we probably can - there are some differences between the two but probably can be combined 90% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
halfway through
highlighted the things that stood out.
need another stab at it to fully understand what's going on
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Matthias Seitz <matthias.seitz@outlook.de>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving cautiously, given integration tests seem to pass I feel OK about it.
2 things as follow-ups:
- Is there any large real repo with libs and linking which we could use as an integration test?
- Should we upstream these into ethers-solc?
Feels like we should do a full review of ethers-solc / or a writeup because the pipeline has gotten quite complex at this point
Co-authored-by: Georgios Konstantopoulos <me@gakonst.com>
we should def do a writeup/review, lmk how you want to proceed on that front |
Closes #612 but we should open another issue for decoding collided function signatures |
Adds support for library linking at deploy time. Works by determining dependencies, calculating address in correct order, linking the dependency addresses recursively on the way up to a target contract, and deploying dependencies before deploying a test contract.
Todo:
create
command supportrun
command supportethers-rs