Replies: 1 comment 1 reply
-
Once you get the const iface = new ethers.utils.Interface(abi);
const decodedArgs = iface.decodeFunctionData(tx.input.slice(0,10), tx.input)
const functionName = iface.getFunction(tx.input.slice(0,10)).name |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I'm fetching transaction data using Etherscan API. This is the example result I'm getting:
Now I need to figure out the contract method, e.g. TransferOwnership, stakeTokens and input parameters it is taking for this transaction. I'm looking at https://docs.ethers.io/v5/api/utils/abi/interface/#Interface--decoding but couldn't find anything related to this. @ricmoo
This is an exception issue
Beta Was this translation helpful? Give feedback.
All reactions