Quantcast
Channel: Recent Questions - Solana Stack Exchange
Viewing all articles
Browse latest Browse all 8004

Check if an account is a program

$
0
0

So in anchor we can enforce that a provided account is the system program, the token program, or the associated token program using the following constraint.

my_program: Program<'info, System>

As far as I understand, the check here is just using the program id. Is there a way we can more generically check if a provided account is a program?


Viewing all articles
Browse latest Browse all 8004

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>