[SOLVED] Get MethodID for a transaction

Hello,
I was wondering if there’s a way to get the MethodID as shown in the attached pic given the transaction hash? I’m assuming that may be derived from the Input Data but I’m not certain on how to get to the MethodID itself. Thanks for all the hardwork!

Web3.utils.sha3('swapExactETHForTokens(uint256,address[],address,uint256)')
=>
‘0x7ff36ab5759d6a6f3666c17e7dae0b66684a53581fd3cada68e6fd19d01f9b11’
and the MothodID is the beginning of that hash: 0x7ff36ab5

1 Like

Excellent! that’ll do it. Thanks!