Bitcoin Forum
November 16, 2024, 01:29:49 PM *
News: Latest Bitcoin Core release: 28.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: How can I find out what token was sent from the transaction "input"?  (Read 74 times)
00blackminer00 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 10, 2021, 02:58:07 PM
Last edit: December 10, 2021, 03:45:31 PM by 00blackminer00
 #1

Hello everyone!

I'm working on something for my project and my goals are to get the value of a transaction and what coin was sent. I'm currently at the point where everything works fine but the problem is I can't find out what token is being sent within the transaction. The issue shows up only for Ethereum tokens transactions (for the other coins I found different ways to distinguish what was sent). I'm using Etherscan's API to retrieve all the raw information for the transactions of an address. The API is returning JSON arrays with objects. Example of an API return:

Code:
results:
       0:
            ......... (SOME NECESSARY DATA)

            hash: "TRANSACTION HASH"

            ......... (SOME NECESSARY DATA)

            value: "0" (BECAUSE IT IS ETHEREUM TOKEN TRANSACTION)

            ......... (SOME NECESSARY DATA)

            input: "0xa9059cbb000000000000000000000000e59cd29be3be4461d79c0881d238cbe87d64595a0000000000000000000000000000000000000000000000000000000077359400" (EXAMPLE INPUT)

       1:
            ..........

       2:
            ..........

Above is shown all the useful information that can somehow help me to retrieve the information I need. How can I get what token is being transferred within the transaction?
00blackminer00 (OP)
Newbie
*
Offline Offline

Activity: 3
Merit: 0


View Profile
December 13, 2021, 02:09:36 PM
 #2

Please, help me. (BUMP)
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!