Skip to content

Commit

Permalink
extract system-transaction crate
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinheavey committed Dec 2, 2024
1 parent f347973 commit e57d501
Show file tree
Hide file tree
Showing 8 changed files with 77 additions and 9 deletions.
14 changes: 14 additions & 0 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ members = [
"sdk/slot-hashes",
"sdk/slot-history",
"sdk/stable-layout",
"sdk/system-transaction",
"sdk/sysvar",
"sdk/sysvar-id",
"sdk/time-utils",
Expand Down Expand Up @@ -564,6 +565,7 @@ solana-svm-rent-collector = { path = "svm-rent-collector", version = "=2.2.0" }
solana-svm-transaction = { path = "svm-transaction", version = "=2.2.0" }
solana-system-interface = "1.0"
solana-system-program = { path = "programs/system", version = "=2.2.0" }
solana-system-transaction = { path = "sdk/system-transaction", version = "=2.2.0" }
solana-sysvar = { path = "sdk/sysvar", version = "=2.2.0" }
solana-sysvar-id = { path = "sdk/sysvar-id", version = "=2.2.0" }
solana-test-validator = { path = "test-validator", version = "=2.2.0" }
Expand Down
14 changes: 14 additions & 0 deletions programs/sbf/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 sdk/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ solana-signature = { workspace = true, features = [
"verify",
], optional = true }
solana-signer = { workspace = true, optional = true }
solana-system-transaction = { workspace = true }
solana-time-utils = { workspace = true }
solana-transaction = { workspace = true, features = [
"bincode",
Expand Down
7 changes: 6 additions & 1 deletion sdk/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ pub mod rpc_port;
pub mod shred_version;
pub mod signature;
pub mod signer;
pub mod system_transaction;
pub mod transaction;
pub mod transport;
pub mod wasm;
Expand Down Expand Up @@ -200,6 +199,12 @@ pub use solana_serde as deserialize_utils;
pub use solana_serde_varint as serde_varint;
#[deprecated(since = "2.1.0", note = "Use `solana-short-vec` crate instead")]
pub use solana_short_vec as short_vec;
#[cfg(feature = "full")]
#[deprecated(
since = "2.2.0",
note = "Use `solana-system-transaction` crate instead"
)]
pub use solana_system_transaction as system_transaction;
#[deprecated(since = "2.2.0", note = "Use `solana-time-utils` crate instead")]
pub use solana_time_utils as timing;
#[cfg(feature = "full")]
Expand Down
22 changes: 22 additions & 0 deletions sdk/system-transaction/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "solana-system-transaction"
description = "Functionality for creating system transactions."
documentation = "https://docs.rs/solana-system-transaction"
version = { workspace = true }
authors = { workspace = true }
repository = { workspace = true }
homepage = { workspace = true }
license = { workspace = true }
edition = { workspace = true }

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[dependencies]
solana-hash = { workspace = true }
solana-keypair = { workspace = true }
solana-program = { workspace = true }
solana-pubkey = { workspace = true }
solana-signer = { workspace = true }
solana-system-interface = { workspace = true, features = ["bincode"] }
solana-transaction = { workspace = true }
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
//! The `system_transaction` module provides functionality for creating system transactions.
#![cfg(feature = "full")]
use crate::{
hash::Hash,
message::Message,
pubkey::Pubkey,
signature::{Keypair, Signer},
system_instruction,
transaction::Transaction,
use {
solana_hash::Hash, solana_keypair::Keypair, solana_program::message::Message,
solana_pubkey::Pubkey, solana_signer::Signer,
solana_system_interface::instruction as system_instruction, solana_transaction::Transaction,
};

/// Create and sign new SystemInstruction::CreateAccount transaction
Expand Down
14 changes: 14 additions & 0 deletions svm/examples/Cargo.lock

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

0 comments on commit e57d501

Please sign in to comment.