Suppose, If we have a Program-A which can be called by other programs and users. If a program does a CPI to Program-A, How to know which program is trying to call our program(Program-A).

1 Answer 1


You should aggregate & parse all transaction history of your program. If you could find any of your program's instructions in innerInstructions you should check program addresses of the parent instruction. It will tell you which program cpi called to your program.


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.