I have contract A and contract B with the following structures:
contract A {
int x;
function setX(){
x = _x;
}
}
contract B {
A[] contractInstances;
function createContractInstance() {
contractInstances.push(new A());
}
}
How can I access the method setX() of the created instance, when I am doing the testing with truffle? P.S. when I try to access them directly from the array, it is not working, cause the js platform sees the contract as string addresses.