Move types to more appropriate files (#10638)
This commit is contained in:
@ -5,11 +5,11 @@ use num_derive::FromPrimitive;
|
||||
use num_traits::FromPrimitive;
|
||||
use solana_sdk::{
|
||||
account_info::AccountInfo,
|
||||
decode_error::DecodeError,
|
||||
entrypoint,
|
||||
entrypoint::ProgramResult,
|
||||
info,
|
||||
program_error::{PrintProgramError, ProgramError},
|
||||
program_utils::DecodeError,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
@ -12,14 +12,14 @@ use solana_rbpf::{
|
||||
EbpfVm,
|
||||
};
|
||||
use solana_sdk::{
|
||||
account::KeyedAccount,
|
||||
account::{is_executable, next_keyed_account, KeyedAccount},
|
||||
bpf_loader,
|
||||
decode_error::DecodeError,
|
||||
entrypoint::SUCCESS,
|
||||
entrypoint_native::InvokeContext,
|
||||
instruction::InstructionError,
|
||||
loader_instruction::LoaderInstruction,
|
||||
program_utils::DecodeError,
|
||||
program_utils::{is_executable, limited_deserialize, next_keyed_account},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use std::{io::prelude::*, mem};
|
||||
|
@ -4,9 +4,9 @@ use chrono::prelude::{DateTime, Utc};
|
||||
use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_sdk::{
|
||||
decode_error::DecodeError,
|
||||
hash::Hash,
|
||||
instruction::{AccountMeta, Instruction},
|
||||
program_utils::DecodeError,
|
||||
pubkey::Pubkey,
|
||||
system_instruction,
|
||||
};
|
||||
|
@ -7,10 +7,10 @@ use crate::{
|
||||
use chrono::prelude::{DateTime, Utc};
|
||||
use log::*;
|
||||
use solana_sdk::{
|
||||
account::KeyedAccount,
|
||||
account::{next_keyed_account, KeyedAccount},
|
||||
hash::hash,
|
||||
instruction::InstructionError,
|
||||
program_utils::{limited_deserialize, next_keyed_account},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
|
||||
|
@ -3,9 +3,9 @@
|
||||
use crate::ConfigKeys;
|
||||
use bincode::deserialize;
|
||||
use log::*;
|
||||
use solana_sdk::account::KeyedAccount;
|
||||
use solana_sdk::account::{next_keyed_account, KeyedAccount};
|
||||
use solana_sdk::instruction::InstructionError;
|
||||
use solana_sdk::program_utils::{limited_deserialize, next_keyed_account};
|
||||
use solana_sdk::program_utils::limited_deserialize;
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
||||
pub fn process_instruction(
|
||||
|
@ -8,8 +8,8 @@ use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use serde_derive::Serialize;
|
||||
use solana_metrics::inc_new_counter_info;
|
||||
use solana_sdk::{
|
||||
account::KeyedAccount, instruction::InstructionError, program_utils::limited_deserialize,
|
||||
program_utils::DecodeError, pubkey::Pubkey,
|
||||
account::KeyedAccount, decode_error::DecodeError, instruction::InstructionError,
|
||||
program_utils::limited_deserialize, pubkey::Pubkey,
|
||||
};
|
||||
use std::cmp;
|
||||
use thiserror::Error;
|
||||
|
@ -6,13 +6,13 @@ use log::*;
|
||||
use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_sdk::{
|
||||
account::KeyedAccount,
|
||||
account::{is_executable, next_keyed_account, KeyedAccount},
|
||||
account_utils::State,
|
||||
decode_error::DecodeError,
|
||||
entrypoint_native::InvokeContext,
|
||||
instruction::InstructionError,
|
||||
move_loader::id,
|
||||
program_utils::DecodeError,
|
||||
program_utils::{is_executable, limited_deserialize, next_keyed_account},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use thiserror::Error;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use solana_sdk::{
|
||||
decode_error::DecodeError,
|
||||
instruction::{AccountMeta, Instruction},
|
||||
program_utils::DecodeError,
|
||||
pubkey::Pubkey,
|
||||
system_instruction,
|
||||
};
|
||||
|
@ -3,9 +3,9 @@
|
||||
use crate::ownable_instruction::OwnableError;
|
||||
use bincode::serialize_into;
|
||||
use solana_sdk::{
|
||||
account::KeyedAccount,
|
||||
account::{next_keyed_account, KeyedAccount},
|
||||
instruction::InstructionError,
|
||||
program_utils::{limited_deserialize, next_keyed_account},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
|
||||
|
@ -6,10 +6,11 @@ use log::*;
|
||||
use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_sdk::{
|
||||
account::{get_signers, KeyedAccount},
|
||||
account::{get_signers, next_keyed_account, KeyedAccount},
|
||||
clock::{Epoch, UnixTimestamp},
|
||||
decode_error::DecodeError,
|
||||
instruction::{AccountMeta, Instruction, InstructionError},
|
||||
program_utils::{limited_deserialize, next_keyed_account, DecodeError},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
system_instruction,
|
||||
sysvar::{self, clock::Clock, rent::Rent, stake_history::StakeHistory, Sysvar},
|
||||
|
@ -4,8 +4,8 @@ use chrono::prelude::{Date, DateTime, Utc};
|
||||
use num_derive::FromPrimitive;
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_sdk::{
|
||||
decode_error::DecodeError,
|
||||
instruction::{AccountMeta, Instruction, InstructionError},
|
||||
program_utils::DecodeError,
|
||||
pubkey::Pubkey,
|
||||
system_instruction,
|
||||
};
|
||||
|
@ -7,9 +7,9 @@ use chrono::prelude::*;
|
||||
use solana_config_program::date_instruction::DateConfig;
|
||||
use solana_config_program::get_config_data;
|
||||
use solana_sdk::{
|
||||
account::{Account, KeyedAccount},
|
||||
account::{next_keyed_account, Account, KeyedAccount},
|
||||
instruction::InstructionError,
|
||||
program_utils::{limited_deserialize, next_keyed_account},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
};
|
||||
use std::cell::RefMut;
|
||||
|
@ -10,10 +10,11 @@ use num_derive::{FromPrimitive, ToPrimitive};
|
||||
use serde_derive::{Deserialize, Serialize};
|
||||
use solana_metrics::inc_new_counter_info;
|
||||
use solana_sdk::{
|
||||
account::{get_signers, KeyedAccount},
|
||||
account::{get_signers, next_keyed_account, KeyedAccount},
|
||||
decode_error::DecodeError,
|
||||
hash::Hash,
|
||||
instruction::{AccountMeta, Instruction, InstructionError},
|
||||
program_utils::{limited_deserialize, next_keyed_account, DecodeError},
|
||||
program_utils::limited_deserialize,
|
||||
pubkey::Pubkey,
|
||||
system_instruction,
|
||||
sysvar::{self, clock::Clock, slot_hashes::SlotHashes, Sysvar},
|
||||
|
@ -738,10 +738,9 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::vote_state;
|
||||
use solana_sdk::{
|
||||
account::{get_signers, Account},
|
||||
account::{get_signers, next_keyed_account, Account},
|
||||
account_utils::StateMut,
|
||||
hash::hash,
|
||||
program_utils::next_keyed_account,
|
||||
};
|
||||
use std::cell::RefCell;
|
||||
|
||||
|
Reference in New Issue
Block a user