ref-fvm
ref-fvm copied to clipboard
Output of non pure/non view functions - potential bug reported in FVM bulletproofing run
We tested the following contract in Remix: contract OutputTest { function test() public returns (uint) { return 1; } function testView() public view returns (uint) { return 1; } function testPure() public pure returns (uint) { return 1; }}
We found that when calling the "test" function on Hyperspace, the "decoded output" field is empty, while on EVM, it is not.
However, when calling "testView" and "testPure" functions, the "decoded output" field is populated both on EVM and Hyperspace.
Screenshots

@maciejwitowski for visibility.
We'll need to dig into this a bit more, but I'm guessing this is because the remix VM has a non-standard feature for returning contract output in a receipt.
The "decoded output" field is empty when calling the "test" function on Hyperspace because the "test" function is a non-view function. Non-view functions do not return any data, so the "decoded output" field is not populated.
The "decoded output" field is populated when calling the "testView" and "testPure" functions on both Hyperspace and EVM because the "testView" and "testPure" functions are view functions. View functions return data, but they do not modify the state of the blockchain, so the "decoded output" field is populated.
@Abudie12, thanks for sharing.
@Stebalien @maciejwitowski - let me know if this helps and should move the issue to a different status?