I've got two contracts, A and B, I set them up in a truffle test separately.
A.new()...
B.new()...
A has a function bar, which sets a public boolean boo to true that is never read anywhere. B has a function, foo, that calls bar on a previously instantiated A.
contract A(){
bool public boo = false;
function bar() public {
boo = true;
}
}
contract B(){
A public myA;
function setA(address addr){
myA = A(addr);
}
function foo() public {
myA.bar();
}
}
Now in my truffle test, I call bar two ways, directly, and thru b.foo().
a.bar();
b.setA(a.address);
b.foo();
The first call to bar works fine. The second call thru foo throws out of gas no matter how much gas I give it. What am I doing wrong?