For example, the withdraw method on WithdrawDAO has methodID 0x3ccfd60b. Given the methodID, could it be decoded to know what method it calls ?
3 Answers
You can use the manually-maintained directory at https://www.4byte.directory to search for the method given the signature.
Here is the lookup for your example 0x3ccfd60b.
There are further plans for the use of this directory like moving the lookup table into a smart contract - see https://github.com/ethereum/mist/issues/955.
- 40,274
- 14
- 123
- 193
I don't think so.
As I understand it, Solidity takes the first few bytes of the sha3 hash of the contract's signature to identify methods. It can't be done in reverse unless you already had the source code.
- 7,290
- 1
- 24
- 35
Better late than never, you can't decode it, it's a one-hand operation because it's just the 8 initial characters of a 64 characters hex address, but you could map it by itself to avoid calling another request.
I did it and it works... and with the parameters, I could decode the input data.
- 11
- 4