Solidity – Understanding Log Event Meta Data

eventsremixsolidity

The log file created using event is shown below. Is it possible to show the variable names of the fields that the values are being displayed.

Log File

Best Answer

Just change the event to place the name first:

contract Test {

    uint public number;

    event Print(string _name, uint _value);

    function setnum(uint _num) public{
      number = _num;
      Print("number",number);
    }


}
Related Topic