-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Input instead of output is shown for functions that uses gas #20
Comments
I think @ninabreznik know the status quo a bit better than me as she was investigating this already :-) |
That's the good comment @gpersoon! I am also not satisfied with the returns here. I was thinking to always show inputs and outputs, but not sure yet... or maybe just outputs and more details (like in remix). I just working on this, so hopefully I find some nice solution here. Do you have any preferences or suggestions? |
From a users point of view, having the result is very useful.
Regarding the inputs: they could be stored in a hoover text see you can still find them without cluttering the screen. |
Copied from: https://gitter.im/ethereum/play :
|
Ganache has debug_traceTransaction ( trufflesuite/ganache#125 ), so when Ganache is used in combination with the play editor, you can use it. |
The solution was implemented but will be released in the new version of the smartcontact-ui, coming out hopefully in 2 weeks or so. |
@gpersoon finally I made this PR. It was once already don, but I by mistake overrun the changes, so now we have it again. Currently on my test version, but please check it out once you have time and if it's ok, we can merge it |
@ninabreznik this is a lot better 👍 I've noticed a situation where it doesn't work and narrowed it down to: pragma solidity ^0.5.12;
contract Testreturn {
function getnow() public returns (uint) {
return now;
}
} Which shows the following error in the developer console: bundle.js:50510 Uncaught (in promise) TypeError: Cannot read property 'type' of undefined
at makeContractCallable (bundle.js:50510)
at sendTx (bundle.js:50472)
`` |
@ninabreznik : Fixes pushed to https://ninabreznik.github.io/editor-solidity/ Works a lot better now (previous error is solved). pragma solidity >=0.5.0 <0.7.0;
contract TestPayable {
function Test() public payable returns (bool) {
return false;
}
} This results in the following error: Error: call cannot override gasLimit
at bundle.js:24480
at Array.forEach (<anonymous>)
at bundle.js:24480
at async makeContractCallable (bundle.js:50519)
at async sendTx (bundle.js:50471) When i changed the type to uint: pragma solidity >=0.5.0 <0.7.0;
contract TestPayable {
function Test() public payable returns (uint) {
return 1;
}
} I saw an additional error: Error: call cannot override gasLimit
....
bundle.js:49671 Uncaught (in promise) TypeError: Cannot read property 'toString' of undefined
at decode (bundle.js:49671)
at decodeReturnData (bundle.js:49664)
at getReturnData (bundle.js:50058)
at makeReturn (bundle.js:50050)
at sendTx (bundle.js:50487)
decode @ bundle.js:49671
decodeReturnData @ bundle.js:49664
getReturnData @ bundle.js:50058
makeReturn @ bundle.js:50050
sendTx @ bundle.js:50487
async function (async)
sendTx @ bundle.js:50460
(anonymous) @ bundle.js:50437
bundle. |
Fixed |
@gpersoon You're the master of edge cases. Thanks for that. Checking it out now! |
The results of a function that uses gas aren't shown. Instead the input is shown.
For example if you input "6" in the function "double" you would expect the output to be 12.
However the value of "6" is shown, which is actually the input:
It's technically difficult the get the output, so maybe it's better not to shown anything.
The text was updated successfully, but these errors were encountered: