-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Support library linking #222
Copy link
Copy link
Closed
Labels
C-forgeCommand: forgeCommand: forgeCmd-forge-buildCommand: forge buildCommand: forge buildCmd-forge-testCommand: forge testCommand: forge testP-highPriority: highPriority: highT-bugType: bugType: bug
Description
If we want to support dss' spells-mainnet, we'll need to support lib linking.
Problem
- We call into_inner here: https://github.com/gakonst/foundry/blob/master/forge/src/multi_runner.rs#L61
- Then we call
into_bytes: and then https://github.com/gakonst/ethers-rs/blob/4c677933ce4407fb1307f9077aefc31b9e811cdb/ethers-solc/src/config.rs#L260 - But
into_bytesreturnsNonefor unlinked objects - So we'll need to somehow call
linkbefore doing the deployment step.
Suggested Solution
- We should provide a manual way for somebody to link to an already deployed library
- We should auto-detect if there's library dependencies, deploy all the libraries first, get their addresses, and then link them in all the bytecodes necessary.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-forgeCommand: forgeCommand: forgeCmd-forge-buildCommand: forge buildCommand: forge buildCmd-forge-testCommand: forge testCommand: forge testP-highPriority: highPriority: highT-bugType: bugType: bug