How to get the return value of a contract from a contract call?

by user2284570   Last Updated August 13, 2019 11:28 AM - source

If a contract does returns something, (whether a string or return true/return false) how to get it’s return value ?
I mean where does the return value is stored ? Is necessary to use RETURNDATACOPY or does the value is on the stack in the case of return true/return false ? If it’s on the stack, how to know if the contract exited because of a problem in execution (like revert or out of gas) or because execution was successful at returning false ?

Of course, I’m talking while knowing the site or the type of return value so that using RETURNDATASIZE isn’t required. I don’t want a Solidity or Vyper answer, but to know how things works at the bare low‐level.



Related Questions


What is a Zombie Account in Ethereum?

Updated September 15, 2017 07:28 AM

explanation of Recursive Length Prefix

Updated November 20, 2017 01:28 AM

What is the Identity function and what are its uses?

Updated January 06, 2019 15:28 PM


How would a miner cope with a huge block time?

Updated October 13, 2017 17:28 PM