In the following the example of interaction between two contracts based on the example: Basic example of interaction between 2 contracts?
contract C1 {
function f1() returns(uint) {
return(10);
}
}
contract C2 {
function f2(address addrC1) returns(uint) {
C1 c1 = C1(addrC1);
return c1.f1();
}
}
Although I have been able to successfully do this form of interaction on the online compiler and at the console prompt, I don't see a way to do the same using the Mist wallet. I tried deploying C1 first and was able to get the contract address and ABI. Now, when i tried to deploy just the contract C2, I get an error during compilation saying:
source not found, file not compiled initially
Even after adding the instruction:
import "C1"
I get the error:
source not found, file not compiled initially.
Any suggestions as to how this can be done on Mist? I tried importing the contract as well, but that is similar to adding an existing contract to interact with, and have not been able to make progress after.
- if i replace C1 with X1 in second step (deploying C2 while having X1 in place of C1, and executing f2, still returns 10 in the event tracker. How does C2 determine which instance to call - C1 or X1?
– skarred14 Oct 25 '16 at 03:38