Suppose I have a transaction hash and it belongs to some transaction which was done on a smart contract. From the hash, how do I determine what was the contract method which was called and with what parameters?
1 Answer
One easy way is to use an explorer. For example see this and click on "Invocation data" and you see that function "breakCookie" was called with the name "Roman". This requires that the author of the contract uploaded their source code, so that names can be determined from the compiled bytecode.
Another way is to look at the input
field of the transaction and parse it according to the ABI. You will not have the name of the method, but will see the values of the parameters.
-
How one parse input field according to ABI? What tools there are available for this? Jul 15, 2016 at 20:21
-
ethereum.stackexchange.com/questions/4196/… but generally asking for tools is better done on another site: meta.stackoverflow.com/questions/251134/…– eth ♦Jul 15, 2016 at 21:30