1

I'm working on a website where a user can create their own SPL token with metaplex metadata attached to it. Something that I want to keep track of is all the SPL tokens that were created using my DApp. I haven't created any programs of my own and have been using the spl-token library to create the mint accounts.

How can I easily query information for all the SPL tokens created using my DApp? Since there is no fixed address I can use as a reference for query, I'm quite lost on this aspect

2 Answers 2

2

I am not sure about the layout of your dApp but one option would be to set up a wallet and add that wallet as a signer in the mint transaction. This will allow you to query all the transactions for which the wallet is a singer. You can then parse the transactions and see which token was minted in each. If this approach is taken all the singing should be done on the backend so as not to expose any private keys.

1

You can deploy a dummy program with one instruction that does nothing. And whenever somebody mints, add an instruction to the transaction that calls this instruction in your dummy program. Then you can filter the transactions from your dummy program which will contain the mint instruction as well.

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.