sigantures: [sx,sx]
message:
...
instructions[ ix, ix ]
Instructions
program_id: <id>
accounts:
[ #list of public key
Alice,
Bob,
system programs
]
instruction_data : b[] #comes in bytes
- programs process the instruction data to execute stuffs
program derived address(PDA)
- program can own an address to change the value of the data in this account
e.g. to track user numbers
- only have public key, NO private key, the address is a set of strings
- store data in PDA rather than having to sign the data change every time
Solana Native
Beta.solpg.io 에서 테스트해보기:
entrypoint!(process)interaction);
fn process_intruction(
program_id: &Pubkey,
accounts: &[AcccountInfo]
instructino_data: &[u8]
) -> ProgramResult {
let account_iter = &mut accounts.iter();
let payer = next_account_infro(accounts_iter)?;
let system_program = next_account_info(account_iter)?;
msg!('hello;');
msg!('our program id{}, &program_id);
Ok(());
l}
Solana Anchor
기본설명: https://www.youtube.com/watch?v=90BTugVYGqQ&list=PLilwLeBwGuK51Ji870apdb88dnBr1Xqhm&index=3
The Complete Guide to Full Stack Solana Development with React, Anchor, Rust, and Phantom
Everything You Need to Get Started Building Full Stack Dapps on Solana
dev.to