0

For some reason, our app will only work with a forked instance of the mainnet. And hence, we want to run our test on the forked ganache. We are using truffle, so we have written all of our tests in the mocha format in test directory, we want to run these tests with the usual truffle test --network --fork command.

But, one of our contract is using a library which requires linking. Now, during migrations we have done this simply using:

await deployer.deploy(ScaledMath);
await deployer.link(ScaledMath, Comptroller);
await deployer.deploy(Comptroller);

But in tests we want to do the same thing, but we don't have the deployer object there. Can someone tell how to create one?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.