I’m trying to deploy a contract that uses several libraries for testing with openzeppelin/test-environment. I’m giving this a shot as Truffle testing has gotten very slow.
The problem is that when I run my deploy utility, library function won’t link. Running the same utility on truffle works just fine.
I’m using truffle and openzeppelin/test-environment.
Compile, getArtifacts as follows:
const MyContract = contract.fromArtifact(‘MyContract’)
Create an array of my artifacts and pass them to a deploying/linking utility, The deploy utility
This link fails with error:
Error: Contract has no network id set, cannot lookup artifact data. Either set the network manually using Contract.setNetwork(), run Contract.detectNetwork(), or use new(), at() or deployed() as a thenable which will detect the network automatically.
when the contract with the dependency reaches is to be deployed, errors with:
You must deploy and link the following libraries before you can deploy a new version of Contract: (list of libraries)
Any guidance would be much appreceated
Code to reproduce