Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ solana-cli-config = "2"
solana-faucet = "2"
solana-rpc-client = "2"
solana-sdk = "2"
solana-pubkey = "2"
syn = { version = "1.0.60", features = ["full", "extra-traits"] }
tar = "0.4.35"
toml = "0.7.6"
Expand Down
2 changes: 1 addition & 1 deletion cli/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ use serde::de::{self, MapAccess, Visitor};
use serde::ser::SerializeMap;
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use solana_cli_config::{Config as SolanaConfig, CONFIG_FILE};
use solana_pubkey::Pubkey;
use solana_sdk::clock::Slot;
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::{Keypair, Signer};
use std::collections::{BTreeMap, HashMap};
use std::convert::TryFrom;
Expand Down
2 changes: 1 addition & 1 deletion cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ use regex::{Regex, RegexBuilder};
use rust_template::{ProgramTemplate, TestTemplate};
use semver::{Version, VersionReq};
use serde_json::{json, Map, Value as JsonValue};
use solana_pubkey::Pubkey;
use solana_rpc_client::rpc_client::RpcClient;
use solana_sdk::commitment_config::CommitmentConfig;
use solana_sdk::compute_budget::ComputeBudgetInstruction;
use solana_sdk::instruction::{AccountMeta, Instruction};
use solana_sdk::pubkey::Pubkey;
use solana_sdk::signature::Keypair;
use solana_sdk::signature::Signer;
use solana_sdk::signer::EncodableKey;
Expand Down
5 changes: 3 additions & 2 deletions cli/src/rust_template.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ use crate::{
use anyhow::Result;
use clap::{Parser, ValueEnum};
use heck::{ToLowerCamelCase, ToPascalCase, ToSnakeCase};
use solana_pubkey::Pubkey;
use solana_sdk::{
pubkey::Pubkey,
signature::{read_keypair_file, write_keypair_file, Keypair},
signer::Signer,
};
Expand Down Expand Up @@ -779,8 +779,9 @@ mod test_initialize;
r#"use std::str::FromStr;

use anchor_client::{{
solana_pubkey::Pubkey,
solana_sdk::{{
commitment_config::CommitmentConfig, pubkey::Pubkey, signature::read_keypair_file,
commitment_config::CommitmentConfig, signature::read_keypair_file,
}},
Client, Cluster,
}};
Expand Down
1 change: 1 addition & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ solana-rpc-client = "2"
solana-rpc-client-api = "2"
solana-account = "2"
solana-sdk = "2"
solana-pubkey = "2"
thiserror = "1"
tokio = { version = "1", features = ["rt", "sync"] }
url = "2"
2 changes: 1 addition & 1 deletion client/example/src/blocking.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_client::solana_sdk::pubkey::Pubkey;
use anchor_client::solana_pubkey::Pubkey;
use anchor_client::solana_sdk::signature::{Keypair, Signer};
use anchor_client::solana_sdk::system_instruction;
use anchor_client::{Client, Cluster};
Expand Down
2 changes: 1 addition & 1 deletion client/example/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_client::solana_sdk::pubkey::Pubkey;
use anchor_client::solana_pubkey::Pubkey;
use anyhow::Result;
use clap::Parser;

Expand Down
2 changes: 1 addition & 1 deletion client/example/src/nonblocking.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use anchor_client::solana_sdk::pubkey::Pubkey;
use anchor_client::solana_pubkey::Pubkey;
use anchor_client::solana_sdk::signature::{Keypair, Signer};
use anchor_client::solana_sdk::system_instruction;
use anchor_client::{Client, Cluster};
Expand Down
1 change: 1 addition & 0 deletions client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ pub use cluster::Cluster;
#[cfg(feature = "async")]
pub use nonblocking::ThreadSafeSigner;
pub use solana_account_decoder;
pub use solana_pubkey;
pub use solana_sdk;

mod cluster;
Expand Down
3 changes: 2 additions & 1 deletion docs/content/docs/quickstart/local.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,9 @@ The Rust test file will be at `/tests/src/test_initialize.rs`.
use std::str::FromStr;

use anchor_client::{
solana_pubkey::Pubkey,
solana_sdk::{
commitment_config::CommitmentConfig, pubkey::Pubkey, signature::read_keypair_file,
commitment_config::CommitmentConfig, signature::read_keypair_file,
},
Client, Cluster,
};
Expand Down
15 changes: 7 additions & 8 deletions docs/content/docs/testing/mollusk.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ checks on the result. In both cases, the result is also returned.
```rust
use {
mollusk_svm::Mollusk,
solana_account::Account,
solana_sdk::{instruction::{AccountMeta, Instruction}, pubkey::Pubkey},
solana_pubkey::Pubkey,
solana_sdk::{account::Account, instruction::{AccountMeta, Instruction}},
};

let program_id = Pubkey::new_unique();
Expand Down Expand Up @@ -86,10 +86,9 @@ To apply checks via `process_and_validate_instruction`, developers can use the
```rust
use {
mollusk_svm::{Mollusk, result::Check},
solana_account::Account,
solana_pubkey::Pubkey,
solana_sdk::{
instruction::{AccountMeta, Instruction},
pubkey::Pubkey
system_instruction,
system_program,
},
Expand Down Expand Up @@ -146,8 +145,8 @@ the final result is also returned.
```rust
use {
mollusk_svm::Mollusk,
solana_account::Account,
solana_sdk::{pubkey::Pubkey, system_instruction},
solana_pubkey::Pubkey,
solana_sdk::{account::Account, system_instruction},
};

let mollusk = Mollusk::default();
Expand Down Expand Up @@ -188,8 +187,8 @@ returned by the method is the final result of the last instruction in the chain.
```rust
use {
mollusk_svm::{Mollusk, result::Check},
solana_account::Account,
solana_sdk::{pubkey::Pubkey, system_instruction},
solana_pubkey::Pubkey,
solana_sdk::{account::Account, system_instruction},
};

let mollusk = Mollusk::default();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,9 @@
use {
anchor_client::{
anchor_lang::Discriminator,
solana_account::Account,
solana_pubkey::Pubkey,
solana_sdk::{
commitment_config::CommitmentConfig,
pubkey::Pubkey,
signature::{Keypair, Signer},
transaction::Transaction,
},
Expand Down
Loading