Closed pipermerriam closed 7 years ago
contract with library dependency and deployed instance
Can you make a usage example of a non-lib instance dependency, e.g. weth? I see two basic ways this can be handled and want to understand what the ethpm devs imagine themselves doing. One is do the linking the constructor args level which means the deploy tool handles it, which I think is out of scope of the spec so far. The other is to wrap things like weth into libraries with a hard-coded address so that they can be shipped (equivalent to libs once address templating is more general).
@nmushegian This spec doesn't differentiate between a library and a contract.
For the case you are talking about all of the required information is available to you in the Release Lockfiles and it will be up to the package manager to pull it out and use it.
It isn't exactly possible to create an example of this pattern because it's dependent on tooling. Once solidity implements arbitrary linking it'll be as simple as including the address in the link_dependencies
section.
Work in progress.