Smart Contract internal method (last in chain of public view method) is able to return value at the end for parent method (public view) caller e.g. Angular?
-
Can you share a code example of the call? For view methods you should be able to get the return value, for transaction it is recommended to generate events when you want to obtain a value.– Ismael ♦Dec 13, 2022 at 19:13
-
e.g. function doStep(bytes32 _address) public view { doFirstStep(_address); } function doFirstStep(bytes32 _address) internal { doSecondStep(_address); } function doSecondStep(bytes32 _address) internal returns (bytes32) { return(_address) } First method "doStep"is called by Angular and response comes from internal "doSecondStep". It is possible? I havent tested it yet.– Uland NimblehoofDec 14, 2022 at 16:55
1 Answer
The last internal
method in chain, called by parent public view
method returns given value to caller.