feat(forge): Support library linking#586
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% |
mattsse
left a comment
There was a problem hiding this comment.
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>
gakonst
left a comment
There was a problem hiding this comment.
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:
createcommand supportruncommand supportethers-rs