3

If I look in the past transactions of a smart contract that called a function, I can see the MethodID being used.

enter image description here

If the function was never used in the past, I would never know what was the method ID. Is there any way I could generate this?

1 Answer 1

7

The function selector or method id is the first 4 bytes of the hash of the method name and the parameters. This is documentend here https://solidity-by-example.org/function-selector/

More details are also available here What is a function selector? There are also database where you can look these up. For example https://www.4byte.directory/

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.