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

how calculate the discriminator by the struct to resolve the command in the anchor project?

$
0
0

i got the discriminator by the command : anchor build.but i wonder how can i got this discriminator without the command.i search the source code and it use ${namespace}:${context} and hash-sha256.but i got the different result in my code.this is my command:

pub fn initialize_pool_secure(ctx: Context<InitializePoolSecure>) -> Result<()> {}

can anyone do me a favour?


Viewing all articles
Browse latest Browse all 8046


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