I have to implement an event listener for my solana smart contract, where if any user deposits any funds into the contract, I want to record that transaction in the db using event listeners. How can I do this?

1 Answer 1


The Solana RPC exposes websocket endpoints where you can listen to transactions that invoke your program, using the programSubscribe endpoint.

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

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.