0

Im going to write a program with go or php to track all usdt/c transfers in different blockchains. in Tron or Ethereum everything is quite straight forward and I could implement things in 2-3 hours but in solana I got totally lost in strange graphs of many different instructions and complexity.

why such simple thing has no any straight forward solution in solana.

can someone please help me to understand the exact steps I should do

I tried many thing the last option I did was to use websocket subscribe to program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA then use params.result.value.pubkey = EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v to findout if this spl transfer is a usdc transfer. but I still don't know what was the sender/receiver address and transaction signature. this subscribeProgram is just a notification that a transaction happened on USDC token nothing more.

my goal is to track all usdc transfers and then check if receiver wallet address is one of my address or not. I have millions of addresses so I cannot scan wallets one by one.

2 Answers 2

1

Use Transfer API by Bitquery

Here is an example

https://ide.bitquery.io/Solana-transfer-websocket

3
  • Thanks for your reply but I dont want to use a paid service I want to do it via solana rpc/websocket directly Commented May 10 at 17:14
  • Will you not pay for RPC? If you run your own Solana node. Then you will spend money and time maintaining the node? Commented May 13 at 7:52
  • it is much cheaper to run a rpc node, and no I dont run a node when main-net is available most of the time Commented May 14 at 8:12
0

If you use the programSubscribe endpoint https://solana.com/docs/rpc/websocket/programsubscribe, you can get a notification anytime an account owned by the token program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA is modified.

If you request jsonParsed updates, then you can look for fields such as the "mint" and "owner". Here's an example of a json-parsed token account: https://solana.com/docs/rpc/http/gettokenaccountsbyowner#response

1
  • I did this but lots of other notification will received too like DEX operations and swaps and lots of other things there is no any option to filter for transfer its a huge work to pars the graph and got the result like the answer in ide.bitquery.io/Solana-transfer-websocket Commented May 14 at 8:14

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.