Hello,
I am getting problem in understanding the working of the latest version of Remix IDE. I want to retrieve the value of the variable (i.e. Val) but can't understand how to access the log. I am trying to run the following code:
pragma solidity ^0.5.1;
contract Test{
uint8 Val = 0;
event LogFunction(uint8);
function testFunc() public returns (uint8) {
Val++;
emit LogFunction(Val);
return Val;
}
}
I am getting following output when I click on deploy button:
When I click on the deploy button I am getting following output:
creation of Test pending... [vm] from: 0x5B3...eddC4to:
Test.(constructor)value: 0 weidata: 0x608...10032logs: 0hash:
0x711...faece
I have chosen Ether as the value but why I am getting wei data above?
When I click on the green tick sign, I am getting the following:
status true Transaction mined and execution succeed transaction
hash 0x711e1fd9cd945e3d218ff11c00db230105ccad6c7daa1690447b0fe3174faece
contract address 0x0fC5025C764cE34df352757e82f7B5c4Df39A836
from 0x5B38Da6a701c568545dCfcB03FcB875f56beddC4
to Test.(constructor) gas 3000000 gas transaction cost 131940 gas
execution cost 57372 gas
hash 0x711e1fd9cd945e3d218ff11c00db230105ccad6c7daa1690447b0fe3174faece
input 0x608...10032 decoded input {} decoded output - logs
value 0 wei
Please guide me how to check the logs? Why the value is '0', even though I am incrementing?
Zulfi.
Environment
Details
Code to reproduce