Search code examples
ethereumsolidity

How to show the name of the called smart contract function in input data


I would like to see the name of the called function in the input data like on this page. I can only achieve this if I use a setter (see below) but I would like to use a custom function name.

function set(uint _myHash) public {       
    if (owner == msg.sender) {
        myHash = _myHash;
    }
}

Function: set(uint256 x) ***

MethodID: 0x60fe47b1
[0]:  e4c71652c9fa586fcd99c8b5de545f2dd0b17534bf79c36a47a193dc8aa13c68

If I change the name of the setter, my input data will only look like this:

0x30096f76c6aa3589e9be255a9cef8981d68902cfac7652a1dfbf7ff9dd0609a6a7ee86ed

Solution

  • Make sure you verify your code on Etherscan. If you've provided the source code, Etherscan will show it and automatically decode your transactions.