There are 2 smart contract
contract A {
function abc(string _a) public returns (address) {
return new B(_a);
}
}
contract B {
function xyz(string _a) {
A a = A(contact address); // interface
a.abc(_a);
}
}
How can i get the value of function abc() when i am making a call from function xyz() of contract B which DOES NOT have a return. Especially in Remix and also through web3.js please guide.
A.abc()
, you either have to return it, make xyz a return function, Or use it in xyz, for that declare an address variable and store the return of abc in that.