0

I used to use ABIs to decode the input field of token transactions. I notices recently that the input field has always the value deprecated.

You can try the example provided in Etherscan API page:

https://api.etherscan.io/api?module=account&action=tokentx&contractaddress=0x9f8f72aa9304c8b593d555f12ef6589cc3a579a2&page=1&offset=100&sort=asc&apikey=YourApiKeyToken

If you click on the link above you can see that the value of the input is always deprecated.

I think I have missed something here? Is there now another approach or API to bring the input and decode it?

6
  • You're expecting users to click the link above with what Api-Key exactly??? Sep 2, 2019 at 19:14
  • it will work without any API key, this is the exact link provided in Etherscan API tutorial page. No need for API key when you are not calling it very frequently. it will work if you just click.
    – Rami
    Sep 2, 2019 at 19:15
  • You can explain what that field used to stand for, and perhaps someone would no an alternative approach. Sep 2, 2019 at 19:16
  • 1
    You could certainly use the hash field to look up the transaction by hash and see it's data field there. But perhaps you don't need to decode the data at all, given that the from, to, and value fields are already provided.
    – user19510
    Sep 2, 2019 at 19:23
  • actually I need access to the input data. Please have a look at this transaction etherscan.io/tx/… it is one of the transactions that appear in the response for the example link I provided... it clearly has "Input Data" (if you click on the "Click to see More"), but this field has the value 'deprecated' in the API response.
    – Rami
    Sep 2, 2019 at 19:37

1 Answer 1

0

If you use the 'Normal' transaction endpoint instead of the token transfer events endpoint, then the input data will be included.

See example: https://api.etherscan.io/api?module=account&action=txlist&address=0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a&startblock=0&endblock=99999999&page=1&offset=10&sort=asc&apikey=YourApiKeyToken

And the documentation: https://docs.etherscan.io/api-endpoints/accounts#get-a-list-of-normal-transactions-by-address

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.