1

I'm playing around with Solidity in Remix and I noticed the console will output transactions such as:

 from    - 
 to     browser/Untitled3.sol:HelloWorld.greeting() 0x5e72914535f202659083db3a02c984188fa26e9f
 transaction cost   23147 gas (Cost only applies when called by a contract)
 execution cost     1875 gas (Cost only applies when called by a contract)
 input  ef690cc0
 decoded input  {}
 decoded output     {
    "0": "string: Hey world, this is a smart contract!"
}
 logs   []

When a user calls a function on a contract, do they get this sort of data spit back at them? Specifically, the output field in the above log. Or is this just a part of the IDE for development purposes? Thanks

1

No, if you call a function marked as constant/view you'll get the return value/s of the function.

If you make a transaction you'll just get the transaction hash immediatelly and later you can retrieve the transaction info.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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