Add libray_api (bp #5304) (#5305)

automerge
This commit is contained in:
mergify[bot]
2019-07-27 13:30:59 -07:00
committed by Grimes
parent 7796e87814
commit a834e9ae10
9 changed files with 430 additions and 7 deletions

View File

@@ -1,6 +1,5 @@
use crate::bank_client::BankClient;
use serde::Serialize;
use solana_sdk::client::SyncClient;
use solana_sdk::client::Client;
use solana_sdk::instruction::{AccountMeta, Instruction};
use solana_sdk::loader_instruction;
use solana_sdk::message::Message;
@@ -8,8 +7,8 @@ use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, KeypairUtil};
use solana_sdk::system_instruction;
pub fn load_program(
bank_client: &BankClient,
pub fn load_program<T: Client>(
bank_client: &T,
from_keypair: &Keypair,
loader_pubkey: &Pubkey,
program: Vec<u8>,