Category : solana

first and foremost, I presume that initialize_mint is the process to create a token. I have this program written that seems to me to be ok without an issue: use solana_program::{ account_info::{next_account_info, AccountInfo}, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey, program::{invoke}, }; use spl_token::{instruction::*}; entrypoint!(process_instructions); pub fn process_instructions(program_id: &Pubkey, accounts: &[AccountInfo], _: &[u8]) -> ProgramResult{ let account_info_iter = &mut ..

Read more

I am trying to create a transaction on python for the program that I wrote, and I am falling into an issue that I can’t really pinpoint how to solve it. program_id = PublicKey("9qm7AEJFHQ8SqJrmfofWK6maWRwKvQwK8uy8w3PVZLQw") program_id_account_meta = AccountMeta(program_id, False, False) payer_account_meta = AccountMeta(payer_keypair.public_key, True, False) vault_account_meta = AccountMeta(PublicKey("G473EkeR5gowVn8CRwTSDop3zPwaNixwp62qi7nyVf4z"), False, False) accounts = [ program_id_account_meta, payer_account_meta, vault_account_meta] ..

Read more

I have this piece of Code: seed = "hello-world" greeted, nonce = PublicKey.find_program_address(seeds=[bytes(seed, ‘utf8’)], program_id=program_id) params = system_program.CreateAccountWithSeedParams(from_pubkey = keypair.public_key, new_account_pubkey = greeted, base_pubkey=keypair.public_key, lamports=2000, program_id = program_id, seed={‘length’: len(seed), ‘chars’:seed}, space = 8 ) transaction_params = system_program.create_account_with_seed(params) transaction = Transaction() transaction.add(transaction_params) client.send_transaction(transaction, keypair) everything runs just fine, up until the last line, where we ..

Read more

seed = [b’metadata’, bytes(program_id), bytes(PublicKey("AAFw5ekM42VZW63v9xPmuSKNnVPJ2JY2jVCEBscShB4a"))] greeted, nonce = PublicKey.find_program_address(seeds=seed, program_id=program_id) data = client.get_account_info(greeted)[‘result’][‘value’][‘data’] data[0] I get the output(image attached): "BLXRjfGGRq3wZT89L+Hj4D………." actually longer than this, image attached My guess is this is some base 64 or 58 something, but I have no idea what it is or how to convert the data to readable format in ..

Read more

base_pubkey = keypair.public_key, from_pubkey = keypair.public_key, lamports = 200, new_account_pubkey = greeted, program_id = program_id, seed = ‘hello’, space = 8 ) I am Getting the output CreateAccountWithSeedParams(from_pubkey=2ASw3tjK5bSxQxFEMsM6J3DnBozNh7drVErSwc7AtzJv, new_account_pubkey=BkuEamVXuHugbAAVurExanW1FGAejsEAa7hECYsP1j6o, base_pubkey=2ASw3tjK5bSxQxFEMsM6J3DnBozNh7drVErSwc7AtzJv, seed=’hello’, lamports=200, space=8, program_id=TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA) The problem then comes when I use transaction_Params = system_program.create_account_with_seed(params) I get the long slew of errors, whose long story cut ..

Read more