| @@ -5,12 +5,10 @@ pub mod librapay_transaction; | ||||
|  | ||||
| extern crate solana_move_loader_program; | ||||
|  | ||||
| use solana_move_loader_program::{account_state::LibraAccountState, processor::MoveProcessor}; | ||||
| use solana_move_loader_program::account_state::LibraAccountState; | ||||
| use solana_runtime::loader_utils::load_program; | ||||
| use solana_sdk::{ | ||||
|     account::KeyedAccount, | ||||
|     client::Client, | ||||
|     instruction::InstructionError, | ||||
|     message::Message, | ||||
|     pubkey::Pubkey, | ||||
|     signature::{Keypair, Signer}, | ||||
| @@ -80,11 +78,3 @@ pub fn upload_payment_script<T: Client>(from: &Keypair, client: &T) -> Pubkey { | ||||
|  | ||||
|     upload_script(from, client, code) | ||||
| } | ||||
|  | ||||
| pub fn process_instruction( | ||||
|     program_id: &Pubkey, | ||||
|     keyed_accounts: &mut [KeyedAccount], | ||||
|     data: &[u8], | ||||
| ) -> Result<(), InstructionError> { | ||||
|     MoveProcessor::process_instruction(program_id, keyed_accounts, data) | ||||
| } | ||||
|   | ||||
| @@ -151,7 +151,6 @@ pub fn get_libra_balance<T: Client>( | ||||
| mod tests { | ||||
|     use super::*; | ||||
|     use crate::{create_genesis, upload_mint_script, upload_payment_script}; | ||||
|     use solana_move_loader_program::processor::MoveProcessor; | ||||
|     use solana_runtime::bank::Bank; | ||||
|     use solana_runtime::bank_client::BankClient; | ||||
|     use solana_sdk::genesis_config::create_genesis_config; | ||||
| @@ -161,10 +160,10 @@ mod tests { | ||||
|     fn create_bank(lamports: u64) -> (Arc<Bank>, Keypair, Keypair, Pubkey, Pubkey) { | ||||
|         let (mut genesis_config, mint) = create_genesis_config(lamports); | ||||
|         genesis_config.rent.lamports_per_byte_year = 0; | ||||
|         let mut bank = Bank::new(&genesis_config); | ||||
|         bank.add_instruction_processor( | ||||
|             solana_sdk::move_loader::id(), | ||||
|             MoveProcessor::process_instruction, | ||||
|         let bank = Bank::new(&genesis_config); | ||||
|         bank.register_native_instruction_processor( | ||||
|             "solana_move_loader_program", | ||||
|             &solana_sdk::move_loader::id(), | ||||
|         ); | ||||
|         let shared_bank = Arc::new(bank); | ||||
|         let bank_client = BankClient::new_shared(&shared_bank); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user