pub fn store<T: ConfigState>(
    config_account_pubkey: &Pubkey,
    is_config_signer: bool,
    keys: Vec<(Pubkey, bool)>,
    data: &T,
) -> Instruction {
    let mut account_metas = vec![AccountMeta::new(*config_account_pubkey, is_config_signer)];
    for (signer_pubkey, _) in keys.iter().filter(|(_, is_signer)| *is_signer) {
        if signer_pubkey != config_account_pubkey {
            account_metas.push(AccountMeta::new(*signer_pubkey, true));
        }
    }
    let account_data = (ConfigKeys { keys }, data);
    Instruction::new_with_bincode(id(), &account_data, account_metas)
}
/// Store new data in a configuration account
Store new data in a configuration account
Store new data in a configuration account
pub fn store<T: ConfigState>(
    config_account_pubkey: &Pubkey,
    is_config_signer: bool,
    keys: Vec<(Pubkey, bool)>,
    data: &T,
) -> Instruction {
    let mut account_metas = vec![AccountMeta::new(*config_account_pubkey, is_config_signer)];
    for (signer_pubkey, _) in keys.iter().filter(|(_, is_signer)| *is_signer) {
        if signer_pubkey != config_account_pubkey {
            account_metas.push(AccountMeta::new(*signer_pubkey, true));
        }
    }
    let account_data = (ConfigKeys { keys }, data);
    Instruction::new_with_bincode(id(), &account_data, account_metas)
}
pub fn store < T : ConfigState > ( config_account_pubkey : & Pubkey , is_config_signer : bool , keys : Vec < ( Pubkey , bool ) > , data : & T , ) -> Instruction { let mut account_metas = vec ! [ AccountMeta new ( config_account_pubkey is_config_signer ) ] ; for ( signer_pubkey , _ ) in keys . iter ( ) . filter ( | ( _ , is_signer ) | * is_signer ) { if signer_pubkey != config_account_pubkey { account_metas . push ( AccountMeta :: new ( * signer_pubkey , true ) ) ; } } let account_data = ( ConfigKeys { keys } , data ) ; Instruction :: new_with_bincode ( id ( ) , & account_data , account_metas ) }
Store new data in a configuration account
Store new data in a configuration account
config_account_pubkey
&Pubkey
is_config_signer
bool
keys
Vec<(Pubkey, bool)>
data
&T