Skip to content

Support library linking  #222

@gakonst

Description

@gakonst

If we want to support dss' spells-mainnet, we'll need to support lib linking.

Problem

  1. We call into_inner here: https://github.com/gakonst/foundry/blob/master/forge/src/multi_runner.rs#L61
  2. Then we call into_bytes: and then https://github.com/gakonst/ethers-rs/blob/4c677933ce4407fb1307f9077aefc31b9e811cdb/ethers-solc/src/config.rs#L260
  3. But into_bytes returns None for unlinked objects
  4. So we'll need to somehow call link before doing the deployment step.

Suggested Solution

  1. We should provide a manual way for somebody to link to an already deployed library
  2. 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions