Skip to content
Merged
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
3 changes: 2 additions & 1 deletion Cargo.lock

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

3 changes: 2 additions & 1 deletion Cargo.toml
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can take solana-program out of the workspace manifest, too, since the Codama clients don't link to it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good point, done!

Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ solana-instruction = "2.2.1"
solana-logger = "2.2.1"
solana-nonce = "2.2.1"
solana-msg = "2.2.1"
solana-program = { version = "2.2.1", default-features = false }
solana-program-entrypoint = "2.2.1"
solana-program-error = "2.2.1"
solana-pubkey = { version = "2.2.1", default-features = false }
solana-sysvar = { version = "2.2.1", features = ["bincode"] }
solana-sysvar-id = "2.2.1"
3 changes: 2 additions & 1 deletion interface/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,12 @@ solana-account-info = { workspace = true }
solana-cpi = { workspace = true }
solana-example-mocks = { workspace = true }
solana-nonce = { workspace = true }
solana-program = { workspace = true, default-features = false }
solana-program-entrypoint = { workspace = true }
solana-program-error = { workspace = true, features = ["borsh"] }
solana-pubkey = { workspace = true, features = ["std"] }
solana-system-interface = { path = ".", features = ["bincode"] }
solana-sysvar = { workspace = true }
solana-sysvar-id = { workspace = true }
static_assertions = "1.1.0"
strum = "0.24"
strum_macros = "0.24"
Expand Down
38 changes: 19 additions & 19 deletions interface/src/instruction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ pub enum SystemInstruction {
/// The `payer` and `new_account` are signers.
///
/// ```
/// # use solana_program::example_mocks::{solana_sdk, solana_rpc_client};
/// # use solana_example_mocks::{solana_sdk, solana_rpc_client};
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_sdk::{
/// signature::{Keypair, Signer},
Expand Down Expand Up @@ -338,11 +338,11 @@ pub enum SystemInstruction {
/// use borsh::{BorshDeserialize, BorshSerialize};
/// use solana_account_info::{next_account_info, AccountInfo};
/// use solana_cpi::invoke_signed;
/// use solana_program::sysvar::{rent::Rent, Sysvar};
/// use solana_program_entrypoint::entrypoint;
/// use solana_program_error::ProgramResult;
/// use solana_pubkey::Pubkey;
/// use solana_system_interface::{instruction, program};
/// use solana_sysvar::{rent::Rent, Sysvar};
///
/// #[derive(BorshSerialize, BorshDeserialize, Debug)]
/// pub struct CreateAccountInstruction {
Expand Down Expand Up @@ -481,7 +481,7 @@ pub fn create_account_with_seed(
/// The `payer` and `new_account` are signers.
///
/// ```
/// # use solana_program::example_mocks::{solana_sdk, solana_rpc_client};
/// # use solana_example_mocks::{solana_sdk, solana_rpc_client};
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
/// use solana_sdk::{
Expand Down Expand Up @@ -553,11 +553,11 @@ pub fn create_account_with_seed(
/// use borsh::{BorshDeserialize, BorshSerialize};
/// use solana_account_info::{next_account_info, AccountInfo};
/// use solana_cpi::invoke_signed;
/// use solana_program::sysvar::{rent::Rent, Sysvar};
/// use solana_program_entrypoint::entrypoint;
/// use solana_program_error::ProgramResult;
/// use solana_pubkey::Pubkey;
/// use solana_system_interface::{instruction, program};
/// use solana_sysvar::{rent::Rent, Sysvar};
///
/// #[derive(BorshSerialize, BorshDeserialize, Debug)]
/// pub struct CreateAccountInstruction {
Expand Down Expand Up @@ -674,7 +674,7 @@ pub fn assign_with_seed(
/// The `payer` and `new_account` are signers.
///
/// ```
/// # use solana_program::example_mocks::{solana_sdk, solana_rpc_client};
/// # use solana_example_mocks::{solana_sdk, solana_rpc_client};
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
/// use solana_sdk::{
Expand Down Expand Up @@ -746,11 +746,11 @@ pub fn assign_with_seed(
/// # use borsh::{BorshDeserialize, BorshSerialize};
/// use solana_account_info::{next_account_info, AccountInfo};
/// use solana_cpi::invoke_signed;
/// use solana_program::sysvar::{rent::Rent, Sysvar};
/// use solana_program_entrypoint::entrypoint;
/// use solana_program_error::ProgramResult;
/// use solana_pubkey::Pubkey;
/// use solana_system_interface::{instruction, program};
/// use solana_sysvar::{rent::Rent, Sysvar};
///
/// #[derive(BorshSerialize, BorshDeserialize, Debug)]
/// # #[borsh(crate = "borsh")]
Expand Down Expand Up @@ -873,7 +873,7 @@ pub fn transfer_with_seed(
/// The `payer` and `new_account` are signers.
///
/// ```
/// # use solana_program::example_mocks::{solana_sdk, solana_rpc_client};
/// # use solana_example_mocks::{solana_sdk, solana_rpc_client};
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
/// use solana_sdk::{
Expand Down Expand Up @@ -945,11 +945,11 @@ pub fn transfer_with_seed(
/// use borsh::{BorshDeserialize, BorshSerialize};
/// use solana_account_info::{next_account_info, AccountInfo};
/// use solana_cpi::invoke_signed;
/// use solana_program::sysvar::{rent::Rent, Sysvar};
/// use solana_program_entrypoint::entrypoint;
/// use solana_program_error::ProgramResult;
/// use solana_pubkey::Pubkey;
/// use solana_system_interface::{instruction, program};
/// use solana_sysvar::{rent::Rent, Sysvar};
///
/// #[derive(BorshSerialize, BorshDeserialize, Debug)]
/// pub struct CreateAccountInstruction {
Expand Down Expand Up @@ -1059,7 +1059,7 @@ pub fn allocate_with_seed(
/// This example performs multiple transfers in a single transaction.
///
/// ```
/// # use solana_program::example_mocks::{solana_sdk, solana_rpc_client};
/// # use solana_example_mocks::{solana_sdk, solana_rpc_client};
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
/// use solana_sdk::{
Expand Down Expand Up @@ -1394,9 +1394,9 @@ pub fn create_nonce_account(
/// Create and sign a transaction with a durable nonce:
///
/// ```
/// # use solana_program::example_mocks::solana_sdk;
/// # use solana_program::example_mocks::solana_rpc_client;
/// # use solana_program::example_mocks::solana_rpc_client_nonce_utils;
/// # use solana_example_mocks::solana_sdk;
/// # use solana_example_mocks::solana_rpc_client;
/// # use solana_example_mocks::solana_rpc_client_nonce_utils;
/// # use solana_sdk::account::Account;
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
Expand Down Expand Up @@ -1515,8 +1515,8 @@ pub fn advance_nonce_account(nonce_pubkey: &Pubkey, authorized_pubkey: &Pubkey)
/// # Examples
///
/// ```
/// # use solana_program::example_mocks::solana_sdk;
/// # use solana_program::example_mocks::solana_rpc_client;
/// # use solana_example_mocks::solana_sdk;
/// # use solana_example_mocks::solana_rpc_client;
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
/// use solana_sdk::{
Expand Down Expand Up @@ -1599,8 +1599,8 @@ pub fn withdraw_nonce_account(
/// # Examples
///
/// ```
/// # use solana_program::example_mocks::solana_sdk;
/// # use solana_program::example_mocks::solana_rpc_client;
/// # use solana_example_mocks::solana_sdk;
/// # use solana_example_mocks::solana_rpc_client;
/// use solana_rpc_client::rpc_client::RpcClient;
/// use solana_pubkey::Pubkey;
/// use solana_sdk::{
Expand Down Expand Up @@ -1670,7 +1670,7 @@ pub fn upgrade_nonce_account(nonce_pubkey: Pubkey) -> Instruction {
#[cfg(test)]
mod tests {
use super::*;
use solana_program::sysvar::SysvarId;
use solana_sysvar_id::SysvarId;

fn get_keys(instruction: &Instruction) -> Vec<Pubkey> {
instruction.accounts.iter().map(|x| x.pubkey).collect()
Expand All @@ -1682,11 +1682,11 @@ mod tests {
// Ensure that the constants are in sync with the solana program.
assert_eq!(
RECENT_BLOCKHASHES_ID,
solana_program::sysvar::recent_blockhashes::RecentBlockhashes::id(),
solana_sysvar::recent_blockhashes::RecentBlockhashes::id(),
);

// Ensure that the constants are in sync with the solana rent.
assert_eq!(RENT_ID, solana_program::sysvar::rent::Rent::id());
assert_eq!(RENT_ID, solana_sysvar::rent::Rent::id());
}

#[test]
Expand Down