2

I'm using Helius webhook services to track new token creations with the TOKEN_MINT transaction type on the Solana blockchain. My webhook is set to listen to transactions from the account TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA. Although I am receiving notifications, they include an overwhelming amount of data, most of which is irrelevant to my goal of simply identifying new token creations.

Here's the issue: The notifications provide extensive details on all transactions, but I'm only interested in the events where a new token is minted. I've tried filtering the data on my end, but I'm struggling to pinpoint exactly which part of the data indicates a new token creation.

How can I configure the Helius webhook to send only the relevant information regarding new token mints? Is there a specific data field I should look at to identify new token creations within the payload of a TOKEN_MINT transaction? Additionally, is there a direct method to retrieve information about newly created tokens on Solana without using third-party services like Helius? Any guidance on filtering this data or alternative approaches to monitor new token mints directly on Solana would be greatly appreciated.

Thank you!

1 Answer 1

4

You could use the logsSubscribe websocket endpoint for all transactions involving the token program, TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA, ie:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "logsSubscribe",
  "params": [
    {
      "mentions": [ "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA" ]
    },
    {
      "commitment": "confirmed"
    }
  ]
}

And then you can search the logs for the creation of a new token mint by searching for Instruction: InitializeMint https://github.com/solana-labs/solana-program-library/blob/ca091b1711667bbb456c52f06e809d16b9255af3/token/program/src/processor.rs#L856 or the creation of new tokens with Instruction: MintTo https://github.com/solana-labs/solana-program-library/blob/ca091b1711667bbb456c52f06e809d16b9255af3/token/program/src/processor.rs#L907

More info at https://solana.com/docs/rpc/websocket/logssubscribe

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.