am trying to decode the Transaction Input Data using Etherscan API in Python, I tried different answers on this, but still can't do it. Maybe someone can Help me figure it out, my Code so far:
transactions_url = "https://api.etherscan.io/api?module=account&action=txlist&address=0x7666ca32ef844ff435506568f66d6de6792e8425&startblock=0&endblock=99999999&sort=asc&apikey={myApiKey}"
response = get(transactions_url)
data = response.json()["result"]
data.sort(key=lambda x: int(x["timeStamp"]))
for tx in data:
inputdata = tx['input']
print(inputdata)
My input Data is
inputdata = 0x246bb536000000000000000000000000000000000000000000000000000023404b7778c00000000000000000000000000000000000000000000000000000000000000064
I want this to be Decoded into:
# Name Type Data
0 _satoshiAmount uint256 38759051000000
1 _duration uint256 100