@@ -13,30 +13,30 @@ use {
13
13
display:: println_name_value, CliSignature , CliValidatorsSortOrder , OutputFormat ,
14
14
} ,
15
15
solana_client:: connection_cache:: ConnectionCache ,
16
+ solana_clock:: { Epoch , Slot } ,
16
17
solana_commitment_config:: CommitmentConfig ,
17
18
solana_decode_error:: DecodeError ,
19
+ solana_hash:: Hash ,
20
+ solana_instruction:: error:: InstructionError ,
21
+ solana_keypair:: { read_keypair_file, Keypair } ,
22
+ solana_offchain_message:: OffchainMessage ,
23
+ solana_program:: stake:: { instruction:: LockupArgs , state:: Lockup } ,
24
+ solana_pubkey:: Pubkey ,
18
25
solana_remote_wallet:: remote_wallet:: RemoteWalletManager ,
19
26
solana_rpc_client:: rpc_client:: RpcClient ,
20
27
solana_rpc_client_api:: {
21
28
client_error:: { Error as ClientError , Result as ClientResult } ,
22
29
config:: { RpcLargestAccountsFilter , RpcSendTransactionConfig , RpcTransactionLogsFilter } ,
23
30
} ,
24
31
solana_rpc_client_nonce_utils:: blockhash_query:: BlockhashQuery ,
25
- solana_sdk:: {
26
- clock:: { Epoch , Slot } ,
27
- hash:: Hash ,
28
- instruction:: InstructionError ,
29
- offchain_message:: OffchainMessage ,
30
- pubkey:: Pubkey ,
31
- signature:: { Signature , Signer , SignerError } ,
32
- signer:: keypair:: { read_keypair_file, Keypair } ,
33
- stake:: { instruction:: LockupArgs , state:: Lockup } ,
34
- transaction:: { TransactionError , VersionedTransaction } ,
35
- } ,
32
+ solana_signature:: Signature ,
33
+ solana_signer:: { Signer , SignerError } ,
36
34
solana_tps_client:: { utils:: create_connection_cache, TpsClient } ,
37
35
solana_tpu_client:: tpu_client:: {
38
36
TpuClient , TpuClientConfig , DEFAULT_TPU_CONNECTION_POOL_SIZE , DEFAULT_TPU_ENABLE_UDP ,
39
37
} ,
38
+ solana_transaction:: versioned:: VersionedTransaction ,
39
+ solana_transaction_error:: TransactionError ,
40
40
solana_vote_program:: vote_state:: VoteAuthorize ,
41
41
std:: {
42
42
collections:: HashMap , error, io:: stdout, process:: exit, rc:: Rc , str:: FromStr , sync:: Arc ,
@@ -1789,20 +1789,17 @@ mod tests {
1789
1789
use {
1790
1790
super :: * ,
1791
1791
serde_json:: json,
1792
+ solana_keypair:: { keypair_from_seed, read_keypair_file, write_keypair_file, Keypair } ,
1793
+ solana_presigner:: Presigner ,
1794
+ solana_pubkey:: Pubkey ,
1792
1795
solana_rpc_client:: mock_sender_for_cli:: SIGNATURE ,
1793
1796
solana_rpc_client_api:: {
1794
1797
request:: RpcRequest ,
1795
1798
response:: { Response , RpcResponseContext } ,
1796
1799
} ,
1797
1800
solana_rpc_client_nonce_utils:: blockhash_query,
1798
- solana_sdk:: {
1799
- pubkey:: Pubkey ,
1800
- signature:: {
1801
- keypair_from_seed, read_keypair_file, write_keypair_file, Keypair , Presigner ,
1802
- } ,
1803
- stake, system_program,
1804
- transaction:: TransactionError ,
1805
- } ,
1801
+ solana_sdk_ids:: { stake, system_program} ,
1802
+ solana_transaction_error:: TransactionError ,
1806
1803
solana_transaction_status:: TransactionConfirmationStatus ,
1807
1804
} ;
1808
1805
@@ -1983,8 +1980,8 @@ mod tests {
1983
1980
let from_pubkey = solana_pubkey:: new_rand ( ) ;
1984
1981
let from_str = from_pubkey. to_string ( ) ;
1985
1982
for ( name, program_id) in & [
1986
- ( "STAKE" , stake:: program :: id ( ) ) ,
1987
- ( "VOTE" , solana_vote_program :: id ( ) ) ,
1983
+ ( "STAKE" , stake:: id ( ) ) ,
1984
+ ( "VOTE" , solana_sdk_ids :: vote :: id ( ) ) ,
1988
1985
( "NONCE" , system_program:: id ( ) ) ,
1989
1986
] {
1990
1987
let test_create_address_with_seed = test_commands. clone ( ) . get_matches_from ( vec ! [
@@ -2016,7 +2013,7 @@ mod tests {
2016
2013
command: CliCommand :: CreateAddressWithSeed {
2017
2014
from_pubkey: None ,
2018
2015
seed: "seed" . to_string( ) ,
2019
- program_id: stake:: program :: id( ) ,
2016
+ program_id: stake:: id( ) ,
2020
2017
} ,
2021
2018
signers: vec![ Box :: new( read_keypair_file( & keypair_file) . unwrap( ) ) ] ,
2022
2019
}
@@ -2324,11 +2321,11 @@ mod tests {
2324
2321
config. command = CliCommand :: CreateAddressWithSeed {
2325
2322
from_pubkey : Some ( from_pubkey) ,
2326
2323
seed : "seed" . to_string ( ) ,
2327
- program_id : stake:: program :: id ( ) ,
2324
+ program_id : stake:: id ( ) ,
2328
2325
} ;
2329
2326
let address = process_command ( & config) ;
2330
2327
let expected_address =
2331
- Pubkey :: create_with_seed ( & from_pubkey, "seed" , & stake:: program :: id ( ) ) . unwrap ( ) ;
2328
+ Pubkey :: create_with_seed ( & from_pubkey, "seed" , & stake:: id ( ) ) . unwrap ( ) ;
2332
2329
assert_eq ! ( address. unwrap( ) , expected_address. to_string( ) ) ;
2333
2330
2334
2331
// Need airdrop cases
@@ -2717,7 +2714,7 @@ mod tests {
2717
2714
memo: None ,
2718
2715
fee_payer: 0 ,
2719
2716
derived_address_seed: Some ( derived_address_seed) ,
2720
- derived_address_program_id: Some ( stake:: program :: id( ) ) ,
2717
+ derived_address_program_id: Some ( stake:: id( ) ) ,
2721
2718
compute_unit_price: None ,
2722
2719
} ,
2723
2720
signers: vec![ Box :: new( read_keypair_file( & default_keypair_file) . unwrap( ) ) , ] ,
0 commit comments