learn-solana
learn-solana

Reputation: 11

Solana Inner Instruction & Instruction Relationship

I am a beginner in Solana development. I just have a question regarding instruction and inner instruction.

https://solscan.io/tx/2FWNrPeZJ7XhgLHXHHeA6nnX68bkKh6TwZa3pGeHt7F9Nf4w29NAtLHYGjxA9dMWRiX1dYCeHF3WfaRJhFEvnXyh

If you look at this transaction #4 instruction. It runs the pump.fun program on chain. For its input account it has a bunch of account. Some of these account for example #1 seems to be generated by inner instruction #4.1.

My question is does #4.1 instruction come first or #4? Moreover, how do I replicate this transaction?

Upvotes: 1

Views: 653

Answers (1)

Riki
Riki

Reputation: 17

So from my understanding solscan is displaying to you the token with the metadata (image tite etc) because it's already on-chain but at the time of when the transaction was sent the token mint was just a random generated public key so then that public key was passed into pump fun create instruction and then pump called system program in #4.1 to create an account but it was all just a random generated public key at that point meaning #4 was called which then invoked #4.1 and passed along the randomly generated public key (token mint) it was given. If you wanna learn more about this look into CPI

Upvotes: 0

Related Questions