I'm using a contract to manage my contracts, and am not sure how to write a test.
The problem I'm facing is that I can't see how to get my coolerDb
contract address.
This is my test.js
contract('CMC', function(accounts) {
"use strict";
it("check deployment", function(done) {
let cmc = CMC.deployed();
let coolerDb = CoolerDb.deployed();
cmc.addContract("coolerDb", coolerDb).then(function(rc) {
assert.equal(rc.c[0], true, 'Assert fail: not added');
}).then(done).catch(done);
});
});
The error is:
Error: Contract address not set - deployed() relies on the contract class having a static 'address' value; please set that before using deployed().