0

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?

2
  • 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. Dec 14, 2022 at 16:55

1 Answer 1

0

The last internal method in chain, called by parent public view method returns given value to caller.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.