I'm writing test for my smart contracts with truffle test
. I got these strings of code:
Library.new()
.then((lib) => {
console.log(lib.address); //0xd6f066a5b07562b6c8fdb6a59b7ba42036d5516c
console.log(Library.isDeployed()); //false
Deployer.link(Library); // Error: Cannot link contract without an address.
...
As you can see instance of library has an address but contract Library
didn't handle it and still has false
value in isDeployed()
field. This weird behavior causes error on the next step when I'm trying to link my library to another contract.
Any advices?