pub fn new_instruction_add_program_id(
        &self,
        admin_address: &Pubkey,
        name: &str,
        program_id: &Pubkey,
        program_id_type: ProgramIDType,
        refdb_index: Option<usize>,
    ) -> Result<Instruction, FarmClientError> {
        self.new_instruction_refdb_write(
            admin_address,
            &refdb::StorageType::Program.to_string(),
            refdb::Record {
                index: refdb_index.map(|idx| idx as u32),
                counter: 0,
                tag: program_id_type as u16,
                name: str_to_as64(name)?,
                reference: refdb::Reference::Pubkey { data: *program_id },
            },
        )
    }
/// Creates a new Instruction for recording the Program ID metadata on-chain
Creates a new Instruction for recording the Program ID metadata on-chain
Creates a new Instruction for recording the Program ID metadata on - chain
pub fn new_instruction_add_program_id(
        &self,
        admin_address: &Pubkey,
        name: &str,
        program_id: &Pubkey,
        program_id_type: ProgramIDType,
        refdb_index: Option<usize>,
    ) -> Result<Instruction, FarmClientError> {
        self.new_instruction_refdb_write(
            admin_address,
            &refdb::StorageType::Program.to_string(),
            refdb::Record {
                index: refdb_index.map(|idx| idx as u32),
                counter: 0,
                tag: program_id_type as u16,
                name: str_to_as64(name)?,
                reference: refdb::Reference::Pubkey { data: *program_id },
            },
        )
    }
pub fn new_instruction_add_program_id ( & self , admin_address : & Pubkey , name : & str , program_id : & Pubkey , program_id_type : ProgramIDType , refdb_index : Option < usize > , ) -> Result < Instruction , FarmClientError > { self . new_instruction_refdb_write ( admin_address , & refdb :: StorageType :: Program . to_string ( ) , refdb :: Record { index : refdb_index . map ( | idx | idx as u32 ) , counter : 0 , tag : program_id_type as u16 , name : str_to_as64 ( name ) ? , reference : refdb :: Reference :: Pubkey { data : * program_id } , } , ) }
Creates a new Instruction for recording the Program ID metadata on-chain
Creates a new Instruction for recording the Program ID metadata on - chain
&self
admin_address
&Pubkey
name
&str
program_id
&Pubkey
program_id_type
ProgramIDType
refdb_index
Option<usize>
&self
admin_address
&Pubkey
name
&str
program_id
&Pubkey
program_id_type
ProgramIDType
refdb_index
Option<usize>