Bitcoin Forum
April 19, 2024, 08:02:54 AM *
News: Latest Bitcoin Core release: 26.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 52 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?
1713513774
Hero Member
*
Offline Offline

Posts: 1713513774

View Profile Personal Message (Offline)

Ignore
1713513774
Reply with quote  #2

1713513774
Report to moderator
1713513774
Hero Member
*
Offline Offline

Posts: 1713513774

View Profile Personal Message (Offline)

Ignore
1713513774
Reply with quote  #2

1713513774
Report to moderator
1713513774
Hero Member
*
Offline Offline

Posts: 1713513774

View Profile Personal Message (Offline)

Ignore
1713513774
Reply with quote  #2

1713513774
Report to moderator
It is a common myth that Bitcoin is ruled by a majority of miners. This is not true. Bitcoin miners "vote" on the ordering of transactions, but that's all they do. They can't vote to change the network rules.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
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!