From 3440a454f533022d272e5606d19d46aa45422c0a Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Mon, 17 Feb 2025 20:51:06 +0000 Subject: [PATCH 01/13] remove solana-program --- Cargo.lock | 1790 +++++++++++++---- Cargo.toml | 16 +- .../address-lookup-table-account/Cargo.toml | 5 +- .../address-lookup-table-account/src/lib.rs | 21 +- crates/epoch-info/Cargo.toml | 1 - crates/epoch-info/src/lib.rs | 5 +- crates/hash/Cargo.toml | 3 +- crates/hash/src/lib.rs | 5 +- crates/instruction/Cargo.toml | 4 +- crates/instruction/src/lib.rs | 9 +- crates/message/Cargo.toml | 4 +- crates/message/src/lib.rs | 12 +- crates/primitives/Cargo.toml | 7 +- crates/primitives/src/clock.rs | 2 +- crates/primitives/src/epoch_rewards.rs | 2 +- crates/primitives/src/epoch_schedule.rs | 6 +- crates/primitives/src/rent.rs | 2 +- crates/primitives/src/slot_history.rs | 2 +- crates/primitives/src/stake_history.rs | 2 +- crates/pubkey/Cargo.toml | 2 +- crates/pubkey/src/lib.rs | 2 +- crates/system-program/Cargo.toml | 2 +- crates/system-program/src/lib.rs | 2 +- crates/token/Cargo.toml | 3 +- crates/token/src/state.rs | 2 +- crates/transaction-error/src/lib.rs | 5 + tests/litesvm/clock-example/Cargo.toml | 7 +- tests/litesvm/clock-example/src/lib.rs | 13 +- 28 files changed, 1487 insertions(+), 449 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 17fda432..ed31c946 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,11 +19,17 @@ checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" [[package]] name = "agave-transaction-view" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d13ecb401f540fed3bff3fab74f29ad62979f8d30af417e1075cbf4cb8a92376" +checksum = "4778fd549144e8776fb7ac04e7dac598546f0d4cb0b25e336cb0a7d93120ddb9" dependencies = [ - "solana-sdk", + "solana-hash", + "solana-message", + "solana-packet", + "solana-pubkey", + "solana-sdk-ids", + "solana-short-vec", + "solana-signature", "solana-svm-transaction", ] @@ -40,6 +46,15 @@ dependencies = [ "zerocopy", ] +[[package]] +name = "aho-corasick" +version = "1.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" +dependencies = [ + "memchr", +] + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -72,9 +87,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.93" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c95c10ba0b00a02636238b814946408b1322d5ac4760326e6fb8ec956d85775" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "ark-bn254" @@ -236,6 +251,17 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi 0.1.19", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.4.0" @@ -298,18 +324,18 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.6.0" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" +checksum = "8f68f53c83ab957f72c32642f3868eec03eb974d1fb82e453128456482613d36" dependencies = [ "serde", ] [[package]] name = "blake3" -version = "1.5.4" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82033247fd8e890df8f740e407ad4d038debb9eb1f40533fffb32e7d17dc6f7" +checksum = "b8ee0c1824c4dea5b5f81736aff91bae041d2c07ee1192bec91054e10e3e601e" dependencies = [ "arrayref", "arrayvec", @@ -349,11 +375,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +checksum = "5430e3be710b68d984d1391c854eb431a9d548640711faa54eecb1df93db91cc" dependencies = [ - "borsh-derive 1.5.1", + "borsh-derive 1.5.5", "cfg_aliases", ] @@ -372,16 +398,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.1" +version = "1.5.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +checksum = "f8b668d39970baad5356d7c83a86fee3a539e6f93bf6764c97368243e17a0487" dependencies = [ "once_cell", "proc-macro-crate 3.2.0", "proc-macro2", "quote", "syn 2.0.87", - "syn_derive", ] [[package]] @@ -460,18 +485,18 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.19.0" +version = "1.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8334215b81e418a0a7bdb8ef0849474f40bb10c8b71f1c4ed315cff49f32494d" +checksum = "ef657dfab802224e671f5818e9a4935f9b1957ed18e58292690cc39e7a4092a3" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcfcc3cd946cb52f0bbfdbbcfa2f4e24f75ebb6c0e1002f7c25904fada18b9ec" +checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", @@ -532,9 +557,9 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.38" +version = "0.4.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" +checksum = "7e36cc9d416881d2e24f9a963be5fb1cd90966419ac844274161d10488b3e825" dependencies = [ "android-tzdata", "iana-time-zone", @@ -626,9 +651,9 @@ dependencies = [ [[package]] name = "crossbeam-channel" -version = "0.5.13" +version = "0.5.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" dependencies = [ "crossbeam-utils", ] @@ -939,6 +964,19 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "env_logger" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" +dependencies = [ + "atty", + "humantime", + "log", + "regex", + "termcolor", +] + [[package]] name = "equivalent" version = "1.0.1" @@ -1107,7 +1145,6 @@ version = "0.14.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "serde", "typenum", "version_check", ] @@ -1209,6 +1246,15 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hermit-abi" version = "0.3.9" @@ -1428,10 +1474,11 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.72" +version = "0.3.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a88f1bda2bd75b0452a14784937d796722fdebfe50df998aeb3f0b7603019a9" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" dependencies = [ + "once_cell", "wasm-bindgen", ] @@ -1576,9 +1623,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.22" +version = "0.4.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" +checksum = "04cbf5b083de1c7e0222a7a51dbfdba1cbe1c6ab0b15e29fff3f6c077fd9cd9f" [[package]] name = "memchr" @@ -1635,7 +1682,7 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ - "hermit-abi", + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", "windows-sys 0.52.0", @@ -1786,7 +1833,7 @@ version = "0.10.68" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg-if", "foreign-types", "libc", @@ -1971,34 +2018,11 @@ dependencies = [ "toml_edit", ] -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - [[package]] name = "proc-macro2" -version = "1.0.89" +version = "1.0.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f139b0662de085916d1fb67d2b4169d1addddda1919e696f3252b740b629986e" +checksum = "60946a68e5f9d28b0dc1c21bb8a97ee7d018a8b322fa57838ba31cc878e22d99" dependencies = [ "unicode-ident", ] @@ -2182,9 +2206,38 @@ version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b6dfecf2c74bce2466cabf93f6664d6998a69eb21e39f4207930065b27b771f" dependencies = [ - "bitflags 2.6.0", + "bitflags 2.8.0", +] + +[[package]] +name = "regex" +version = "1.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +dependencies = [ + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", +] + +[[package]] +name = "regex-automata" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", ] +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + [[package]] name = "reqwest" version = "0.11.27" @@ -2305,6 +2358,12 @@ dependencies = [ "untrusted", ] +[[package]] +name = "rustversion" +version = "1.0.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" + [[package]] name = "ryu" version = "1.0.18" @@ -2317,12 +2376,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "scroll" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04c565b551bafbef4157586fa379538366e4385d42082f255bfd96e4fe8519da" - [[package]] name = "sct" version = "0.7.1" @@ -2335,19 +2388,28 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.23" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "f79dfe2d285b0488816f30e700a7438c5a73d816b5b7d3ac72fbc48b0d185e03" [[package]] name = "serde" -version = "1.0.214" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f55c3193aca71c12ad7890f1785d2b73e1b9f63a0bbc353c08ef26fe03fc56b5" +checksum = "02fc4265df13d6fa1d00ecff087228cc0a2b5f3c0e87e258d8b94a156e984c70" dependencies = [ "serde_derive", ] +[[package]] +name = "serde-big-array" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11fc7cc2c76d73e0f27ee52abbd64eec84d46f370c88371120433196934e4b7f" +dependencies = [ + "serde", +] + [[package]] name = "serde_bytes" version = "0.11.15" @@ -2369,9 +2431,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.214" +version = "1.0.217" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de523f781f095e28fa605cdce0f8307e451cc0fd14e2eb4cd2e98a355b147766" +checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", @@ -2380,9 +2442,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.132" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d726bfaff4b320266d395898905d0eba0345aae23b54aee3a737e260fd46db03" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -2415,13 +2477,13 @@ dependencies = [ [[package]] name = "serde_with" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e28bdad6db2b8340e449f7108f020b3b092e8583a9e3fb82713e1d4e71fe817" +checksum = "d6b6f7f2fcb69f747921f79f3926bd1e203fce4fef62c268dd3abfb6d86029aa" dependencies = [ "serde", "serde_derive", - "serde_with_macros 3.11.0", + "serde_with_macros 3.12.0", ] [[package]] @@ -2438,9 +2500,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "3.11.0" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d846214a9854ef724f3da161b426242d8de7c1fc7de2f89bb1efcb154dca79d" +checksum = "8d00caa5193a3c8362ac2b73be6b9e768aa5a4b2f721d8f4b339600c3cb51f8e" dependencies = [ "darling 0.20.10", "proc-macro2", @@ -2545,23 +2607,27 @@ dependencies = [ [[package]] name = "solana-account" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8557558040a6bf34101ea0ded1647bafc21c2a9ea0913034fa6794a304ba6791" +checksum = "0f949fe4edaeaea78c844023bfc1c898e0b1f5a100f8a8d2d0f85d0a7b090258" dependencies = [ "bincode", "serde", "serde_bytes", "serde_derive", + "solana-account-info", + "solana-clock", "solana-instruction", - "solana-program", + "solana-pubkey", + "solana-sdk-ids", + "solana-sysvar", ] [[package]] name = "solana-account-decoder-client-types" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435bb722c456f78dd3ac33a1b4641c46d5d41de5b072422ae5b0dc9f486c0928" +checksum = "58ad44260b45eb8c75005fbe361186136e52e2cf0de2139f530295f04f9521ad" dependencies = [ "base64 0.22.1", "bs58 0.5.1", @@ -2575,9 +2641,9 @@ dependencies = [ [[package]] name = "solana-account-info" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abeb32e8dbead1f920a919d8c781fe058cf657313aa237566fa812d2288f2aab" +checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" dependencies = [ "bincode", "serde", @@ -2586,56 +2652,79 @@ dependencies = [ "solana-pubkey", ] +[[package]] +name = "solana-address-lookup-table-interface" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1673f67efe870b64a65cb39e6194be5b26527691ce5922909939961a6e6b395" +dependencies = [ + "bincode", + "bytemuck", + "serde", + "serde_derive", + "solana-clock", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-slot-hashes", +] + [[package]] name = "solana-address-lookup-table-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d2cc0e952d3fd328e156937e71b3233aa4e16e86a132b8c1d18fc7523fab8ac" +checksum = "bffd21cefb44a61a051f5f36bdb8863b619754e057099506a73cabd8716b10d4" dependencies = [ "bincode", "bytemuck", "log", "num-derive", "num-traits", + "solana-address-lookup-table-interface", + "solana-bincode", + "solana-clock", "solana-feature-set", + "solana-instruction", "solana-log-collector", - "solana-program", + "solana-packet", "solana-program-runtime", - "solana-sdk", - "thiserror 1.0.68", + "solana-pubkey", + "solana-system-interface", + "solana-transaction-context", + "thiserror 2.0.11", ] [[package]] name = "solana-atomic-u64" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ceb7242711300b8d67933a3cd1c9b2cd7c4e98de529356ecddf340c98c457d" +checksum = "d52e52720efe60465b052b9e7445a01c17550666beec855cce66f44766697bc2" dependencies = [ "parking_lot", ] [[package]] name = "solana-banks-client" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63b70516fa229d5d98c8d81580c1cce13ab8dc900d1626b8855f1882a611ba3f" +checksum = "57b8593f50e34f44ed168dccbac0a9b8e43e138ac75102dac6635fbdfff88d1e" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.5", "futures", "solana-banks-interface", "solana-program", "solana-sdk", "tarpc", - "thiserror 1.0.68", + "thiserror 2.0.11", "tokio", "tokio-serde", ] [[package]] name = "solana-banks-interface" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5bb6c5dd2b1b057fe84e39da75d2833df5e617581db45be469211c9f4d3f93a" +checksum = "414f5d83bf9aa83d5a387959d0849bd4a3df86f8b09219278f964688710faeb4" dependencies = [ "serde", "serde_derive", @@ -2643,141 +2732,275 @@ dependencies = [ "tarpc", ] +[[package]] +name = "solana-big-mod-exp" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75db7f2bbac3e62cfd139065d15bcda9e2428883ba61fc8d27ccb251081e7567" +dependencies = [ + "num-bigint 0.4.6", + "num-traits", + "solana-define-syscall", +] + [[package]] name = "solana-bincode" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e154567b6846f4721c713afdd14c56892800fb940793ef529a68d6db6cf1beef" +checksum = "19a3787b8cf9c9fe3dd360800e8b70982b9e5a8af9e11c354b6665dd4a003adc" dependencies = [ "bincode", "serde", "solana-instruction", ] +[[package]] +name = "solana-blake3-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1a0801e25a1b31a14494fc80882a036be0ffd290efc4c2d640bfcca120a4672" +dependencies = [ + "blake3", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", +] + [[package]] name = "solana-bn254" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c42ad3282999ef7df859e7ed03a6e6a4187ff4931f9814ddcd0477dba2be15" +checksum = "9abc69625158faaab02347370b91c0d8e0fe347bf9287239f0fbe8f5864d91da" dependencies = [ "ark-bn254", "ark-ec", "ark-ff", "ark-serialize", "bytemuck", - "solana-program", - "thiserror 1.0.68", + "solana-define-syscall", + "thiserror 2.0.11", ] [[package]] name = "solana-borsh" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b2428671e99134c97990d2b466c33779f785376b7934e6bddb635929c54208f" +checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" dependencies = [ "borsh 0.10.4", - "borsh 1.5.1", + "borsh 1.5.5", ] [[package]] name = "solana-bpf-loader-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "218c92ff828511a7bde330ccb39167fbc35d99d9b6ec22b06e265e498f747a47" +checksum = "f452bd2217eb46f24a828c7408c9e4fef2cc1767656560ca26006e20febf4068" dependencies = [ "bincode", - "byteorder", "libsecp256k1", - "log", + "qualifier_attr", "scopeguard", + "solana-account", + "solana-account-info", + "solana-big-mod-exp", + "solana-bincode", + "solana-blake3-hasher", "solana-bn254", + "solana-clock", "solana-compute-budget", + "solana-cpi", "solana-curve25519", "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", + "solana-loader-v3-interface", + "solana-loader-v4-interface", "solana-log-collector", "solana-measure", + "solana-packet", "solana-poseidon", + "solana-precompiles", + "solana-program-entrypoint", "solana-program-memory", "solana-program-runtime", - "solana-sdk", + "solana-pubkey", + "solana-sbpf", + "solana-sdk-ids", + "solana-secp256k1-recover", + "solana-sha256-hasher", + "solana-stable-layout", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", "solana-timings", + "solana-transaction-context", "solana-type-overrides", - "solana_rbpf", - "thiserror 1.0.68", + "thiserror 2.0.11", ] [[package]] name = "solana-builtins-default-costs" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdfdc2e225ad54ffbf9f309d2d0ea8f8f1043aed5da97189b0a54f426c4e328" +checksum = "aff717901cb7ed2ae65a69994d2e758b0468e84d460e60a793a0c862a2c254bc" dependencies = [ "ahash", "lazy_static", "log", + "qualifier_attr", "solana-address-lookup-table-program", "solana-bpf-loader-program", "solana-compute-budget-program", "solana-config-program", + "solana-feature-set", "solana-loader-v4-program", - "solana-sdk", + "solana-pubkey", + "solana-sdk-ids", "solana-stake-program", "solana-system-program", "solana-vote-program", ] +[[package]] +name = "solana-client-traits" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83f0071874e629f29e0eb3dab8a863e98502ac7aba55b7e0df1803fc5cac72a7" +dependencies = [ + "solana-account", + "solana-commitment-config", + "solana-epoch-info", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-message", + "solana-pubkey", + "solana-signature", + "solana-signer", + "solana-system-interface", + "solana-transaction", + "solana-transaction-error", +] + [[package]] name = "solana-clock" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d639043cefcd061c31a342364adcb204406ebbd91ef86dfde88b74352b688cf" +checksum = "67c2177a1b9fe8326004f1151a5acd124420b737811080b1035df31349e4d892" dependencies = [ "serde", "serde_derive", + "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] +[[package]] +name = "solana-cluster-type" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ace9fea2daa28354d107ea879cff107181d85cd4e0f78a2bedb10e1a428c97e" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", +] + +[[package]] +name = "solana-commitment-config" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac49c4dde3edfa832de1697e9bcdb7c3b3f7cb7a1981b7c62526c8bb6700fb73" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "solana-compute-budget" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6c885192c0afe6f7beac13e1c8eb51ce36bc60e8f0b7631f9cbf72d8ca6aa03" +checksum = "57e9b1dc0a5a63ea68e08ff2cac13c92e86cfe8e6c31421dd795e8c3df78de39" dependencies = [ - "solana-sdk", + "solana-fee-structure", + "solana-program-entrypoint", +] + +[[package]] +name = "solana-compute-budget-instruction" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c66d536fe93ff372340151b053d003f9d2a0d695c65fd28c11224f629a5e1da7" +dependencies = [ + "log", + "solana-borsh", + "solana-builtins-default-costs", + "solana-compute-budget", + "solana-compute-budget-interface", + "solana-feature-set", + "solana-instruction", + "solana-packet", + "solana-pubkey", + "solana-sdk-ids", + "solana-svm-transaction", + "solana-transaction-error", + "thiserror 2.0.11", +] + +[[package]] +name = "solana-compute-budget-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a5df17b195d312b66dccdde9beec6709766d8230cb4718c4c08854f780d0309" +dependencies = [ + "borsh 1.5.5", + "serde", + "serde_derive", + "solana-instruction", + "solana-sdk-ids", ] [[package]] name = "solana-compute-budget-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be993c935cd4f7f45bb28e3c9b258e0b7d3ec38112d9c9b2b6ca64f488a83cf3" +checksum = "4cd0daef640520980f40b578367dd4ca1181e592b36b4959c04f13a617701ac6" dependencies = [ + "qualifier_attr", "solana-program-runtime", - "solana-sdk", ] [[package]] name = "solana-config-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056ce3a28f5e22677e0db1fc976294041571c4d471a752bfc9f1b06f8828c488" +checksum = "e0f6a00ecb0eb3e4c68186a26216deb6c2376929f235fc9f3fd59e5745df937a" dependencies = [ "bincode", "chrono", "serde", "serde_derive", + "solana-account", + "solana-bincode", + "solana-instruction", "solana-log-collector", + "solana-packet", "solana-program-runtime", - "solana-sdk", + "solana-pubkey", + "solana-sdk-ids", "solana-short-vec", + "solana-stake-interface", + "solana-system-interface", + "solana-transaction-context", ] [[package]] name = "solana-cpi" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b87b387931f41422be3d82190e29c8414bbb4e8517dd94afb838012260d7a60" +checksum = "8dc71126edddc2ba014622fc32d0f5e2e78ec6c5a1e0eb511b85618c09e9ea11" dependencies = [ "solana-account-info", "solana-define-syscall", @@ -2789,37 +3012,38 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b91a6c7db7874ab0721ba2ad49c34614c6af5bfa1a02f18ee471d28416b1fc" +checksum = "28e46b297431ab5a67b99d9aba1e7cff16105e4d44e1c0b92c916935d86b2424" dependencies = [ "bytemuck", "bytemuck_derive", "curve25519-dalek 4.1.3", - "solana-program", - "thiserror 1.0.68", + "solana-define-syscall", + "subtle", + "thiserror 2.0.11", ] [[package]] name = "solana-decode-error" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b93163519c0b7419d3ac206207594d4b43e00267496996b898345ff3b31ed1" +checksum = "10a6a6383af236708048f8bd8d03db8ca4ff7baf4a48e5d580f4cce545925470" dependencies = [ "num-traits", ] [[package]] name = "solana-define-syscall" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1b215d56d29f71782df6880d71b5a46cf9a4035046414488c7de6906899ba" +checksum = "cf784bb2cb3e02cac9801813c30187344228d2ae952534902108f6150573a33d" [[package]] name = "solana-derivation-path" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31edf5d285689b469471a1a0200f0c9196be7df155860bd83dfd735439172bd" +checksum = "939756d798b25c5ec3cca10e06212bdca3b1443cb9bb740a38124f58b258737b" dependencies = [ "derivation-path", "qstring", @@ -2827,25 +3051,116 @@ dependencies = [ ] [[package]] -name = "solana-epoch-schedule" -version = "2.1.10" +name = "solana-ed25519-program" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88aa6588f178c32258eb616ef1428f2c86beae370d6486843313f6320e055190" +checksum = "0c0c4dfce08d71d8f1e9b7d1b4e2c7101a8109903ad481acbbc1119a73d459f2" dependencies = [ - "serde", - "serde_derive", - "solana-sdk-macro", - "solana-sysvar-id", + "bytemuck", + "bytemuck_derive", + "ed25519-dalek", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", + "solana-sdk-ids", ] [[package]] -name = "solana-feature-set" -version = "2.1.10" +name = "solana-epoch-info" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1736c5f6cb5d65e684a1daf425dd1479849e0793ffe877feedb602642ee5deb0" +checksum = "90ef6f0b449290b0b9f32973eefd95af35b01c5c0c34c569f936c34c5b20d77b" dependencies = [ - "lazy_static", - "solana-clock", + "serde", + "serde_derive", +] + +[[package]] +name = "solana-epoch-rewards" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b575d3dd323b9ea10bb6fe89bf6bf93e249b215ba8ed7f68f1a3633f384db7" +dependencies = [ + "serde", + "serde_derive", + "solana-hash", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-epoch-rewards-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96c5fd2662ae7574810904585fd443545ed2b568dbd304b25a31e79ccc76e81b" +dependencies = [ + "siphasher", + "solana-hash", + "solana-pubkey", +] + +[[package]] +name = "solana-epoch-schedule" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fce071fbddecc55d727b1d7ed16a629afe4f6e4c217bc8d00af3b785f6f67ed" +dependencies = [ + "serde", + "serde_derive", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-sysvar-id", +] + +[[package]] +name = "solana-example-mocks" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84461d56cbb8bb8d539347151e0525b53910102e4bced875d49d5139708e39d3" +dependencies = [ + "serde", + "serde_derive", + "solana-address-lookup-table-interface", + "solana-clock", + "solana-hash", + "solana-instruction", + "solana-keccak-hasher", + "solana-message", + "solana-nonce", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "thiserror 2.0.11", +] + +[[package]] +name = "solana-feature-gate-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f9c7fbf3e58b64a667c5f35e90af580538a95daea7001ff7806c0662d301bdf" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-account", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-system-interface", +] + +[[package]] +name = "solana-feature-set" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e1d3b52b4a014efeaaab67f14e40af3972a4be61c523d612860db8e3145529" +dependencies = [ + "ahash", + "lazy_static", "solana-epoch-schedule", "solana-hash", "solana-pubkey", @@ -2854,32 +3169,86 @@ dependencies = [ [[package]] name = "solana-fee" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da6b19e38f75d3c82b9e4b460bcd366ae1ad5c85f824a1f9080e4baed7ee49d9" +checksum = "91e7af7739e65896d4ac160230949dce021c9ee8c1ce26cb13bebbec01cd9c95" dependencies = [ - "solana-sdk", + "solana-feature-set", + "solana-fee-structure", "solana-svm-transaction", ] [[package]] name = "solana-fee-calculator" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ef28a47c3fcfd4ef8b19468531e32a431f6589f359cdbb927fc5e7fb859413" +checksum = "d89bc408da0fb3812bc3008189d148b4d3e08252c79ad810b245482a3f70cd8d" dependencies = [ "log", "serde", "serde_derive", ] +[[package]] +name = "solana-fee-structure" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f45f94a88efdb512805563181dfa1c85c60a21b6e6d602bf24a2ea88f9399d6e" +dependencies = [ + "serde", + "serde_derive", + "solana-message", + "solana-native-token", +] + +[[package]] +name = "solana-genesis-config" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "968dabd2b92d57131473eddbd475339da530e14f54397386abf303de3a2595a2" +dependencies = [ + "bincode", + "chrono", + "memmap2", + "serde", + "serde_derive", + "solana-account", + "solana-clock", + "solana-cluster-type", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash", + "solana-inflation", + "solana-keypair", + "solana-logger", + "solana-native-token", + "solana-poh-config", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-sha256-hasher", + "solana-shred-version", + "solana-signer", + "solana-time-utils", +] + +[[package]] +name = "solana-hard-forks" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c28371f878e2ead55611d8ba1b5fb879847156d04edea13693700ad1a28baf" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "solana-hash" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad865143587f6173d0bd15ec66b749fd2682c865467ffd2bb725705e33f0c8fa" +checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.5", "bs58 0.5.1", "bytemuck", "bytemuck_derive", @@ -2893,9 +3262,9 @@ dependencies = [ [[package]] name = "solana-inflation" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a205cb59db7fa1afc89ad5d960ac5afb997ba231cdc943451811746c84b7776d" +checksum = "23eef6a09eb8e568ce6839573e4966850e85e9ce71e6ae1a6c930c1c43947de3" dependencies = [ "serde", "serde_derive", @@ -2903,9 +3272,9 @@ dependencies = [ [[package]] name = "solana-inline-spl" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47d825ad3f7d3eede036d2c3b11eb385912eb3e01872bc98901802f942eab8a" +checksum = "f623a26022a600a64fc233412808d79c5a135952eee643c127c4b42aa089b8aa" dependencies = [ "bytemuck", "solana-pubkey", @@ -2913,12 +3282,12 @@ dependencies = [ [[package]] name = "solana-instruction" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af795f16bef3ae76e97978e35724ea88d2b9eba67a9e233adf48ccefeaa6e6b8" +checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" dependencies = [ "bincode", - "borsh 1.5.1", + "borsh 1.5.5", "getrandom 0.2.15", "js-sys", "num-traits", @@ -2929,166 +3298,388 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "solana-instructions-sysvar" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "427f2d0d6dc0bb49f16cef5e7f975180d2e80aab9bdd3b2af68e2d029ec63f43" +dependencies = [ + "bitflags 2.8.0", + "solana-account-info", + "solana-instruction", + "solana-program-error", + "solana-pubkey", + "solana-sanitize", + "solana-sdk-ids", + "solana-serialize-utils", + "solana-sysvar-id", +] + +[[package]] +name = "solana-keccak-hasher" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7aeb957fbd42a451b99235df4942d96db7ef678e8d5061ef34c9b34cae12f79" +dependencies = [ + "sha3", + "solana-define-syscall", + "solana-hash", + "solana-sanitize", +] + +[[package]] +name = "solana-keypair" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3dbb7042c2e0c561afa07242b2099d55c57bd1b1da3b6476932197d84e15e3e4" +dependencies = [ + "bs58 0.5.1", + "ed25519-dalek", + "ed25519-dalek-bip32", + "rand 0.7.3", + "solana-derivation-path", + "solana-pubkey", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-signature", + "solana-signer", + "wasm-bindgen", +] + [[package]] name = "solana-last-restart-slot" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c8171167f1fd4ef1e5a083fd0e8f35ac60aacd1ffe163a1ef7053a28524be" +checksum = "4a6360ac2fdc72e7463565cd256eedcf10d7ef0c28a1249d261ec168c1b55cdd" dependencies = [ "serde", "serde_derive", + "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] +[[package]] +name = "solana-loader-v2-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8ab08006dad78ae7cd30df8eea0539e207d08d91eaefb3e1d49a446e1c49654" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", +] + +[[package]] +name = "solana-loader-v3-interface" +version = "3.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fa4be76cfa9afd84ca2f35ebc09f0da0f0092935ccdac0595d98447f259538c2" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", +] + +[[package]] +name = "solana-loader-v4-interface" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "706a777242f1f39a83e2a96a2a6cb034cb41169c6ecbee2cf09cb873d9659e7e" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", +] + [[package]] name = "solana-loader-v4-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c05b2eba16f1c9a878c30f58e6e03e4f42fd48ebb83cac67b8ea656967e91849" +checksum = "885258f9506b74d0bd72aea1b8c0492e2f28af625fba914b07cd7ca892d38465" dependencies = [ "log", + "qualifier_attr", + "solana-account", + "solana-bincode", "solana-bpf-loader-program", "solana-compute-budget", + "solana-instruction", + "solana-loader-v3-interface", + "solana-loader-v4-interface", "solana-log-collector", "solana-measure", + "solana-packet", "solana-program-runtime", - "solana-sdk", + "solana-pubkey", + "solana-sbpf", + "solana-sdk-ids", + "solana-transaction-context", "solana-type-overrides", - "solana_rbpf", ] [[package]] name = "solana-log-collector" -version = "2.1.10" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05db948a307b55c553f6b8a23439b4be619a65552ffc4c88caa5d7dd4bd53001" +dependencies = [ + "log", +] + +[[package]] +name = "solana-logger" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7922b879e4c03e00bf6ed21b1f8579ac71f6743d95c22306bd1ba8994e4f90e8" +checksum = "593dbcb81439d37b02757e90bd9ab56364de63f378c55db92a6fbd6a2e47ab36" dependencies = [ + "env_logger", + "lazy_static", "log", ] [[package]] name = "solana-measure" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208871c6d000a0c7b7546ae605934f5eda3745f80f6926da1b6097c08f2de2" +checksum = "504bfa21b291ad23edf2a9499929b653004f8585acbd32ee1ce186403a2d092d" + +[[package]] +name = "solana-message" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "268486ba8a294ed22a4d7c1ec05f540c3dbe71cfa7c6c54b6d4d13668d895678" +dependencies = [ + "bincode", + "blake3", + "lazy_static", + "serde", + "serde_derive", + "solana-bincode", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-system-interface", + "solana-transaction-error", + "wasm-bindgen", +] [[package]] name = "solana-metrics" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "555986e126fe32ad94217c5d87c94f79b7f13abf96ef9d8de20dacbcf1c407e5" +checksum = "77daa9b73989b40c5e3c6ab9c8b9a9aa6facf209db8743dd37834975355baf53" dependencies = [ "crossbeam-channel", "gethostname", "lazy_static", "log", "reqwest", - "solana-sdk", - "thiserror 1.0.68", + "solana-clock", + "solana-cluster-type", + "solana-sha256-hasher", + "solana-time-utils", + "thiserror 2.0.11", ] [[package]] name = "solana-msg" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aefec09cb47fb67b8f8c448e03491d4148c1749f27dcb74d1cfae6337695f94" +checksum = "f36a1a14399afaabc2781a1db09cb14ee4cc4ee5c7a5a3cfcc601811379a8092" dependencies = [ "solana-define-syscall", ] [[package]] name = "solana-native-token" -version = "2.1.10" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33e9de00960197412e4be3902a6cd35e60817c511137aca6c34c66cd5d4017ec" + +[[package]] +name = "solana-nonce" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "703e22eb185537e06204a5bd9d509b948f0066f2d1d814a6f475dafb3ddf1325" +dependencies = [ + "serde", + "serde_derive", + "solana-fee-calculator", + "solana-hash", + "solana-pubkey", + "solana-sha256-hasher", +] + +[[package]] +name = "solana-nonce-account" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cde971a20b8dbf60144d6a84439dda86b5466e00e2843091fe731083cda614da" +dependencies = [ + "solana-account", + "solana-hash", + "solana-nonce", + "solana-sdk-ids", +] + +[[package]] +name = "solana-offchain-message" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81520eff9f776e62faa36a07250fcc467e54ca31ca9c87ab566a88b2f2691c05" +checksum = "b526398ade5dea37f1f147ce55dae49aa017a5d7326606359b0445ca8d946581" +dependencies = [ + "num_enum", + "solana-hash", + "solana-packet", + "solana-pubkey", + "solana-sanitize", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", +] [[package]] name = "solana-packet" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8c6e8a2cb0839ef49d8c6e34e89a5bc5ed97da855bf49528bae8c57eb39ed" +checksum = "004f2d2daf407b3ec1a1ca5ec34b3ccdfd6866dd2d3c7d0715004a96e4b6d127" dependencies = [ "bincode", - "bitflags 2.6.0", + "bitflags 2.8.0", "cfg_eval", "serde", "serde_derive", - "serde_with 3.11.0", + "serde_with 3.12.0", +] + +[[package]] +name = "solana-poh-config" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d650c3b4b9060082ac6b0efbbb66865089c58405bfb45de449f3f2b91eccee75" +dependencies = [ + "serde", + "serde_derive", ] [[package]] name = "solana-poseidon" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d191667d1a5e072cf5da65f2f83a6cdbdf371dc1c40542ac56e5fd59753ade" +checksum = "360635ce7e20eec1cf9b400d2d962580bca34562bee8e0a34825f26565a4f5ea" dependencies = [ "ark-bn254", "light-poseidon", "solana-define-syscall", - "thiserror 1.0.68", + "thiserror 2.0.11", ] [[package]] name = "solana-precompile-error" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c01aefc15c451b4f573c1e4552f34ee8af53db285ee2f7ece17ef8b70d6c0a" +checksum = "4ff64daa2933c22982b323d88d0cdf693201ef56ac381ae16737fd5f579e07d6" dependencies = [ "num-traits", "solana-decode-error", ] +[[package]] +name = "solana-precompiles" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a460ab805ec063802105b463ecb5eb02c3ffe469e67a967eea8a6e778e0bc06" +dependencies = [ + "lazy_static", + "solana-ed25519-program", + "solana-feature-set", + "solana-message", + "solana-precompile-error", + "solana-pubkey", + "solana-sdk-ids", + "solana-secp256k1-program", + "solana-secp256r1-program", +] + +[[package]] +name = "solana-presigner" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81a57a24e6a4125fc69510b6774cd93402b943191b6cddad05de7281491c90fe" +dependencies = [ + "solana-pubkey", + "solana-signature", + "solana-signer", +] + [[package]] name = "solana-program" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a72c5eafd348bc5e5b731b40ad8dfde3023632e34e5ca9e52a655266ffae7" +checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" dependencies = [ - "base64 0.22.1", "bincode", - "bitflags 2.6.0", "blake3", "borsh 0.10.4", - "borsh 1.5.1", + "borsh 1.5.5", "bs58 0.5.1", - "bv", "bytemuck", - "bytemuck_derive", "console_error_panic_hook", "console_log", - "curve25519-dalek 4.1.3", - "five8_const", "getrandom 0.2.15", - "js-sys", "lazy_static", "log", "memoffset", "num-bigint 0.4.6", "num-derive", "num-traits", - "parking_lot", "rand 0.8.5", "serde", "serde_bytes", "serde_derive", - "sha2 0.10.8", - "sha3", "solana-account-info", + "solana-address-lookup-table-interface", "solana-atomic-u64", + "solana-big-mod-exp", "solana-bincode", + "solana-blake3-hasher", "solana-borsh", "solana-clock", "solana-cpi", "solana-decode-error", "solana-define-syscall", + "solana-epoch-rewards", "solana-epoch-schedule", + "solana-example-mocks", + "solana-feature-gate-interface", "solana-fee-calculator", "solana-hash", "solana-instruction", + "solana-instructions-sysvar", + "solana-keccak-hasher", "solana-last-restart-slot", + "solana-loader-v2-interface", + "solana-loader-v3-interface", + "solana-loader-v4-interface", + "solana-message", "solana-msg", "solana-native-token", + "solana-nonce", "solana-program-entrypoint", "solana-program-error", "solana-program-memory", @@ -3097,6 +3688,7 @@ dependencies = [ "solana-pubkey", "solana-rent", "solana-sanitize", + "solana-sdk-ids", "solana-sdk-macro", "solana-secp256k1-recover", "solana-serde-varint", @@ -3106,17 +3698,20 @@ dependencies = [ "solana-slot-hashes", "solana-slot-history", "solana-stable-layout", + "solana-stake-interface", + "solana-system-interface", + "solana-sysvar", "solana-sysvar-id", - "solana-transaction-error", - "thiserror 1.0.68", + "solana-vote-interface", + "thiserror 2.0.11", "wasm-bindgen", ] [[package]] name = "solana-program-entrypoint" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269ccabf1f3aff504a97aca0f8b72e6d3e1b7fb621cc18a2d21a28b17d52e112" +checksum = "473ffe73c68d93e9f2aa726ad2985fe52760052709aaab188100a42c618060ec" dependencies = [ "solana-account-info", "solana-msg", @@ -3126,11 +3721,11 @@ dependencies = [ [[package]] name = "solana-program-error" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f7a81eeb5c3d44b2953c46215af390ca2951a0b8069836ffbf3d368b012b35" +checksum = "d8ae2c1a8d0d4ae865882d5770a7ebca92bab9c685e43f0461682c6c05a35bfa" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.5", "num-traits", "serde", "serde_derive", @@ -3142,9 +3737,9 @@ dependencies = [ [[package]] name = "solana-program-memory" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1debcdd14cee4dbc2761c1e267e8888188fb469956df0e2144cd6e2962c2532a" +checksum = "1b0268f6c89825fb634a34bd0c3b8fdaeaecfc3728be1d622a8ee6dd577b60d4" dependencies = [ "num-traits", "solana-define-syscall", @@ -3152,57 +3747,68 @@ dependencies = [ [[package]] name = "solana-program-option" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b49ce216cce72eb0607610d2040b1979d999fe204f73ae2a669c2f4480d3c0" +checksum = "dc677a2e9bc616eda6dbdab834d463372b92848b2bfe4a1ed4e4b4adba3397d0" [[package]] name = "solana-program-pack" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ff47a5dd9881187e85a45641405d9d1c57e9ebdc813e2ff74a1aa1f1ec9042" +checksum = "319f0ef15e6e12dc37c597faccb7d62525a509fec5f6975ecb9419efddeb277b" dependencies = [ "solana-program-error", ] [[package]] name = "solana-program-runtime" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d4647f4dfed31aaa307d8c4924fec3fc981e88dd340eec45273afa84f3d01a4" +checksum = "ef8ce68ce0f2777490a7ca3662d1c793e1dd5a400c9772514025185838fc5162" dependencies = [ "base64 0.22.1", "bincode", "enum-iterator", "itertools 0.12.1", - "libc", "log", - "num-derive", - "num-traits", "percentage", "rand 0.8.5", "serde", + "solana-account", + "solana-clock", "solana-compute-budget", + "solana-epoch-rewards", + "solana-epoch-schedule", "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-last-restart-slot", "solana-log-collector", "solana-measure", "solana-metrics", - "solana-sdk", + "solana-precompiles", + "solana-pubkey", + "solana-rent", + "solana-sbpf", + "solana-sdk-ids", + "solana-slot-hashes", + "solana-stable-layout", + "solana-sysvar", + "solana-sysvar-id", "solana-timings", + "solana-transaction-context", "solana-type-overrides", - "solana-vote", - "solana_rbpf", - "thiserror 1.0.68", + "thiserror 2.0.11", ] [[package]] name = "solana-pubkey" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02016ff5f98314c886e219c023bffba188ad8d70dec007247bd7a9da50423ac0" +checksum = "40db1ff5a0f8aea2c158d78ab5f2cf897848964251d1df42fef78efd3c85b863" dependencies = [ "borsh 0.10.4", - "borsh 1.5.1", + "borsh 1.5.5", "bs58 0.5.1", "bytemuck", "bytemuck_derive", @@ -3222,23 +3828,82 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "solana-quic-definitions" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e606feac5110eb5d8afaa43ccaeea3ec49ccec36773387930b5ba545e745aea2" +dependencies = [ + "solana-keypair", +] + [[package]] name = "solana-rent" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "544fab48aacd3b9c740ef5206f30e8a44ef8bfe5676a9d7b1eed385265ec1265" +checksum = "d1aea8fdea9de98ca6e8c2da5827707fb3842833521b528a713810ca685d2480" dependencies = [ "serde", "serde_derive", + "solana-sdk-ids", "solana-sdk-macro", "solana-sysvar-id", ] +[[package]] +name = "solana-rent-collector" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c1e19f5d5108b0d824244425e43bc78bbb9476e2199e979b0230c9f632d3bf4" +dependencies = [ + "serde", + "serde_derive", + "solana-account", + "solana-clock", + "solana-epoch-schedule", + "solana-genesis-config", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", +] + +[[package]] +name = "solana-rent-debits" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4f6f9113c6003492e74438d1288e30cffa8ccfdc2ef7b49b9e816d8034da18cd" +dependencies = [ + "solana-pubkey", + "solana-reward-info", +] + +[[package]] +name = "solana-reserved-account-keys" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b293f4246626c0e0a991531f08848a713ada965612e99dc510963f04d12cae7" +dependencies = [ + "lazy_static", + "solana-feature-set", + "solana-pubkey", + "solana-sdk-ids", +] + +[[package]] +name = "solana-reward-info" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18205b69139b1ae0ab8f6e11cdcb627328c0814422ad2482000fa2ca54ae4a2f" +dependencies = [ + "serde", + "serde_derive", +] + [[package]] name = "solana-rpc-client-api" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a50f6a180457400c9843980f1dd5db32b1153c295005ca85edb84bb7625acae" +checksum = "80ce7f8565fc928d04ae56d69423b514c2e41566b48e828b868355c7034de4b7" dependencies = [ "anyhow", "base64 0.22.1", @@ -3250,105 +3915,150 @@ dependencies = [ "serde", "serde_derive", "serde_json", + "solana-account", "solana-account-decoder-client-types", + "solana-clock", + "solana-commitment-config", + "solana-fee-calculator", + "solana-inflation", "solana-inline-spl", - "solana-sdk", + "solana-pubkey", + "solana-signer", + "solana-transaction-error", "solana-transaction-status-client-types", "solana-version", - "thiserror 1.0.68", + "thiserror 2.0.11", ] [[package]] name = "solana-runtime-transaction" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65d1100f9cd3ed91c84e814468f439512cc6c7afab35ccb190e300ba03bbdcfb" +checksum = "053c37fec5b3d291b382a6b21aac6df461da8cc2d733b3d095596129a78d72f7" dependencies = [ "agave-transaction-view", "log", - "solana-builtins-default-costs", "solana-compute-budget", + "solana-compute-budget-instruction", + "solana-hash", + "solana-message", "solana-pubkey", - "solana-sdk", + "solana-sdk-ids", + "solana-signature", "solana-svm-transaction", - "thiserror 1.0.68", + "solana-transaction", + "solana-transaction-error", + "thiserror 2.0.11", ] [[package]] name = "solana-sanitize" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9677531dd4098d078515c66d69a04bfa0389d364a5c768561c719030b368a9db" +checksum = "61f1bc1357b8188d9c4a3af3fc55276e56987265eb7ad073ae6f8180ee54cecf" + +[[package]] +name = "solana-sbpf" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66a3ce7a0f4d6830124ceb2c263c36d1ee39444ec70146eb49b939e557e72b96" +dependencies = [ + "byteorder", + "combine", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "thiserror 1.0.68", + "winapi", +] [[package]] name = "solana-sdk" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf93cfd5f5af23b59789eba96b6a6afd92a3a18a3fc6652259bfa1f32743caf4" +checksum = "4808e8d7f3c931657e615042d4176b423e66f64dc99e3dc3c735a197e512029b" dependencies = [ "bincode", - "bitflags 2.6.0", - "borsh 1.5.1", "bs58 0.5.1", - "bytemuck", - "bytemuck_derive", - "byteorder", - "chrono", - "digest 0.10.7", - "ed25519-dalek", - "ed25519-dalek-bip32", "getrandom 0.1.16", - "hmac 0.12.1", - "itertools 0.12.1", "js-sys", - "lazy_static", - "libsecp256k1", - "log", - "memmap2", - "num-derive", - "num-traits", - "num_enum", - "pbkdf2", - "rand 0.7.3", - "rand 0.8.5", "serde", - "serde_bytes", - "serde_derive", "serde_json", - "serde_with 3.11.0", - "sha2 0.10.8", - "sha3", - "siphasher", "solana-account", "solana-bn254", + "solana-client-traits", + "solana-cluster-type", + "solana-commitment-config", + "solana-compute-budget-interface", "solana-decode-error", "solana-derivation-path", + "solana-ed25519-program", + "solana-epoch-info", + "solana-epoch-rewards-hasher", "solana-feature-set", + "solana-fee-structure", + "solana-genesis-config", + "solana-hard-forks", "solana-inflation", "solana-instruction", + "solana-keypair", + "solana-message", "solana-native-token", + "solana-nonce-account", + "solana-offchain-message", "solana-packet", + "solana-poh-config", "solana-precompile-error", + "solana-precompiles", + "solana-presigner", "solana-program", "solana-program-memory", "solana-pubkey", + "solana-quic-definitions", + "solana-rent-collector", + "solana-rent-debits", + "solana-reserved-account-keys", + "solana-reward-info", "solana-sanitize", + "solana-sdk-ids", "solana-sdk-macro", + "solana-secp256k1-program", "solana-secp256k1-recover", "solana-secp256r1-program", + "solana-seed-derivable", + "solana-seed-phrase", + "solana-serde", "solana-serde-varint", "solana-short-vec", + "solana-shred-version", "solana-signature", + "solana-signer", + "solana-system-transaction", + "solana-time-utils", + "solana-transaction", + "solana-transaction-context", "solana-transaction-error", - "thiserror 1.0.68", + "solana-validator-exit", + "thiserror 2.0.11", "wasm-bindgen", ] +[[package]] +name = "solana-sdk-ids" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5d8b9cc68d5c88b062a33e23a6466722467dde0035152d8fb1afbcdf350a5f" +dependencies = [ + "solana-pubkey", +] + [[package]] name = "solana-sdk-macro" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bded40f70accbe97030e5f7163017605e51a2631425229ec2b0a4339bd1163a" +checksum = "86280da8b99d03560f6ab5aca9de2e38805681df34e0bb8f238e69b29433b9df" dependencies = [ "bs58 0.5.1", "proc-macro2", @@ -3356,46 +4066,93 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "solana-secp256k1-program" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0a1caa972414cc78122c32bdae65ac5fe89df7db598585a5cde19d16a20280a" +dependencies = [ + "bincode", + "digest 0.10.7", + "libsecp256k1", + "serde", + "serde_derive", + "sha3", + "solana-feature-set", + "solana-instruction", + "solana-precompile-error", + "solana-sdk-ids", +] + [[package]] name = "solana-secp256k1-recover" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee25b962814dec3c141e8182474046bae231f0521ed62c9bfdfb6722999ddc18" +checksum = "baa3120b6cdaa270f39444f5093a90a7b03d296d362878f7a6991d6de3bbe496" dependencies = [ - "borsh 1.5.1", + "borsh 1.5.5", "libsecp256k1", "solana-define-syscall", - "thiserror 1.0.68", + "thiserror 2.0.11", ] [[package]] name = "solana-secp256r1-program" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec53eff8861ab398b9ca4da7ef8c8da5d4170f8ea26557fc1581638b56326c1" +checksum = "c9ea9282950921611bd9e0200da7236fbb1d4f8388942f8451bd55e9f3cb228f" dependencies = [ "bytemuck", "openssl", "solana-feature-set", "solana-instruction", "solana-precompile-error", - "solana-pubkey", + "solana-sdk-ids", +] + +[[package]] +name = "solana-seed-derivable" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3beb82b5adb266c6ea90e5cf3967235644848eac476c5a1f2f9283a143b7c97f" +dependencies = [ + "solana-derivation-path", +] + +[[package]] +name = "solana-seed-phrase" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36187af2324f079f65a675ec22b31c24919cb4ac22c79472e85d819db9bbbc15" +dependencies = [ + "hmac 0.12.1", + "pbkdf2", + "sha2 0.10.8", +] + +[[package]] +name = "solana-serde" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1931484a408af466e14171556a47adaa215953c7f48b24e5f6b0282763818b04" +dependencies = [ + "serde", ] [[package]] name = "solana-serde-varint" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff77c37cb995cc53ce1a4b78e5e9961957098677de6fdc6a4783ed37a8b0fcd" +checksum = "bcc07d00200d82e6def2f7f7a45738e3406b17fe54a18adcf0defa16a97ccadb" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a10eb6e3177828145beaba85d352a4dbc47798fd95c5f86145e1a732684d6d" +checksum = "817a284b63197d2b27afdba829c5ab34231da4a9b4e763466a003c40ca4f535e" dependencies = [ "solana-instruction", "solana-pubkey", @@ -3404,9 +4161,9 @@ dependencies = [ [[package]] name = "solana-sha256-hasher" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c4229293979bf8bda7db2243ae75e13695341375577a4c44b07e4f0b7a5d9e" +checksum = "0037386961c0d633421f53560ad7c80675c0447cba4d1bb66d60974dd486c7ea" dependencies = [ "sha2 0.10.8", "solana-define-syscall", @@ -3415,168 +4172,374 @@ dependencies = [ [[package]] name = "solana-short-vec" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a2a88d56e6771329970059bcab0fde9a719c8edae173fb26b2c08e427495a" +checksum = "5c54c66f19b9766a56fa0057d060de8378676cb64987533fa088861858fc5a69" dependencies = [ "serde", ] +[[package]] +name = "solana-shred-version" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "afd3db0461089d1ad1a78d9ba3f15b563899ca2386351d38428faa5350c60a98" +dependencies = [ + "solana-hard-forks", + "solana-hash", + "solana-sha256-hasher", +] + [[package]] name = "solana-signature" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e8a078879d8430cdfbee8e3c1cdf17da74c19d304662580fc463dc91e17699" +checksum = "47d251c8f3dc015f320b4161daac7f108156c837428e5a8cc61136d25beb11d6" dependencies = [ "bs58 0.5.1", "ed25519-dalek", - "generic-array", "rand 0.8.5", "serde", + "serde-big-array", "serde_derive", "solana-sanitize", ] +[[package]] +name = "solana-signer" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c41991508a4b02f021c1342ba00bcfa098630b213726ceadc7cb032e051975b" +dependencies = [ + "solana-pubkey", + "solana-signature", + "solana-transaction-error", +] + [[package]] name = "solana-slot-hashes" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88fa2a6e60f2d7016cf95429e0f60cf4a04d4eed167abd1a5f8b08cbda695893" +checksum = "0c8691982114513763e88d04094c9caa0376b867a29577939011331134c301ce" dependencies = [ "serde", "serde_derive", "solana-hash", + "solana-sdk-ids", "solana-sysvar-id", ] [[package]] name = "solana-slot-history" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fa66272c308c39a3ce1ca2a9c422de4bdedc28cfe706d6f2c68727bb626eb7" +checksum = "97ccc1b2067ca22754d5283afb2b0126d61eae734fc616d23871b0943b0d935e" dependencies = [ "bv", "serde", "serde_derive", + "solana-sdk-ids", "solana-sysvar-id", ] [[package]] name = "solana-stable-layout" -version = "2.1.10" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f14f7d02af8f2bc1b5efeeae71bc1c2b7f0f65cd75bcc7d8180f2c762a57f54" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "solana-stake-interface" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2243571ebf8c0c9915c7e71b17469e173c6755fa58af8eb529db3dda84e3e19a" +checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" dependencies = [ + "borsh 0.10.4", + "borsh 1.5.5", + "num-traits", + "serde", + "serde_derive", + "solana-clock", + "solana-cpi", + "solana-decode-error", "solana-instruction", + "solana-program-error", "solana-pubkey", + "solana-system-interface", + "solana-sysvar-id", ] [[package]] name = "solana-stake-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bf2b1fac7838c45db3eefe48334de5af56582179f089cff6ec9687bff9aaec" +checksum = "7045076ed29255f228dede3a2554755449a610e42f3694afadb59e3424920858" dependencies = [ "bincode", "log", + "solana-account", + "solana-bincode", + "solana-clock", "solana-config-program", "solana-feature-set", + "solana-genesis-config", + "solana-instruction", "solana-log-collector", + "solana-native-token", + "solana-packet", "solana-program-runtime", - "solana-sdk", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-stake-interface", + "solana-sysvar", + "solana-transaction-context", "solana-type-overrides", - "solana-vote-program", + "solana-vote-interface", ] [[package]] name = "solana-svm" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb79efc84cba5feafc50895ca6f32cae67aab89d662fe8bd624b5d02e9c6d76" +checksum = "83e74fc2cd71d75f3e311bb568604184b51e90c280040efabaa3ab3c8a2c4d85" dependencies = [ + "ahash", "itertools 0.12.1", "log", "percentage", "serde", "serde_derive", + "solana-account", "solana-bpf-loader-program", + "solana-clock", "solana-compute-budget", + "solana-compute-budget-instruction", "solana-feature-set", - "solana-fee", + "solana-fee-structure", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", "solana-loader-v4-program", "solana-log-collector", "solana-measure", + "solana-message", + "solana-nonce", + "solana-nonce-account", + "solana-precompiles", + "solana-program", "solana-program-runtime", - "solana-runtime-transaction", + "solana-pubkey", + "solana-rent", + "solana-rent-debits", "solana-sdk", + "solana-sdk-ids", "solana-svm-rent-collector", "solana-svm-transaction", - "solana-system-program", "solana-timings", + "solana-transaction-context", + "solana-transaction-error", "solana-type-overrides", - "solana-vote", - "thiserror 1.0.68", + "thiserror 2.0.11", ] [[package]] name = "solana-svm-rent-collector" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec2d49e2e2b66f8cdeaa438f8e269997ff7897441ce70f1b08aaa94a985f13ba" +checksum = "0f4387d97a27730ef97b52b81f814e3e31f869f001ede75fb53f2fcbc335c03e" dependencies = [ "solana-sdk", ] [[package]] name = "solana-svm-transaction" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c91c7a568ecab3153c34a325108748116298df26d95e27b80b463de51b11631" +checksum = "11ffa8d1463d6813433cd4f31ec1c96abc85dc693f29b80986a77186dfe5e144" dependencies = [ - "solana-sdk", + "solana-hash", + "solana-message", + "solana-pubkey", + "solana-sdk-ids", + "solana-signature", + "solana-transaction", +] + +[[package]] +name = "solana-system-interface" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94d7c18cb1a91c6be5f5a8ac9276a1d7c737e39a21beba9ea710ab4b9c63bc90" +dependencies = [ + "js-sys", + "num-traits", + "serde", + "serde_derive", + "solana-decode-error", + "solana-instruction", + "solana-pubkey", + "wasm-bindgen", ] [[package]] name = "solana-system-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "404d232521ffef568bd53d172c36446e61977553dc98bffadec7e384839f7780" +checksum = "ef4c7851977d6fc24c5d734b836c5c1d5c0f40d07d835c1bcc76021e325492c5" dependencies = [ "bincode", "log", "serde", "serde_derive", + "solana-account", + "solana-bincode", + "solana-instruction", "solana-log-collector", + "solana-nonce", + "solana-nonce-account", + "solana-packet", "solana-program-runtime", - "solana-sdk", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "solana-sysvar", + "solana-transaction-context", "solana-type-overrides", ] +[[package]] +name = "solana-system-transaction" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5bd98a25e5bcba8b6be8bcbb7b84b24c2a6a8178d7fb0e3077a916855ceba91a" +dependencies = [ + "solana-hash", + "solana-keypair", + "solana-message", + "solana-pubkey", + "solana-signer", + "solana-system-interface", + "solana-transaction", +] + +[[package]] +name = "solana-sysvar" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf6b44740d7f0c9f375d045c165bc0aab4a90658f92d6835aeb0649afaeaff9a" +dependencies = [ + "base64 0.22.1", + "bincode", + "bytemuck", + "bytemuck_derive", + "lazy_static", + "serde", + "serde_derive", + "solana-account-info", + "solana-clock", + "solana-define-syscall", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-fee-calculator", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", + "solana-last-restart-slot", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-pubkey", + "solana-rent", + "solana-sanitize", + "solana-sdk-ids", + "solana-sdk-macro", + "solana-slot-hashes", + "solana-slot-history", + "solana-stake-interface", + "solana-sysvar-id", +] + [[package]] name = "solana-sysvar-id" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5822b63dd59f124e4920df8d87640a288bb40f4016fd275d028fee0b94a5a51e" +checksum = "5762b273d3325b047cfda250787f8d796d781746860d5d0a746ee29f3e8812c1" dependencies = [ "solana-pubkey", + "solana-sdk-ids", ] +[[package]] +name = "solana-time-utils" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af261afb0e8c39252a04d026e3ea9c405342b08c871a2ad8aa5448e068c784c" + [[package]] name = "solana-timings" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "088c4507c8fd4f81c4039d78baf1ea7d68c8b80b2a973ba60838d33d2f7e752d" +checksum = "6f59d5f154e1b2fb4aef3257af4b4823e2c2e61c3d77e52e5ef28464d37453c4" dependencies = [ "eager", "enum-iterator", - "solana-sdk", + "solana-pubkey", +] + +[[package]] +name = "solana-transaction" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "753b3e9afed170e4cfc0ea1e87b5dfdc6d4a50270869414edd24c6ea1f529b29" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-bincode", + "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keypair", + "solana-message", + "solana-precompiles", + "solana-pubkey", + "solana-reserved-account-keys", + "solana-sanitize", + "solana-sdk-ids", + "solana-short-vec", + "solana-signature", + "solana-signer", + "solana-system-interface", + "solana-transaction-error", + "wasm-bindgen", +] + +[[package]] +name = "solana-transaction-context" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5022de04cbba05377f68bf848c8c1322ead733f88a657bf792bb40f3257b8218" +dependencies = [ + "bincode", + "serde", + "serde_derive", + "solana-account", + "solana-instruction", + "solana-pubkey", + "solana-rent", + "solana-signature", ] [[package]] name = "solana-transaction-error" -version = "2.1.10" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd92caae17b4b828864b85cecf6dba6a87ad0ac433606b8bbd58334c74d0251" +checksum = "222a9dc8fdb61c6088baab34fc3a8b8473a03a7a5fd404ed8dd502fa79b67cb1" dependencies = [ "serde", "serde_derive", @@ -3586,9 +4549,9 @@ dependencies = [ [[package]] name = "solana-transaction-status-client-types" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "897c0015c246cb9b98cfaee15921c89cd7c1503bd368e9a3fd9336c17cd6be25" +checksum = "d6d348cd4cd79cab56e58590a301aef5b5247ba503f94f97900db3a0f8f7ff94" dependencies = [ "base64 0.22.1", "bincode", @@ -3597,26 +4560,37 @@ dependencies = [ "serde_derive", "serde_json", "solana-account-decoder-client-types", - "solana-sdk", + "solana-commitment-config", + "solana-message", + "solana-reward-info", "solana-signature", - "thiserror 1.0.68", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", + "thiserror 2.0.11", ] [[package]] name = "solana-type-overrides" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f8e0b8916e7d78678428ca5d669950f6259ac332eab953ed0c8c2c88eebd3d2" +checksum = "040beb66259d485dd8623cddb8f5e8d537a8e3e0d893b84b0239423b1a6460ce" dependencies = [ "lazy_static", "rand 0.8.5", ] +[[package]] +name = "solana-validator-exit" +version = "2.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bbf6d7a3c0b28dd5335c52c0e9eae49d0ae489a8f324917faf0ded65a812c1d" + [[package]] name = "solana-version" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae093290bf86006e323e883b9df845e4bdf84f23c37067cfa9837918ed04c87d" +checksum = "45a843098ea779826eb0fb4b04c8aee3acb42ecc1f9595a9e40306e3938026d3" dependencies = [ "semver", "serde", @@ -3627,24 +4601,34 @@ dependencies = [ ] [[package]] -name = "solana-vote" -version = "2.1.10" +name = "solana-vote-interface" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8421891f95fe3b8291205e37043396c0fb26c2896cc94d53b153e1ba180992fa" +checksum = "d4507bb9d071fb81cfcf676f12fba3db4098f764524ef0b5567d671a81d41f3e" dependencies = [ - "itertools 0.12.1", - "log", + "bincode", + "num-derive", + "num-traits", "serde", "serde_derive", - "solana-sdk", - "thiserror 1.0.68", + "solana-clock", + "solana-decode-error", + "solana-hash", + "solana-instruction", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-serde-varint", + "solana-serialize-utils", + "solana-short-vec", + "solana-system-interface", ] [[package]] name = "solana-vote-program" -version = "2.1.10" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcf72a022dbb24dcfe1588aa09679042866eb7c0796ea479500ebe9355a7017f" +checksum = "4862f099c25d20857d270a2423ed4e0dd11038ad2f7f25905ff72c33c5132828" dependencies = [ "bincode", "log", @@ -3652,30 +4636,26 @@ dependencies = [ "num-traits", "serde", "serde_derive", + "solana-account", + "solana-bincode", + "solana-clock", + "solana-epoch-schedule", "solana-feature-set", + "solana-hash", + "solana-instruction", + "solana-keypair", "solana-metrics", - "solana-program", + "solana-packet", "solana-program-runtime", - "solana-sdk", - "thiserror 1.0.68", -] - -[[package]] -name = "solana_rbpf" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c1941b5ef0c3ce8f2ac5dd984d0fb1a97423c4ff2a02eec81e3913f02e2ac2b" -dependencies = [ - "byteorder", - "combine", - "hash32", - "libc", - "log", - "rand 0.8.5", - "rustc-demangle", - "scroll", - "thiserror 1.0.68", - "winapi", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-signer", + "solana-slot-hashes", + "solana-transaction", + "solana-transaction-context", + "solana-vote-interface", + "thiserror 2.0.11", ] [[package]] @@ -3756,7 +4736,10 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-address-lookup-table-interface", + "solana-message", + "solana-pubkey", + "solana-slot-hashes", "solders-hash", "solders-macros", "solders-pubkey", @@ -3806,7 +4789,6 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", "solana-sdk", "solders-macros", "solders-traits-core", @@ -3819,7 +4801,8 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-hash", + "solana-sha256-hasher", "solders-macros", "solders-traits", "solders-traits-core", @@ -3832,7 +4815,9 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-instruction", + "solana-message", + "solana-pubkey", "solders-macros", "solders-pubkey", "solders-traits-core", @@ -3893,7 +4878,9 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-instruction", + "solana-message", + "solana-pubkey", "solders-address-lookup-table-account", "solders-hash", "solders-instruction", @@ -3912,7 +4899,12 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-clock", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-rent", + "solana-slot-history", + "solana-stake-interface", "solders-hash", "solders-macros", "solders-traits-core", @@ -3925,7 +4917,7 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-pubkey", "solders-macros", "solders-traits", "solders-traits-core", @@ -4351,7 +5343,7 @@ dependencies = [ "dict_derive", "pyo3", "serde", - "solana-program", + "solana-address-lookup-table-interface", "solana-sdk", "solders-instruction", "solders-macros", @@ -4367,7 +5359,8 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-program", + "solana-program-option", + "solana-program-pack", "solders-macros", "solders-pubkey", "solders-traits-core", @@ -4588,18 +5581,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.87", -] - [[package]] name = "sync_wrapper" version = "0.1.2" @@ -4677,6 +5658,15 @@ dependencies = [ "pin-utils", ] +[[package]] +name = "termcolor" +version = "1.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" +dependencies = [ + "winapi-util", +] + [[package]] name = "thiserror" version = "1.0.68" @@ -5045,24 +6035,24 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" +checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" dependencies = [ "cfg-if", "once_cell", + "rustversion", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" +checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" dependencies = [ "bumpalo", "log", - "once_cell", "proc-macro2", "quote", "syn 2.0.87", @@ -5083,9 +6073,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" +checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5093,9 +6083,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" +checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", @@ -5106,9 +6096,12 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.95" +version = "0.2.100" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" +checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +dependencies = [ + "unicode-ident", +] [[package]] name = "web-sys" @@ -5142,6 +6135,15 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +[[package]] +name = "winapi-util" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +dependencies = [ + "windows-sys 0.52.0", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" diff --git a/Cargo.toml b/Cargo.toml index 24f2b73a..af949a10 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -129,10 +129,24 @@ solders-hash = { path = "./crates/hash", version = "=0.23.0" } serde_with = { version = "^1.14.0", features = ["base64"] } solana-sdk = { version = "2.1.0", features = ["openssl-vendored"] } solana-account-decoder-client-types = { version = "2.1.0", features = ["zstd"] } +solana-address-lookup-table-interface = "2.2.1" solana-banks-interface = "2.1.0" +solana-clock = "2.2.1" +solana-epoch-rewards = "2.2.1" +solana-epoch-schedule = "2.2.1" +solana-hash = "2.2.1" +solana-instruction = "2.2.1" +solana-message = "2.2.1" +solana-program-option = "2.2.1" +solana-program-pack = "2.2.1" +solana-pubkey = "2.2.1" +solana-rent = "2.2.1" +solana-sha256-hasher = "2.2.1" +solana-slot-hashes = "2.2.1" +solana-slot-history = "2.2.1" +solana-stake-interface = "1.2.1" solana-transaction-status-client-types = "2.1.0" solana-rpc-client-api = "2.1.0" -solana-program = "2.1.0" spl-associated-token-account-client = "2.0" spl-token = "7.0" bincode = "1.3.3" diff --git a/crates/address-lookup-table-account/Cargo.toml b/crates/address-lookup-table-account/Cargo.toml index 462fdde8..83a527d2 100644 --- a/crates/address-lookup-table-account/Cargo.toml +++ b/crates/address-lookup-table-account/Cargo.toml @@ -10,9 +10,12 @@ description = "Solders address lookup table account crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } +solana-address-lookup-table-interface = { workspace = true } +solana-message = { workspace = true } +solana-pubkey = { workspace = true } +solana-slot-hashes = { workspace = true } solders-traits-core = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } solders-pubkey = { workspace = true } diff --git a/crates/address-lookup-table-account/src/lib.rs b/crates/address-lookup-table-account/src/lib.rs index 35579508..854746ba 100644 --- a/crates/address-lookup-table-account/src/lib.rs +++ b/crates/address-lookup-table-account/src/lib.rs @@ -2,19 +2,16 @@ use derive_more::{From, Into}; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::clock::Slot; -use solana_program::slot_hashes::SlotHashes as SlotHashesOriginal; -use solana_program::{ - address_lookup_table::{ - instruction::derive_lookup_table_address as derive_lookup_table_address_original, - state::{ - AddressLookupTable as AddressLookupTableOriginal, - LookupTableMeta as LookupTableMetaOriginal, - LookupTableStatus as LookupTableStatusOriginal, - }, - AddressLookupTableAccount as AddressLookupTableAccountOriginal, +use solana_message::AddressLookupTableAccount as AddressLookupTableAccountOriginal; +use solana_pubkey::Pubkey as PubkeyOriginal; +use solana_slot_hashes::SlotHashes as SlotHashesOriginal; +use solana_address_lookup_table_interface::{ + instruction::derive_lookup_table_address as derive_lookup_table_address_original, + state::{ + AddressLookupTable as AddressLookupTableOriginal, + LookupTableMeta as LookupTableMetaOriginal, + LookupTableStatus as LookupTableStatusOriginal, }, - pubkey::Pubkey as PubkeyOriginal, }; use solders_hash::Hash; use solders_macros::{common_methods, richcmp_eq_only}; diff --git a/crates/epoch-info/Cargo.toml b/crates/epoch-info/Cargo.toml index 73f8c293..f31ad792 100644 --- a/crates/epoch-info/Cargo.toml +++ b/crates/epoch-info/Cargo.toml @@ -12,7 +12,6 @@ description = "Solders epoch info crate." pyo3 = { workspace = true, features = ["macros"] } solders-traits-core = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } solana-sdk = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/epoch-info/src/lib.rs b/crates/epoch-info/src/lib.rs index 80da06df..797b0047 100644 --- a/crates/epoch-info/src/lib.rs +++ b/crates/epoch-info/src/lib.rs @@ -1,7 +1,6 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::clock::Epoch; use solana_sdk::epoch_info::EpochInfo as EpochInfoOriginal; use solders_macros::{common_methods, richcmp_eq_only}; @@ -31,7 +30,7 @@ impl EpochInfo { #[pyo3(signature = (epoch, slot_index, slots_in_epoch, absolute_slot, block_height, transaction_count=None))] #[new] pub fn new( - epoch: Epoch, + epoch: u64, slot_index: u64, slots_in_epoch: u64, absolute_slot: u64, @@ -51,7 +50,7 @@ impl EpochInfo { /// int: The current epoch #[getter] - pub fn epoch(&self) -> Epoch { + pub fn epoch(&self) -> u64 { self.0.epoch } diff --git a/crates/hash/Cargo.toml b/crates/hash/Cargo.toml index df8d7d39..2bb795c9 100644 --- a/crates/hash/Cargo.toml +++ b/crates/hash/Cargo.toml @@ -13,6 +13,7 @@ pyo3 = { workspace = true, features = ["macros"] } solders-traits = { workspace = true } solders-traits-core = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } +solana-hash = { workspace = true } +solana-sha256-hasher = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/hash/src/lib.rs b/crates/hash/src/lib.rs index 99453553..9eff5aca 100644 --- a/crates/hash/src/lib.rs +++ b/crates/hash/src/lib.rs @@ -3,9 +3,10 @@ use std::str::FromStr; use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::hash::{ - hash, Hash as HashOriginal, ParseHashError as ParseHashErrorOriginal, HASH_BYTES, +use solana_hash::{ + Hash as HashOriginal, ParseHashError as ParseHashErrorOriginal, HASH_BYTES, }; +use solana_sha256_hasher::hash; use solders_macros::{common_methods, pyhash, richcmp_full}; use solders_traits::handle_py_err; diff --git a/crates/instruction/Cargo.toml b/crates/instruction/Cargo.toml index 78874719..af3cb5fc 100644 --- a/crates/instruction/Cargo.toml +++ b/crates/instruction/Cargo.toml @@ -10,9 +10,11 @@ description = "Solders instruction crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } +solana-instruction = { workspace = true } +solana-message = { workspace = true } +solana-pubkey = { workspace = true } solders-traits-core = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } -solana-program = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/instruction/src/lib.rs b/crates/instruction/src/lib.rs index f8e2380c..db0593d8 100644 --- a/crates/instruction/src/lib.rs +++ b/crates/instruction/src/lib.rs @@ -3,12 +3,13 @@ use std::hash::Hasher; use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::{ - instruction::{ - AccountMeta as AccountMetaOriginal, CompiledInstruction as CompiledInstructionOriginal, +use { + solana_instruction::{ + account_meta::AccountMeta as AccountMetaOriginal, Instruction as InstructionOriginal, }, - pubkey::Pubkey as PubkeyOriginal, + solana_message::compiled_instruction::CompiledInstruction as CompiledInstructionOriginal, + solana_pubkey::Pubkey as PubkeyOriginal, }; use solders_macros::{common_methods, pyhash, richcmp_eq_only}; use solders_pubkey::Pubkey; diff --git a/crates/message/Cargo.toml b/crates/message/Cargo.toml index 9abc9650..e8abc7d1 100644 --- a/crates/message/Cargo.toml +++ b/crates/message/Cargo.toml @@ -13,7 +13,9 @@ pyo3 = { workspace = true, features = ["macros"] } solders-traits-core = { workspace = true } solders-traits = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } +solana-instruction = { workspace = true } +solana-message = { workspace = true } +solana-pubkey = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } solders-address-lookup-table-account = { workspace = true } diff --git a/crates/message/src/lib.rs b/crates/message/src/lib.rs index 24097d14..a9d689c4 100644 --- a/crates/message/src/lib.rs +++ b/crates/message/src/lib.rs @@ -1,11 +1,11 @@ use derive_more::{From, Into}; use pyo3::{create_exception, exceptions::PyException, prelude::*}; use serde::{Deserialize, Serialize}; -use solana_program::{ - address_lookup_table::AddressLookupTableAccount as AddressLookupTableAccountOriginal, - instruction::CompiledInstruction as CompiledInstructionOriginal, - instruction::Instruction as InstructionOriginal, - message::{ +use { + solana_instruction::Instruction as InstructionOriginal, + solana_message::{ + AddressLookupTableAccount as AddressLookupTableAccountOriginal, + compiled_instruction::CompiledInstruction as CompiledInstructionOriginal, legacy::Message as MessageOriginal, v0::{ Message as MessageV0Original, @@ -14,7 +14,7 @@ use solana_program::{ MessageHeader as MessageHeaderOriginal, VersionedMessage as VersionedMessageOriginal, MESSAGE_HEADER_LENGTH, }, - pubkey::Pubkey as PubkeyOriginal, + solana_pubkey::Pubkey as PubkeyOriginal, }; use solders_macros::{common_methods, richcmp_eq_only}; use solders_traits::{handle_py_err, PyErrWrapper}; diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index e1cc2359..6cac9a17 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -14,7 +14,12 @@ pyo3 = { workspace = true, features = ["macros"] } solders-hash = { workspace = true } solders-traits-core = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } +solana-clock = { workspace = true } +solana-epoch-rewards = { workspace = true } +solana-epoch-schedule = { workspace = true } +solana-rent = { workspace = true } +solana-slot-history = { workspace = true } +solana-stake-interface = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } bincode = { workspace = true } diff --git a/crates/primitives/src/clock.rs b/crates/primitives/src/clock.rs index fc054a0b..daaf9e88 100644 --- a/crates/primitives/src/clock.rs +++ b/crates/primitives/src/clock.rs @@ -1,7 +1,7 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::clock::{ +use solana_clock::{ Clock as ClockOriginal, Epoch, Slot, UnixTimestamp, DEFAULT_DEV_SLOTS_PER_EPOCH, DEFAULT_HASHES_PER_SECOND, DEFAULT_HASHES_PER_TICK, DEFAULT_MS_PER_SLOT, DEFAULT_SLOTS_PER_EPOCH, DEFAULT_S_PER_SLOT, DEFAULT_TICKS_PER_SECOND, DEFAULT_TICKS_PER_SLOT, diff --git a/crates/primitives/src/epoch_rewards.rs b/crates/primitives/src/epoch_rewards.rs index 81b2d670..99f55365 100644 --- a/crates/primitives/src/epoch_rewards.rs +++ b/crates/primitives/src/epoch_rewards.rs @@ -1,7 +1,7 @@ use { pyo3::prelude::*, serde::{Deserialize, Serialize}, - solana_program::epoch_rewards::EpochRewards as EpochRewardsOriginal, + solana_epoch_rewards::EpochRewards as EpochRewardsOriginal, solders_hash::Hash as Blockhash, solders_traits_core::transaction_status_boilerplate, }; diff --git a/crates/primitives/src/epoch_schedule.rs b/crates/primitives/src/epoch_schedule.rs index be8a6eb8..481ea653 100644 --- a/crates/primitives/src/epoch_schedule.rs +++ b/crates/primitives/src/epoch_schedule.rs @@ -1,9 +1,9 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::{ - clock::{Epoch, Slot}, - epoch_schedule::EpochSchedule as EpochScheduleOriginal, +use { + solana_clock::{Epoch, Slot}, + solana_epoch_schedule::EpochSchedule as EpochScheduleOriginal, }; use solders_macros::{common_methods, richcmp_eq_only}; diff --git a/crates/primitives/src/rent.rs b/crates/primitives/src/rent.rs index bdde008a..6c4c21f2 100644 --- a/crates/primitives/src/rent.rs +++ b/crates/primitives/src/rent.rs @@ -1,7 +1,7 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::rent::{ +use solana_rent::{ Rent as RentOriginal, RentDue, ACCOUNT_STORAGE_OVERHEAD, DEFAULT_BURN_PERCENT, DEFAULT_EXEMPTION_THRESHOLD, DEFAULT_LAMPORTS_PER_BYTE_YEAR, }; diff --git a/crates/primitives/src/slot_history.rs b/crates/primitives/src/slot_history.rs index e91403f9..571f4312 100644 --- a/crates/primitives/src/slot_history.rs +++ b/crates/primitives/src/slot_history.rs @@ -2,7 +2,7 @@ use { bv::BitVec, pyo3::prelude::*, serde::{Deserialize, Serialize}, - solana_program::slot_history::{Check, SlotHistory as SlotHistoryOriginal}, + solana_slot_history::{Check, SlotHistory as SlotHistoryOriginal}, solders_macros::enum_original_mapping, solders_traits_core::transaction_status_boilerplate, }; diff --git a/crates/primitives/src/stake_history.rs b/crates/primitives/src/stake_history.rs index 22295e2f..0afd3289 100644 --- a/crates/primitives/src/stake_history.rs +++ b/crates/primitives/src/stake_history.rs @@ -1,7 +1,7 @@ use { pyo3::prelude::*, serde::{Deserialize, Serialize}, - solana_program::stake_history::{ + solana_stake_interface::stake_history::{ StakeHistory as StakeHistoryOriginal, StakeHistoryEntry as StakeHistoryEntryOriginal, }, solders_traits_core::transaction_status_boilerplate, diff --git a/crates/pubkey/Cargo.toml b/crates/pubkey/Cargo.toml index b790d6b3..09df4884 100644 --- a/crates/pubkey/Cargo.toml +++ b/crates/pubkey/Cargo.toml @@ -13,6 +13,6 @@ pyo3 = { workspace = true, features = ["macros"] } solders-traits-core = { workspace = true } solders-traits = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } +solana-pubkey = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/pubkey/src/lib.rs b/crates/pubkey/src/lib.rs index a85deab3..579634b1 100644 --- a/crates/pubkey/src/lib.rs +++ b/crates/pubkey/src/lib.rs @@ -3,7 +3,7 @@ use std::{hash::Hash, str::FromStr}; use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_program::pubkey::{ParsePubkeyError, Pubkey as PubkeyOriginal, PUBKEY_BYTES}; +use solana_pubkey::{ParsePubkeyError, Pubkey as PubkeyOriginal, PUBKEY_BYTES}; use solders_macros::{common_methods, pyhash, richcmp_full}; use solders_traits::handle_py_err; use solders_traits_core::{ diff --git a/crates/system-program/Cargo.toml b/crates/system-program/Cargo.toml index 3cb3c43e..d421ce0b 100644 --- a/crates/system-program/Cargo.toml +++ b/crates/system-program/Cargo.toml @@ -16,7 +16,7 @@ solders-traits = { workspace = true } solders-instruction = { workspace = true } solders-pubkey = { workspace = true } solders-macros = { workspace = true } -solana-program = { workspace = true } +solana-address-lookup-table-interface = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } bincode = { workspace = true } diff --git a/crates/system-program/src/lib.rs b/crates/system-program/src/lib.rs index 463b23a3..834fa234 100644 --- a/crates/system-program/src/lib.rs +++ b/crates/system-program/src/lib.rs @@ -1,7 +1,7 @@ #![allow(deprecated)] use dict_derive::{FromPyObject, IntoPyObject}; use pyo3::{exceptions::PyValueError, prelude::*}; -use solana_program::address_lookup_table::instruction::{ +use solana_address_lookup_table_interface::instruction::{ close_lookup_table as close_lookup_table_original, create_lookup_table as create_lookup_table_original, create_lookup_table_signed as create_lookup_table_signed_original, diff --git a/crates/token/Cargo.toml b/crates/token/Cargo.toml index 5e9ecb7b..c6199088 100644 --- a/crates/token/Cargo.toml +++ b/crates/token/Cargo.toml @@ -12,7 +12,8 @@ description = "Solders SPL Token crate." pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } derive_more = { workspace = true } -solana-program = { workspace = true } +solana-program-option = { workspace = true } +solana-program-pack = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/token/src/state.rs b/crates/token/src/state.rs index 733372a3..324e5b8f 100644 --- a/crates/token/src/state.rs +++ b/crates/token/src/state.rs @@ -1,6 +1,6 @@ use derive_more::{From, Into}; use pyo3::prelude::*; -use solana_program::{program_option::COption, program_pack::Pack}; +use solana_program_option::COption; use solana_program_pack::Pack; use solders_macros::{common_methods_core, enum_original_mapping, richcmp_eq_only}; use solders_pubkey::Pubkey; use solders_traits_core::{ diff --git a/crates/transaction-error/src/lib.rs b/crates/transaction-error/src/lib.rs index 9ba67f27..61fb9cc8 100644 --- a/crates/transaction-error/src/lib.rs +++ b/crates/transaction-error/src/lib.rs @@ -501,6 +501,7 @@ pub enum TransactionErrorFieldless { InvalidLoadedAccountsDataSizeLimit, UnbalancedTransaction, ProgramCacheHitMaxLimit, + CommitCancelled, } #[derive(FromPyObject, Clone, PartialEq, Eq, Serialize, Deserialize, Debug, IntoPyObject)] @@ -608,6 +609,7 @@ impl From for TransactionErrorOriginal { } TransactionErrorFieldless::UnbalancedTransaction => Self::UnbalancedTransaction, TransactionErrorFieldless::ProgramCacheHitMaxLimit => Self::ProgramCacheHitMaxLimit, + TransactionErrorFieldless::CommitCancelled => Self::CommitCancelled, }, } } @@ -740,6 +742,9 @@ impl From for TransactionErrorType { TransactionErrorOriginal::ProgramCacheHitMaxLimit => { Self::Fieldless(TransactionErrorFieldless::ProgramCacheHitMaxLimit) } + TransactionErrorOriginal::CommitCancelled => { + Self::Fieldless(TransactionErrorFieldless::CommitCancelled) + } } } } diff --git a/tests/litesvm/clock-example/Cargo.toml b/tests/litesvm/clock-example/Cargo.toml index 10abdb72..cc7c6124 100644 --- a/tests/litesvm/clock-example/Cargo.toml +++ b/tests/litesvm/clock-example/Cargo.toml @@ -6,7 +6,12 @@ edition = { workspace = true } include = ["/src"] [dependencies] -solana-program = { workspace = true } +solana-account-info = { workspace = true } +solana-clock = { workspace = true } +solana-program-entrypoint = { workspace = true } +solana-program-error = { workspace = true } +solana-pubkey = { workspace = true } +solana-sysvar = { workspace = true } zeroize = { workspace = true } [lib] diff --git a/tests/litesvm/clock-example/src/lib.rs b/tests/litesvm/clock-example/src/lib.rs index 7678ae27..30bd77ae 100644 --- a/tests/litesvm/clock-example/src/lib.rs +++ b/tests/litesvm/clock-example/src/lib.rs @@ -1,11 +1,12 @@ -use solana_program::{ - account_info::AccountInfo, - entrypoint::ProgramResult, - pubkey::Pubkey, - sysvar::{clock::Clock, Sysvar}, +use { + solana_account_info::AccountInfo, + solana_clock::Clock, + solana_program_error::ProgramResult, + solana_pubkey::Pubkey, + solana_sysvar::Sysvar, }; -solana_program::entrypoint!(process_instruction); +solana_program_entrypoint::entrypoint!(process_instruction); #[allow(clippy::unnecessary_wraps)] pub fn process_instruction( _program_id: &Pubkey, From eebdf6b403bc278c786b331ab3de6ad1c9ab5c34 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 11:09:44 +0000 Subject: [PATCH 02/13] remove solana-sdk --- Cargo.lock | 235 ++++++++---------- Cargo.toml | 26 +- crates/account-decoder/Cargo.toml | 1 - crates/account/Cargo.toml | 2 +- crates/account/src/lib.rs | 14 +- .../address-lookup-table-account/Cargo.toml | 4 +- .../address-lookup-table-account/src/lib.rs | 12 +- crates/base64-string/Cargo.toml | 3 +- crates/base64-string/src/lib.rs | 8 +- crates/commitment-config/Cargo.toml | 2 +- crates/commitment-config/src/lib.rs | 2 +- crates/compute-budget/Cargo.toml | 3 +- crates/compute-budget/src/lib.rs | 3 +- crates/epoch-info/Cargo.toml | 2 +- crates/epoch-info/src/lib.rs | 2 +- crates/hash/src/lib.rs | 5 +- crates/keypair/Cargo.toml | 8 +- crates/keypair/src/lib.rs | 23 +- crates/keypair/src/null_signer.rs | 8 +- crates/keypair/src/presigner.rs | 3 +- crates/keypair/src/signer.rs | 8 +- crates/litesvm/Cargo.toml | 13 +- crates/litesvm/src/lib.rs | 19 +- crates/litesvm/src/transaction_metadata.rs | 6 +- crates/message/Cargo.toml | 2 +- crates/rpc-config-no-filter/Cargo.toml | 1 - crates/rpc-responses-common/Cargo.toml | 1 - crates/rpc-responses-common/src/lib.rs | 13 +- crates/rpc-responses/Cargo.toml | 1 - crates/rpc-responses/src/lib.rs | 14 +- crates/rpc-send-transaction-config/Cargo.toml | 2 +- crates/rpc-send-transaction-config/src/lib.rs | 2 +- crates/signature/Cargo.toml | 2 +- crates/signature/src/lib.rs | 2 +- crates/system-program/Cargo.toml | 5 +- crates/system-program/src/lib.rs | 10 +- crates/traits/Cargo.toml | 8 +- crates/traits/src/lib.rs | 17 +- crates/transaction-error/Cargo.toml | 3 +- crates/transaction-error/src/lib.rs | 6 +- crates/transaction-return-data/Cargo.toml | 2 +- crates/transaction-return-data/src/lib.rs | 2 +- crates/transaction-status/Cargo.toml | 2 +- crates/transaction-status/src/lib.rs | 18 +- crates/transaction/Cargo.toml | 6 +- crates/transaction/src/lib.rs | 20 +- poetry.lock | 81 +++++- src/address_lookup_table_account.rs | 6 +- src/sysvar.rs | 2 +- 49 files changed, 359 insertions(+), 281 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index ed31c946..a19bfc5f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,22 +17,6 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" -[[package]] -name = "agave-transaction-view" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4778fd549144e8776fb7ac04e7dac598546f0d4cb0b25e336cb0a7d93120ddb9" -dependencies = [ - "solana-hash", - "solana-message", - "solana-packet", - "solana-pubkey", - "solana-sdk-ids", - "solana-short-vec", - "solana-signature", - "solana-svm-transaction", -] - [[package]] name = "ahash" version = "0.8.11" @@ -85,6 +69,15 @@ dependencies = [ "libc", ] +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anyhow" version = "1.0.95" @@ -995,6 +988,15 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "five8" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75b8549488b4715defcb0d8a8a1c1c76a80661b5fa106b4ca0e7fce59d7d875" +dependencies = [ + "five8_core", +] + [[package]] name = "five8_const" version = "0.1.3" @@ -1581,32 +1583,66 @@ dependencies = [ [[package]] name = "litesvm" version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89818484130353695dfdee963fc818c808dfa9a5be6ff8070964bfc810579b3" +source = "git+https://github.com/LiteSVM/litesvm.git?rev=7e3d9a8#7e3d9a84e019cb50b535d398770f49fe685c66c2" dependencies = [ + "ansi_term", "bincode", "indexmap", "itertools 0.14.0", "log", "qualifier_attr", "serde", + "solana-account", + "solana-address-lookup-table-interface", "solana-address-lookup-table-program", "solana-bpf-loader-program", + "solana-clock", "solana-compute-budget", + "solana-compute-budget-instruction", "solana-compute-budget-program", "solana-config-program", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-feature-set", "solana-fee", + "solana-fee-structure", + "solana-hash", + "solana-instruction", + "solana-instructions-sysvar", + "solana-keypair", + "solana-last-restart-slot", + "solana-loader-v3-interface", + "solana-loader-v4-interface", "solana-loader-v4-program", "solana-log-collector", - "solana-program", + "solana-measure", + "solana-message", + "solana-native-token", + "solana-nonce", + "solana-nonce-account", + "solana-precompiles", + "solana-program-error", "solana-program-runtime", - "solana-runtime-transaction", - "solana-sdk", + "solana-pubkey", + "solana-rent", + "solana-reserved-account-keys", + "solana-sdk-ids", + "solana-sha256-hasher", + "solana-signature", + "solana-signer", + "solana-slot-hashes", + "solana-slot-history", + "solana-stake-interface", "solana-stake-program", - "solana-svm", "solana-svm-transaction", + "solana-system-interface", "solana-system-program", + "solana-sysvar", + "solana-sysvar-id", "solana-timings", + "solana-transaction", + "solana-transaction-context", + "solana-transaction-error", "solana-vote-program", "thiserror 2.0.11", ] @@ -1853,15 +1889,6 @@ dependencies = [ "syn 2.0.87", ] -[[package]] -name = "openssl-src" -version = "300.4.1+3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa4eac4138c62414b5622d1b31c5c304f34b406b013c079c2bbc652fdd6678c" -dependencies = [ - "cc", -] - [[package]] name = "openssl-sys" version = "0.9.104" @@ -1870,7 +1897,6 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", - "openssl-src", "pkg-config", "vcpkg", ] @@ -3930,27 +3956,6 @@ dependencies = [ "thiserror 2.0.11", ] -[[package]] -name = "solana-runtime-transaction" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053c37fec5b3d291b382a6b21aac6df461da8cc2d733b3d095596129a78d72f7" -dependencies = [ - "agave-transaction-view", - "log", - "solana-compute-budget", - "solana-compute-budget-instruction", - "solana-hash", - "solana-message", - "solana-pubkey", - "solana-sdk-ids", - "solana-signature", - "solana-svm-transaction", - "solana-transaction", - "solana-transaction-error", - "thiserror 2.0.11", -] - [[package]] name = "solana-sanitize" version = "2.2.1" @@ -4302,60 +4307,6 @@ dependencies = [ "solana-vote-interface", ] -[[package]] -name = "solana-svm" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83e74fc2cd71d75f3e311bb568604184b51e90c280040efabaa3ab3c8a2c4d85" -dependencies = [ - "ahash", - "itertools 0.12.1", - "log", - "percentage", - "serde", - "serde_derive", - "solana-account", - "solana-bpf-loader-program", - "solana-clock", - "solana-compute-budget", - "solana-compute-budget-instruction", - "solana-feature-set", - "solana-fee-structure", - "solana-hash", - "solana-instruction", - "solana-instructions-sysvar", - "solana-loader-v4-program", - "solana-log-collector", - "solana-measure", - "solana-message", - "solana-nonce", - "solana-nonce-account", - "solana-precompiles", - "solana-program", - "solana-program-runtime", - "solana-pubkey", - "solana-rent", - "solana-rent-debits", - "solana-sdk", - "solana-sdk-ids", - "solana-svm-rent-collector", - "solana-svm-transaction", - "solana-timings", - "solana-transaction-context", - "solana-transaction-error", - "solana-type-overrides", - "thiserror 2.0.11", -] - -[[package]] -name = "solana-svm-rent-collector" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f4387d97a27730ef97b52b81f814e3e31f869f001ede75fb53f2fcbc335c03e" -dependencies = [ - "solana-sdk", -] - [[package]] name = "solana-svm-transaction" version = "2.2.0" @@ -4666,7 +4617,8 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-address-lookup-table-interface", + "solana-sdk-ids", "solders-account", "solders-account-decoder", "solders-address-lookup-table-account", @@ -4703,8 +4655,8 @@ dependencies = [ "serde", "serde_bytes", "serde_with 1.14.0", + "solana-account", "solana-account-decoder-client-types", - "solana-sdk", "solders-account-decoder", "solders-macros", "solders-pubkey", @@ -4723,7 +4675,6 @@ dependencies = [ "serde", "serde_json", "solana-account-decoder-client-types", - "solana-sdk", "solders-macros", "solders-traits-core", "zstd 0.11.2+zstd.1.5.2", @@ -4753,7 +4704,8 @@ dependencies = [ "base64 0.13.1", "bincode", "serde", - "solana-sdk", + "solana-message", + "solana-transaction", "solders-message", "solders-transaction", ] @@ -4765,7 +4717,7 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-commitment-config", "solders-traits", ] @@ -4775,7 +4727,8 @@ version = "0.23.0" dependencies = [ "pyo3", "solana-compute-budget", - "solana-sdk", + "solana-compute-budget-interface", + "solana-sdk-ids", "solders-instruction", "solders-macros", "solders-pubkey", @@ -4789,7 +4742,7 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-epoch-info", "solders-macros", "solders-traits-core", ] @@ -4828,9 +4781,15 @@ name = "solders-keypair" version = "0.23.0" dependencies = [ "derive_more", + "five8", "pyo3", "serde", - "solana-sdk", + "solana-derivation-path", + "solana-keypair", + "solana-presigner", + "solana-pubkey", + "solana-signature", + "solana-signer", "solders-macros", "solders-pubkey", "solders-signature", @@ -4845,7 +4804,18 @@ dependencies = [ "litesvm", "pyo3", "serde", - "solana-sdk", + "solana-account", + "solana-clock", + "solana-epoch-rewards", + "solana-epoch-schedule", + "solana-feature-set", + "solana-hash", + "solana-last-restart-slot", + "solana-message", + "solana-rent", + "solana-slot-hashes", + "solana-slot-history", + "solana-stake-interface", "solders-account", "solders-compute-budget", "solders-hash", @@ -4988,7 +4958,6 @@ dependencies = [ "serde", "solana-account-decoder-client-types", "solana-rpc-client-api", - "solana-sdk", "solders-commitment-config", "solders-macros", "solders-pubkey", @@ -5178,7 +5147,6 @@ dependencies = [ "serde_with 1.14.0", "solana-account-decoder-client-types", "solana-rpc-client-api", - "solana-sdk", "solana-transaction-status-client-types", "solders-account", "solders-account-decoder", @@ -5214,7 +5182,6 @@ dependencies = [ "serde_with 1.14.0", "solana-account-decoder-client-types", "solana-rpc-client-api", - "solana-sdk", "solders-account", "solders-account-decoder", "solders-hash", @@ -5248,8 +5215,8 @@ version = "0.23.0" dependencies = [ "pyo3", "serde", + "solana-commitment-config", "solana-rpc-client-api", - "solana-sdk", "solana-transaction-status-client-types", "solders-commitment-config", "solders-macros", @@ -5328,7 +5295,7 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-signature", "solders-macros", "solders-pubkey", "solders-traits-core", @@ -5344,7 +5311,10 @@ dependencies = [ "pyo3", "serde", "solana-address-lookup-table-interface", - "solana-sdk", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", "solders-instruction", "solders-macros", "solders-pubkey", @@ -5378,7 +5348,13 @@ dependencies = [ "serde_cbor", "serde_json", "solana-banks-client", - "solana-sdk", + "solana-commitment-config", + "solana-hash", + "solana-pubkey", + "solana-sanitize", + "solana-signature", + "solana-signer", + "solana-transaction-error", "solders-traits-core", ] @@ -5400,7 +5376,11 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-message", + "solana-pubkey", + "solana-sanitize", + "solana-signature", + "solana-transaction", "solders-hash", "solders-instruction", "solders-keypair", @@ -5429,7 +5409,8 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-instruction", + "solana-transaction-error", "solders-macros", "solders-traits-core", ] @@ -5442,7 +5423,7 @@ dependencies = [ "derive_more", "pyo3", "serde", - "solana-sdk", + "solana-transaction-context", "solana-transaction-status-client-types", "solders-macros", "solders-pubkey", @@ -5462,7 +5443,7 @@ dependencies = [ "serde", "serde_json", "solana-account-decoder-client-types", - "solana-sdk", + "solana-reward-info", "solana-transaction-status-client-types", "solders-account-decoder", "solders-hash", diff --git a/Cargo.toml b/Cargo.toml index af949a10..0058c674 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,10 +15,11 @@ crate-type = ["cdylib", "rlib"] [dependencies] pyo3 = { workspace = true, features = ["macros", "extension-module", "abi3-py37"] } -solana-sdk = { workspace = true } bincode = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } +solana-address-lookup-table-interface = { workspace = true } +solana-sdk-ids = { workspace = true } solders-account = { workspace = true } solders-account-decoder = { workspace = true } solders-address-lookup-table-account = { workspace = true } @@ -69,6 +70,7 @@ edition = "2021" [workspace.dependencies] chrono-humanize = "0.2.3" +five8 = "0.2.1" log = "0.4" pyo3 = { version = "0.23", default-features = false } solana-compute-budget = "2.1.10" @@ -127,31 +129,49 @@ solders-transaction-error = { path = "./crates/transaction-error", version = "=0 solders-account = { path = "./crates/account", version = "=0.23.0" } solders-hash = { path = "./crates/hash", version = "=0.23.0" } serde_with = { version = "^1.14.0", features = ["base64"] } -solana-sdk = { version = "2.1.0", features = ["openssl-vendored"] } +solana-account = "2.2.1" solana-account-decoder-client-types = { version = "2.1.0", features = ["zstd"] } solana-address-lookup-table-interface = "2.2.1" solana-banks-interface = "2.1.0" solana-clock = "2.2.1" +solana-commitment-config = "2.2.1" +solana-compute-budget-interface = "2.2.1" +solana-derivation-path = "2.2.1" +solana-epoch-info = "2.2.1" solana-epoch-rewards = "2.2.1" solana-epoch-schedule = "2.2.1" +solana-feature-set = "2.2.1" solana-hash = "2.2.1" solana-instruction = "2.2.1" +solana-last-restart-slot = "2.2.1" +solana-keypair = "2.2.1" solana-message = "2.2.1" +solana-presigner = "2.2.1" solana-program-option = "2.2.1" solana-program-pack = "2.2.1" solana-pubkey = "2.2.1" solana-rent = "2.2.1" +solana-reward-info = "2.2.1" +solana-sanitize = "2.2.1" +solana-sdk-ids = "2.2.1" solana-sha256-hasher = "2.2.1" +solana-signature = "2.2.1" +solana-signer = "2.2.1" solana-slot-hashes = "2.2.1" solana-slot-history = "2.2.1" solana-stake-interface = "1.2.1" +solana-system-interface = "1.0.0" +solana-sysvar = "2.2.1" +solana-transaction = "2.2.1" +solana-transaction-context = "2.2.1" solana-transaction-status-client-types = "2.1.0" +solana-transaction-error = "2.2.1" solana-rpc-client-api = "2.1.0" spl-associated-token-account-client = "2.0" spl-token = "7.0" bincode = "1.3.3" base64 = "0.13.0" -litesvm = "0.5.0" +litesvm = { git = "https://github.com/LiteSVM/litesvm.git", rev = "7e3d9a8" } serde = "^1.0.188" serde_bytes = "0.11.12" serde_json = "^1.0.106" diff --git a/crates/account-decoder/Cargo.toml b/crates/account-decoder/Cargo.toml index e9c4ef98..b8ee2166 100644 --- a/crates/account-decoder/Cargo.toml +++ b/crates/account-decoder/Cargo.toml @@ -10,7 +10,6 @@ description = "Solders account decoder crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } -solana-sdk = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } derive_more = { workspace = true } diff --git a/crates/account/Cargo.toml b/crates/account/Cargo.toml index eb60b01b..cb9763b7 100644 --- a/crates/account/Cargo.toml +++ b/crates/account/Cargo.toml @@ -14,7 +14,7 @@ serde = { workspace = true } serde_bytes.workspace = true serde_with.workspace = true derive_more = { workspace = true } -solana-sdk = { workspace = true } +solana-account = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/account/src/lib.rs b/crates/account/src/lib.rs index 6e56b0a2..a601febb 100644 --- a/crates/account/src/lib.rs +++ b/crates/account/src/lib.rs @@ -4,7 +4,7 @@ use std::str::FromStr; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; use serde_with::{serde_as, DisplayFromStr}; -use solana_sdk::{account::Account as AccountOriginal, clock::Epoch}; +use solana_account::Account as AccountOriginal; use solders_macros::{common_methods, richcmp_eq_only}; use solders_pubkey::Pubkey; use solders_traits_core::{ @@ -45,7 +45,7 @@ pub struct Account { pub executable: bool, /// the epoch at which this account will next owe rent #[pyo3(get)] - pub rent_epoch: Epoch, + pub rent_epoch: u64, } impl From for Account { @@ -91,13 +91,13 @@ impl From for AccountOriginal { #[pymethods] impl Account { #[new] - #[pyo3(signature = (lamports, data, owner, executable = false, rent_epoch = Epoch::default()))] + #[pyo3(signature = (lamports, data, owner, executable = false, rent_epoch = u64::default()))] pub fn new( lamports: u64, data: &[u8], owner: Pubkey, executable: bool, - rent_epoch: Epoch, + rent_epoch: u64, ) -> Self { AccountOriginal { lamports, @@ -190,7 +190,7 @@ pub struct AccountJSON { pub executable: bool, /// int: The epoch at which this account will next owe rent. #[pyo3(get)] - pub rent_epoch: Epoch, + pub rent_epoch: u64, } #[richcmp_eq_only] @@ -198,13 +198,13 @@ pub struct AccountJSON { #[pymethods] impl AccountJSON { #[new] - #[pyo3(signature = (lamports, data, owner, executable=false, rent_epoch=Epoch::default()))] + #[pyo3(signature = (lamports, data, owner, executable=false, rent_epoch=u64::default()))] pub fn new( lamports: u64, data: ParsedAccount, owner: Pubkey, executable: bool, - rent_epoch: Epoch, + rent_epoch: u64, ) -> Self { Self { lamports, diff --git a/crates/address-lookup-table-account/Cargo.toml b/crates/address-lookup-table-account/Cargo.toml index 83a527d2..1cca9fc7 100644 --- a/crates/address-lookup-table-account/Cargo.toml +++ b/crates/address-lookup-table-account/Cargo.toml @@ -10,10 +10,10 @@ description = "Solders address lookup table account crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } -solana-address-lookup-table-interface = { workspace = true } +solana-address-lookup-table-interface = { workspace = true, features = ["bincode", "bytemuck"] } solana-message = { workspace = true } solana-pubkey = { workspace = true } -solana-slot-hashes = { workspace = true } +solana-slot-hashes = { workspace = true, features = ["serde"] } solders-traits-core = { workspace = true } solders-macros = { workspace = true } serde = { workspace = true } diff --git a/crates/address-lookup-table-account/src/lib.rs b/crates/address-lookup-table-account/src/lib.rs index 854746ba..c9b35342 100644 --- a/crates/address-lookup-table-account/src/lib.rs +++ b/crates/address-lookup-table-account/src/lib.rs @@ -170,7 +170,7 @@ impl_defaults!(SlotHashes); #[pymethods] impl SlotHashes { #[new] - pub fn new(slot_hashes: Vec<(Slot, Hash)>) -> Self { + pub fn new(slot_hashes: Vec<(u64, Hash)>) -> Self { SlotHashes(SlotHashesOriginal::new( &slot_hashes .into_iter() @@ -179,7 +179,7 @@ impl SlotHashes { )) } #[getter] - pub fn slot_hashes(&self) -> Vec<(Slot, Hash)> { + pub fn slot_hashes(&self) -> Vec<(u64, Hash)> { self.0 .slot_hashes() .iter() @@ -242,11 +242,11 @@ impl LookupTableMeta { self.0._padding } - pub fn is_active(&self, current_slot: Slot, slot_hashes: SlotHashes) -> bool { + pub fn is_active(&self, current_slot: u64, slot_hashes: SlotHashes) -> bool { self.0.is_active(current_slot, &slot_hashes.into()) } - pub fn status(&self, current_slot: Slot, slot_hashes: SlotHashes) -> LookupTableStatusType { + pub fn status(&self, current_slot: u64, slot_hashes: SlotHashes) -> LookupTableStatusType { self.0.status(current_slot, &slot_hashes.into()).into() } } @@ -291,7 +291,7 @@ impl AddressLookupTable { pub fn get_active_addresses_len( &self, - current_slot: Slot, + current_slot: u64, slot_hashes: SlotHashes, ) -> PyResult { handle_py_value_err( @@ -302,7 +302,7 @@ impl AddressLookupTable { pub fn lookup( &self, - current_slot: Slot, + current_slot: u64, indexes: Vec, slot_hashes: SlotHashes, ) -> PyResult> { diff --git a/crates/base64-string/Cargo.toml b/crates/base64-string/Cargo.toml index 53b6ce80..e0850c7d 100644 --- a/crates/base64-string/Cargo.toml +++ b/crates/base64-string/Cargo.toml @@ -10,8 +10,9 @@ description = "Solders base64 string crate." [dependencies] serde = { workspace = true } +solana-message = { workspace = true } +solana-transaction = { workspace = true } solders-message = { workspace = true } solders-transaction = { workspace = true } -solana-sdk = { workspace = true } base64 = { workspace = true } bincode = { workspace = true } diff --git a/crates/base64-string/src/lib.rs b/crates/base64-string/src/lib.rs index 02eed8e5..03908f4b 100644 --- a/crates/base64-string/src/lib.rs +++ b/crates/base64-string/src/lib.rs @@ -2,10 +2,10 @@ use solders_message::VersionedMessage; use solders_transaction::{Transaction, VersionedTransaction}; extern crate base64; use serde::{Deserialize, Serialize}; -use solana_sdk::{ - message::VersionedMessage as VersionedMessageOriginal, - transaction::{ - Transaction as TransactionOriginal, VersionedTransaction as VersionedTransactionOriginal, +use { + solana_message::VersionedMessage as VersionedMessageOriginal, + solana_transaction::{ + Transaction as TransactionOriginal, versioned::VersionedTransaction as VersionedTransactionOriginal, }, }; diff --git a/crates/commitment-config/Cargo.toml b/crates/commitment-config/Cargo.toml index 33393684..4938e4f3 100644 --- a/crates/commitment-config/Cargo.toml +++ b/crates/commitment-config/Cargo.toml @@ -11,6 +11,6 @@ description = "Solders commitment config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } solders-traits = { workspace = true } -solana-sdk = { workspace = true } +solana-commitment-config = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/commitment-config/src/lib.rs b/crates/commitment-config/src/lib.rs index 0426259c..f21867a5 100644 --- a/crates/commitment-config/src/lib.rs +++ b/crates/commitment-config/src/lib.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_sdk::commitment_config::{ +use solana_commitment_config::{ CommitmentConfig as CommitmentConfigOriginal, CommitmentLevel as CommitmentLevelOriginal, }; diff --git a/crates/compute-budget/Cargo.toml b/crates/compute-budget/Cargo.toml index 298765f0..ac6fc4c4 100644 --- a/crates/compute-budget/Cargo.toml +++ b/crates/compute-budget/Cargo.toml @@ -11,7 +11,8 @@ description = "Solders compute budget crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } solana-compute-budget = { workspace = true } -solana-sdk = { workspace = true } +solana-compute-budget-interface = { workspace = true } +solana-sdk-ids = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } solders-instruction = { workspace = true } diff --git a/crates/compute-budget/src/lib.rs b/crates/compute-budget/src/lib.rs index b155ff47..570459b3 100644 --- a/crates/compute-budget/src/lib.rs +++ b/crates/compute-budget/src/lib.rs @@ -1,8 +1,9 @@ use pyo3::prelude::*; use solana_compute_budget::compute_budget::ComputeBudget as ComputeBudgetOriginal; -use solana_sdk::compute_budget::{ComputeBudgetInstruction, ID}; +use solana_compute_budget_interface::ComputeBudgetInstruction; use solders_instruction::Instruction; use solders_pubkey::Pubkey; +use solana_sdk_ids::compute_budget::ID; use solders_traits_core::RichcmpEqualityOnly; /// Request a specific transaction-wide program heap region size in bytes. diff --git a/crates/epoch-info/Cargo.toml b/crates/epoch-info/Cargo.toml index f31ad792..f767a78f 100644 --- a/crates/epoch-info/Cargo.toml +++ b/crates/epoch-info/Cargo.toml @@ -12,6 +12,6 @@ description = "Solders epoch info crate." pyo3 = { workspace = true, features = ["macros"] } solders-traits-core = { workspace = true } solders-macros = { workspace = true } -solana-sdk = { workspace = true } +solana-epoch-info = { workspace = true, features = ["serde"] } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/epoch-info/src/lib.rs b/crates/epoch-info/src/lib.rs index 797b0047..474af2a6 100644 --- a/crates/epoch-info/src/lib.rs +++ b/crates/epoch-info/src/lib.rs @@ -1,7 +1,7 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_sdk::epoch_info::EpochInfo as EpochInfoOriginal; +use solana_epoch_info::EpochInfo as EpochInfoOriginal; use solders_macros::{common_methods, richcmp_eq_only}; use solders_traits_core::{ diff --git a/crates/hash/src/lib.rs b/crates/hash/src/lib.rs index 9eff5aca..a405f986 100644 --- a/crates/hash/src/lib.rs +++ b/crates/hash/src/lib.rs @@ -1,7 +1,7 @@ use std::str::FromStr; use derive_more::{From, Into}; -use pyo3::prelude::*; +use pyo3::{prelude::*, exceptions::PyValueError}; use serde::{Deserialize, Serialize}; use solana_hash::{ Hash as HashOriginal, ParseHashError as ParseHashErrorOriginal, HASH_BYTES, @@ -134,7 +134,8 @@ impl Hash { impl PyFromBytesGeneral for Hash { fn py_from_bytes_general(raw: &[u8]) -> PyResult { - Ok(HashOriginal::new(raw).into()) + let converted = raw.try_into().map_err(|e| PyErr::new::(format!("{:?}", e)))?; + Ok(HashOriginal::new_from_array(converted).into()) } } diff --git a/crates/keypair/Cargo.toml b/crates/keypair/Cargo.toml index a763fa3f..f50145ce 100644 --- a/crates/keypair/Cargo.toml +++ b/crates/keypair/Cargo.toml @@ -9,11 +9,17 @@ repository = { workspace = true } description = "Solders keypair crate." [dependencies] +five8 = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } +solana-derivation-path = { workspace = true } +solana-keypair = { workspace = true, features = ["seed-derivable"] } +solana-presigner = { workspace = true } +solana-pubkey = { workspace = true } +solana-signature = { workspace = true } +solana-signer = { workspace = true } solders-traits-core = { workspace = true } solders-traits = { workspace = true } solders-macros = { workspace = true } -solana-sdk = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } solders-pubkey = { workspace = true } diff --git a/crates/keypair/src/lib.rs b/crates/keypair/src/lib.rs index 6d246412..2eaee932 100644 --- a/crates/keypair/src/lib.rs +++ b/crates/keypair/src/lib.rs @@ -1,14 +1,12 @@ use derive_more::{From, Into}; use pyo3::{exceptions::PyValueError, prelude::*}; use serde::{Deserialize, Serialize}; -use solana_sdk::{ - derivation_path::DerivationPath, - signature::keypair_from_seed_and_derivation_path, - signer::{ - keypair::{ - keypair_from_seed, keypair_from_seed_phrase_and_passphrase, Keypair as KeypairOriginal, - }, - Signer as SignerTrait, +use { + solana_derivation_path::DerivationPath, + solana_signer::Signer as SignerTrait, + solana_keypair::{ + keypair_from_seed, keypair_from_seed_phrase_and_passphrase, Keypair as KeypairOriginal, + seed_derivable::keypair_from_seed_and_derivation_path }, }; use solders_macros::{common_methods, pyhash, richcmp_signer}; @@ -27,7 +25,7 @@ pub mod signer; mod keypair_serde { use serde::{self, Deserialize, Deserializer, Serializer}; - use solana_sdk::signer::keypair::Keypair as KeypairOriginal; + use solana_keypair::Keypair as KeypairOriginal; pub fn serialize(kp: &KeypairOriginal, serializer: S) -> Result where @@ -121,10 +119,9 @@ impl Keypair { /// >>> assert str(kp) == base58_str /// pub fn from_base58_string(s: &str) -> PyResult { - let decoded = solana_sdk::bs58::decode(s) - .into_vec() - .map_err(|e| PyErr::new::(format!("{:?}", e)))?; - Self::py_from_bytes_general(&decoded) + let mut buf = [0u8; 64]; + five8::decode_64(s, &mut buf).map_err(|e| PyErr::new::(format!("{:?}", e)))?; + Self::py_from_bytes_general(&buf) } /// Gets this ``Keypair``'s secret key. /// diff --git a/crates/keypair/src/null_signer.rs b/crates/keypair/src/null_signer.rs index 08937940..b7163593 100644 --- a/crates/keypair/src/null_signer.rs +++ b/crates/keypair/src/null_signer.rs @@ -1,7 +1,7 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_sdk::signer::{null_signer::NullSigner as NullSignerOriginal, Signer as SignerTrait}; +use solana_signer::{null_signer::NullSigner as NullSignerOriginal, Signer as SignerTrait}; use solders_macros::{common_methods, pyhash, richcmp_signer}; use solders_pubkey::Pubkey; use solders_signature::Signature; @@ -13,9 +13,9 @@ use solders_traits_core::{ mod null_signer_serde { use serde::{self, Deserialize, Deserializer, Serializer}; - use solana_sdk::{ - pubkey::Pubkey as PubkeyOriginal, signature::Signer, - signer::null_signer::NullSigner as NullSignerOriginal, + use { + solana_pubkey::Pubkey as PubkeyOriginal, + solana_signer::{Signer, null_signer::NullSigner as NullSignerOriginal}, }; pub fn serialize(ns: &NullSignerOriginal, serializer: S) -> Result diff --git a/crates/keypair/src/presigner.rs b/crates/keypair/src/presigner.rs index 78c5ec64..a5f3744f 100644 --- a/crates/keypair/src/presigner.rs +++ b/crates/keypair/src/presigner.rs @@ -1,5 +1,6 @@ use pyo3::prelude::*; -use solana_sdk::signer::{presigner::Presigner as PresignerOriginal, Signer as SignerTrait}; +use solana_presigner::Presigner as PresignerOriginal; +use solana_signer::Signer as SignerTrait; use solders_macros::{pyhash, richcmp_signer}; use solders_pubkey::Pubkey; use solders_signature::Signature; diff --git a/crates/keypair/src/signer.rs b/crates/keypair/src/signer.rs index 3d910298..394746f6 100644 --- a/crates/keypair/src/signer.rs +++ b/crates/keypair/src/signer.rs @@ -1,10 +1,10 @@ use pyo3::prelude::*; use crate::{null_signer::NullSigner, presigner::Presigner, Keypair}; -use solana_sdk::{ - pubkey::Pubkey as PubkeyOriginal, - signature::Signature as SignatureOriginal, - signer::{signers::Signers, Signer as SignerTrait, SignerError as SignerErrorOriginal}, +use { + solana_pubkey::Pubkey as PubkeyOriginal, + solana_signature::Signature as SignatureOriginal, + solana_signer::{signers::Signers, Signer as SignerTrait, SignerError as SignerErrorOriginal}, }; use solders_traits::{SignerTraitWrapper, ToSignerOriginal}; diff --git a/crates/litesvm/Cargo.toml b/crates/litesvm/Cargo.toml index d82ddef0..948d5fab 100644 --- a/crates/litesvm/Cargo.toml +++ b/crates/litesvm/Cargo.toml @@ -12,7 +12,18 @@ description = "Solders LiteSVM crate." pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } litesvm = { workspace = true, features = ["nodejs-internal", "serde"] } -solana-sdk = { workspace = true } +solana-account = { workspace = true } +solana-clock = { workspace = true } +solana-epoch-rewards = { workspace = true } +solana-epoch-schedule = { workspace = true } +solana-feature-set = { workspace = true } +solana-hash = { workspace = true } +solana-message = { workspace = true } +solana-rent = { workspace = true } +solana-slot-hashes = { workspace = true } +solana-slot-history = { workspace = true } +solana-stake-interface = { workspace = true } +solana-last-restart-slot = { workspace = true } solders-account = { workspace = true } solders-compute-budget = { workspace = true } solders-hash = { workspace = true } diff --git a/crates/litesvm/src/lib.rs b/crates/litesvm/src/lib.rs index aa289e67..4cb7f662 100644 --- a/crates/litesvm/src/lib.rs +++ b/crates/litesvm/src/lib.rs @@ -1,14 +1,15 @@ use { litesvm::LiteSVM as LiteSVMOriginal, pyo3::{exceptions::PyFileNotFoundError, prelude::*}, - solana_sdk::{ - account::Account as AccountOriginal, clock::Clock as ClockOriginal, - epoch_rewards::EpochRewards as EpochRewardsOriginal, - epoch_schedule::EpochSchedule as EpochScheduleOriginal, - feature_set::FeatureSet as FeatureSetOriginal, rent::Rent as RentOriginal, - slot_hashes::SlotHashes, slot_history::SlotHistory as SlotHistoryOriginal, - stake_history::StakeHistory as StakeHistoryOriginal, - sysvar::last_restart_slot::LastRestartSlot, + { + solana_account::Account as AccountOriginal, + solana_clock::Clock as ClockOriginal, + solana_epoch_rewards::EpochRewards as EpochRewardsOriginal, + solana_epoch_schedule::EpochSchedule as EpochScheduleOriginal, + solana_feature_set::FeatureSet as FeatureSetOriginal, solana_rent::Rent as RentOriginal, + solana_slot_hashes::SlotHashes, solana_slot_history::SlotHistory as SlotHistoryOriginal, + solana_stake_interface::stake_history::StakeHistory as StakeHistoryOriginal, + solana_last_restart_slot::LastRestartSlot, }, solders_account::Account, solders_compute_budget::ComputeBudget, @@ -310,7 +311,7 @@ impl LiteSVM { } pub fn set_slot_hashes(&mut self, hashes: Vec<(u64, Blockhash)>) { - let mut intermediate: Vec<(u64, solana_sdk::hash::Hash)> = Vec::with_capacity(hashes.len()); + let mut intermediate: Vec<(u64, solana_hash::Hash)> = Vec::with_capacity(hashes.len()); for h in hashes { let converted_hash = h.1 .0; intermediate.push((h.0, converted_hash)); diff --git a/crates/litesvm/src/transaction_metadata.rs b/crates/litesvm/src/transaction_metadata.rs index 4d440512..cfcc9021 100644 --- a/crates/litesvm/src/transaction_metadata.rs +++ b/crates/litesvm/src/transaction_metadata.rs @@ -7,10 +7,8 @@ use { }, pyo3::prelude::*, serde::{Deserialize, Serialize}, - solana_sdk::{ - account::Account as AccountOriginal, - inner_instruction::InnerInstruction as InnerInstructionOriginal, - }, + solana_account::Account as AccountOriginal, + solana_message::inner_instruction::InnerInstruction as InnerInstructionOriginal, solders_account::Account, solders_instruction::CompiledInstruction, solders_pubkey::Pubkey, diff --git a/crates/message/Cargo.toml b/crates/message/Cargo.toml index e8abc7d1..b4c8c82f 100644 --- a/crates/message/Cargo.toml +++ b/crates/message/Cargo.toml @@ -14,7 +14,7 @@ solders-traits-core = { workspace = true } solders-traits = { workspace = true } solders-macros = { workspace = true } solana-instruction = { workspace = true } -solana-message = { workspace = true } +solana-message = { workspace = true, features = ["bincode", "blake3"] } solana-pubkey = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/rpc-config-no-filter/Cargo.toml b/crates/rpc-config-no-filter/Cargo.toml index 4fec50eb..9820da07 100644 --- a/crates/rpc-config-no-filter/Cargo.toml +++ b/crates/rpc-config-no-filter/Cargo.toml @@ -20,4 +20,3 @@ solana-rpc-client-api = { workspace = true } solders-rpc-config-macros = { workspace = true } solders-rpc-config-no-rpc-api = { workspace = true } solders-commitment-config = { workspace = true } -solana-sdk = { workspace = true } diff --git a/crates/rpc-responses-common/Cargo.toml b/crates/rpc-responses-common/Cargo.toml index abeabf86..f8f866a4 100644 --- a/crates/rpc-responses-common/Cargo.toml +++ b/crates/rpc-responses-common/Cargo.toml @@ -24,5 +24,4 @@ solders-transaction-error = { workspace = true } solders-rpc-response-data-boilerplate = { workspace = true } solders-rpc-version = { workspace = true } solders-pubkey = { workspace = true } -solana-sdk = { workspace = true } camelpaste = { workspace = true } diff --git a/crates/rpc-responses-common/src/lib.rs b/crates/rpc-responses-common/src/lib.rs index bf506509..171867fb 100644 --- a/crates/rpc-responses-common/src/lib.rs +++ b/crates/rpc-responses-common/src/lib.rs @@ -14,7 +14,6 @@ use solana_rpc_client_api::response::{ RpcVersionInfo as RpcVersionInfoOriginal, RpcVoteAccountInfo as RpcVoteAccountInfoOriginal, RpcVoteAccountStatus as RpcVoteAccountStatusOriginal, }; -use solana_sdk::clock::{Epoch, Slot}; use solders_account::{Account, AccountJSON}; use solders_account_decoder::UiTokenAmount; use solders_hash::Hash as SolderHash; @@ -29,7 +28,7 @@ use solders_rpc_response_data_boilerplate::response_data_boilerplate; #[pyclass(module = "solders.rpc.responses", subclass)] pub struct RpcResponseContext { #[pyo3(get)] - pub slot: Slot, + pub slot: u64, #[pyo3(get)] #[serde(skip_serializing_if = "Option::is_none", default)] pub api_version: Option, @@ -41,7 +40,7 @@ pub struct RpcResponseContext { impl RpcResponseContext { #[pyo3(signature = (slot, api_version=None))] #[new] - pub fn new(slot: Slot, api_version: Option) -> Self { + pub fn new(slot: u64, api_version: Option) -> Self { Self { slot, api_version } } } @@ -523,9 +522,9 @@ impl RpcVoteAccountInfo { activated_stake: u64, commission: u8, epoch_vote_account: bool, - epoch_credits: Vec<(Epoch, u64, u64)>, + epoch_credits: Vec<(u64, u64, u64)>, last_vote: u64, - root_slot: Slot, + root_slot: u64, ) -> Self { RpcVoteAccountInfoOriginal { vote_pubkey: vote_pubkey.to_string(), @@ -560,7 +559,7 @@ impl RpcVoteAccountInfo { self.0.epoch_vote_account } #[getter] - pub fn epoch_credits(&self) -> Vec<(Epoch, u64, u64)> { + pub fn epoch_credits(&self) -> Vec<(u64, u64, u64)> { self.0.epoch_credits.clone() } #[getter] @@ -568,7 +567,7 @@ impl RpcVoteAccountInfo { self.0.last_vote } #[getter] - pub fn root_slot(&self) -> Slot { + pub fn root_slot(&self) -> u64 { self.0.root_slot } } diff --git a/crates/rpc-responses/Cargo.toml b/crates/rpc-responses/Cargo.toml index ea5858e6..c1eb74c0 100644 --- a/crates/rpc-responses/Cargo.toml +++ b/crates/rpc-responses/Cargo.toml @@ -36,7 +36,6 @@ solders-rpc-errors-tx-status = { workspace = true } solders-rpc-version = { workspace = true } solders-pubkey = { workspace = true } solders-signature = { workspace = true } -solana-sdk = { workspace = true } solana-account-decoder-client-types = { workspace = true } thiserror = { workspace = true } camelpaste = { workspace = true } diff --git a/crates/rpc-responses/src/lib.rs b/crates/rpc-responses/src/lib.rs index 7c765fae..3e5a669f 100644 --- a/crates/rpc-responses/src/lib.rs +++ b/crates/rpc-responses/src/lib.rs @@ -46,7 +46,6 @@ use solana_rpc_client_api::{ SlotTransactionStats as SlotTransactionStatsOriginal, SlotUpdate as SlotUpdateOriginal, }, }; -use solana_sdk::clock::{Epoch, Slot, UnixTimestamp}; use solana_transaction_status_client_types::TransactionStatus as TransactionStatusOriginal; use solders_account::{Account, AccountJSON}; use solders_account_decoder::UiTokenAmount; @@ -88,6 +87,7 @@ use solders_rpc_responses_common::{ SignatureNotification, SignatureNotificationResult, SubscriptionResult, UnsubscribeResult, }; use solders_rpc_responses_tx_status::RpcConfirmedTransactionStatusWithSignature; +type Slot = u64; pub trait CommonMethodsRpcResp<'a>: std::fmt::Display @@ -1032,7 +1032,7 @@ response_data_boilerplate!(RpcInflationRate); #[pymethods] impl RpcInflationRate { #[new] - pub fn new(total: f64, validator: f64, foundation: f64, epoch: Epoch) -> Self { + pub fn new(total: f64, validator: f64, foundation: f64, epoch: u64) -> Self { RpcInflationRateOriginal { total, validator, @@ -1055,7 +1055,7 @@ impl RpcInflationRate { self.0.foundation } #[getter] - pub fn epoch(&self) -> Epoch { + pub fn epoch(&self) -> u64 { self.0.epoch } } @@ -1075,7 +1075,7 @@ impl RpcInflationReward { #[pyo3(signature = (epoch, effective_slot, amount, post_balance, commission=None))] #[new] pub fn new( - epoch: Epoch, + epoch: u64, effective_slot: Slot, amount: u64, post_balance: u64, @@ -1091,7 +1091,7 @@ impl RpcInflationReward { .into() } #[getter] - pub fn epoch(&self) -> Epoch { + pub fn epoch(&self) -> u64 { self.0.epoch } #[getter] @@ -1647,7 +1647,7 @@ impl RpcVote { vote_pubkey: Pubkey, slots: Vec, hash: SolderHash, - timestamp: Option, + timestamp: Option, signature: Signature, ) -> Self { RpcVoteOriginal { @@ -1672,7 +1672,7 @@ impl RpcVote { self.0.hash.parse().unwrap() } #[getter] - pub fn timestamp(&self) -> Option { + pub fn timestamp(&self) -> Option { self.0.timestamp } #[getter] diff --git a/crates/rpc-send-transaction-config/Cargo.toml b/crates/rpc-send-transaction-config/Cargo.toml index cec156cd..50145c84 100644 --- a/crates/rpc-send-transaction-config/Cargo.toml +++ b/crates/rpc-send-transaction-config/Cargo.toml @@ -12,7 +12,7 @@ description = "Solders RPC send transaction config crate." pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } solders-macros = { workspace = true } -solana-sdk = { workspace = true } +solana-commitment-config = { workspace = true } solana-rpc-client-api = { workspace = true } solders-rpc-config-macros = { workspace = true } solders-commitment-config = { workspace = true } diff --git a/crates/rpc-send-transaction-config/src/lib.rs b/crates/rpc-send-transaction-config/src/lib.rs index 245be173..3cca8f48 100644 --- a/crates/rpc-send-transaction-config/src/lib.rs +++ b/crates/rpc-send-transaction-config/src/lib.rs @@ -1,7 +1,7 @@ use pyo3::prelude::*; use serde::{Deserialize, Serialize}; use solana_rpc_client_api::config as rpc_config; -use solana_sdk::commitment_config::CommitmentLevel as CommitmentLevelOriginal; +use solana_commitment_config::CommitmentLevel as CommitmentLevelOriginal; use solana_transaction_status_client_types::UiTransactionEncoding as UiTransactionEncodingOriginal; use solders_commitment_config::CommitmentLevel; use solders_macros::{common_methods, richcmp_eq_only}; diff --git a/crates/signature/Cargo.toml b/crates/signature/Cargo.toml index dba8632e..6daf3e7e 100644 --- a/crates/signature/Cargo.toml +++ b/crates/signature/Cargo.toml @@ -13,6 +13,6 @@ pyo3 = { workspace = true, features = ["macros"] } solders-traits-core = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } -solana-sdk = { workspace = true } +solana-signature = { workspace = true, features = ["rand"] } serde = { workspace = true } derive_more = { workspace = true } diff --git a/crates/signature/src/lib.rs b/crates/signature/src/lib.rs index 1ddf1ece..2f913a58 100644 --- a/crates/signature/src/lib.rs +++ b/crates/signature/src/lib.rs @@ -3,7 +3,7 @@ use std::str::FromStr; use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_sdk::signature::{ParseSignatureError, Signature as SignatureOriginal, SIGNATURE_BYTES}; +use solana_signature::{ParseSignatureError, Signature as SignatureOriginal, SIGNATURE_BYTES}; use solders_macros::{common_methods, pyhash, richcmp_full}; use solders_pubkey::Pubkey; diff --git a/crates/system-program/Cargo.toml b/crates/system-program/Cargo.toml index d421ce0b..b709627e 100644 --- a/crates/system-program/Cargo.toml +++ b/crates/system-program/Cargo.toml @@ -11,6 +11,10 @@ description = "Solders system program crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } dict_derive = "0.6.0" +solana-instruction = { workspace = true } +solana-pubkey = { workspace = true } +solana-sdk-ids = { workspace = true } +solana-system-interface = { workspace = true } solders-traits-core = { workspace = true } solders-traits = { workspace = true } solders-instruction = { workspace = true } @@ -20,4 +24,3 @@ solana-address-lookup-table-interface = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } bincode = { workspace = true } -solana-sdk = { workspace = true } diff --git a/crates/system-program/src/lib.rs b/crates/system-program/src/lib.rs index 834fa234..d1ed122f 100644 --- a/crates/system-program/src/lib.rs +++ b/crates/system-program/src/lib.rs @@ -9,10 +9,10 @@ use solana_address_lookup_table_interface::instruction::{ extend_lookup_table as extend_lookup_table_original, freeze_lookup_table as freeze_lookup_table_original, }; -use solana_sdk::{ - instruction::Instruction as InstructionOriginal, - pubkey::Pubkey as PubkeyOriginal, - system_instruction::{ +use { + solana_instruction::Instruction as InstructionOriginal, + solana_pubkey::Pubkey as PubkeyOriginal, + solana_system_interface::instruction::{ advance_nonce_account as advance_nonce_account_original, allocate as allocate_original, allocate_with_seed as allocate_with_seed_original, assign as assign_original, assign_with_seed as assign_with_seed_original, @@ -26,7 +26,7 @@ use solana_sdk::{ withdraw_nonce_account as withdraw_nonce_account_original, SystemInstruction as SystemInstructionOriginal, }, - system_program, + solana_sdk_ids::system_program, }; use solders_instruction::Instruction; diff --git a/crates/traits/Cargo.toml b/crates/traits/Cargo.toml index 4eadfe37..fe027e6b 100644 --- a/crates/traits/Cargo.toml +++ b/crates/traits/Cargo.toml @@ -10,7 +10,13 @@ repository = { workspace = true } [dependencies] pyo3 = { workspace = true } -solana-sdk = { workspace = true } +solana-commitment-config = { workspace = true } +solana-hash = { workspace = true } +solana-pubkey = { workspace = true } +solana-sanitize = { workspace = true } +solana-signature = { workspace = true } +solana-signer = { workspace = true } +solana-transaction-error = { workspace = true } bincode = { workspace = true } litesvm = { workspace = true, optional = true } serde_json = { workspace = true } diff --git a/crates/traits/src/lib.rs b/crates/traits/src/lib.rs index 802f7e4b..a2c97d04 100644 --- a/crates/traits/src/lib.rs +++ b/crates/traits/src/lib.rs @@ -4,15 +4,14 @@ use litesvm::error::LiteSVMError as LiteSVMErrorOriginal; use pyo3::{create_exception, exceptions::PyException, prelude::*, pyclass::CompareOp}; #[cfg(feature = "banks-client")] use solana_banks_client::BanksClientError as BanksClientErrorOriginal; -use solana_sdk::{ - commitment_config::ParseCommitmentLevelError as ParseCommitmentLevelErrorOriginal, - hash::ParseHashError as ParseHashErrorOriginal, - pubkey::Pubkey as PubkeyOriginal, - pubkey::PubkeyError as PubkeyErrorOriginal, - sanitize::SanitizeError as SanitizeErrorOriginal, - signature::Signature as SignatureOriginal, - signer::{Signer as SignerTrait, SignerError as SignerErrorOriginal}, - transaction::TransactionError as TransactionErrorOriginal, +use { + solana_commitment_config::ParseCommitmentLevelError as ParseCommitmentLevelErrorOriginal, + solana_hash::ParseHashError as ParseHashErrorOriginal, + solana_pubkey::{Pubkey as PubkeyOriginal, PubkeyError as PubkeyErrorOriginal}, + solana_sanitize::SanitizeError as SanitizeErrorOriginal, + solana_signature::Signature as SignatureOriginal, + solana_signer::{Signer as SignerTrait, SignerError as SignerErrorOriginal}, + solana_transaction_error::TransactionError as TransactionErrorOriginal, }; use solders_traits_core::richcmp_type_error; pub struct PyErrWrapper(pub PyErr); diff --git a/crates/transaction-error/Cargo.toml b/crates/transaction-error/Cargo.toml index 5b4744cf..8adf5cb1 100644 --- a/crates/transaction-error/Cargo.toml +++ b/crates/transaction-error/Cargo.toml @@ -10,7 +10,8 @@ description = "Solders transaction error crate." [dependencies] serde = { workspace = true } -solana-sdk = { workspace = true } +solana-instruction = { workspace = true } +solana-transaction-error = { workspace = true } solders-traits-core = { workspace = true } solders-macros = { workspace = true } derive_more = { workspace = true } diff --git a/crates/transaction-error/src/lib.rs b/crates/transaction-error/src/lib.rs index 61fb9cc8..1d5caa78 100644 --- a/crates/transaction-error/src/lib.rs +++ b/crates/transaction-error/src/lib.rs @@ -1,9 +1,9 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_sdk::{ - instruction::InstructionError as InstructionErrorOriginal, - transaction::TransactionError as TransactionErrorOriginal, +use { + solana_instruction::error::InstructionError as InstructionErrorOriginal, + solana_transaction_error::TransactionError as TransactionErrorOriginal, }; use solders_macros::{common_methods, richcmp_eq_only}; use solders_traits_core::transaction_status_boilerplate; diff --git a/crates/transaction-return-data/Cargo.toml b/crates/transaction-return-data/Cargo.toml index bd9fb952..2d8baa23 100644 --- a/crates/transaction-return-data/Cargo.toml +++ b/crates/transaction-return-data/Cargo.toml @@ -10,7 +10,7 @@ description = "Solders transaction return data crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } -solana-sdk = { workspace = true } +solana-transaction-context = { workspace = true } serde = { workspace = true } derive_more = { workspace = true } solders-pubkey = { workspace = true } diff --git a/crates/transaction-return-data/src/lib.rs b/crates/transaction-return-data/src/lib.rs index ffac5bb8..d285b964 100644 --- a/crates/transaction-return-data/src/lib.rs +++ b/crates/transaction-return-data/src/lib.rs @@ -6,7 +6,7 @@ use solders_traits_core::transaction_status_boilerplate; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_sdk::transaction_context::TransactionReturnData as TransactionReturnDataOriginal; +use solana_transaction_context::TransactionReturnData as TransactionReturnDataOriginal; use solana_transaction_status_client_types::UiTransactionReturnData; use solders_macros::{common_methods, richcmp_eq_only}; diff --git a/crates/transaction-status/Cargo.toml b/crates/transaction-status/Cargo.toml index 58b33913..4b766dc6 100644 --- a/crates/transaction-status/Cargo.toml +++ b/crates/transaction-status/Cargo.toml @@ -10,7 +10,7 @@ description = "Solders transaction status crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } -solana-sdk = { workspace = true } +solana-reward-info = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } derive_more = { workspace = true } diff --git a/crates/transaction-status/src/lib.rs b/crates/transaction-status/src/lib.rs index 97129d1a..08cac3a6 100644 --- a/crates/transaction-status/src/lib.rs +++ b/crates/transaction-status/src/lib.rs @@ -28,7 +28,7 @@ use std::str::FromStr; use pyo3::{prelude::*, pyclass::CompareOp, IntoPyObject}; use serde::{Deserialize, Serialize}; use serde_json::Value; -use solana_sdk::{clock::UnixTimestamp, reward_type::RewardType as RewardTypeOriginal, slot_history::Slot}; +use solana_reward_info::RewardType as RewardTypeOriginal; use solana_transaction_status_client_types::{ ParsedAccount as ParsedAccountOriginal, ParsedAccountSource as ParsedAccountSourceOriginal, ParsedInstruction as ParsedInstructionOriginal, @@ -1055,12 +1055,12 @@ pub type Rewards = Vec; #[pyclass(module = "solders.transaction_status", subclass)] pub struct EncodedConfirmedTransactionWithStatusMeta { #[pyo3(get)] - pub slot: Slot, + pub slot: u64, #[serde(flatten)] #[pyo3(get)] pub transaction: EncodedTransactionWithStatusMeta, #[pyo3(get)] - pub block_time: Option, + pub block_time: Option, } transaction_status_boilerplate!(EncodedConfirmedTransactionWithStatusMeta); @@ -1072,9 +1072,9 @@ impl EncodedConfirmedTransactionWithStatusMeta { #[pyo3(signature = (slot, transaction, block_time=None))] #[new] pub fn new( - slot: Slot, + slot: u64, transaction: EncodedTransactionWithStatusMeta, - block_time: Option, + block_time: Option, ) -> Self { Self { slot, @@ -1099,11 +1099,11 @@ impl UiConfirmedBlock { pub fn new( previous_blockhash: SolderHash, blockhash: SolderHash, - parent_slot: Slot, + parent_slot: u64, transactions: Option>, signatures: Option>, rewards: Option, - block_time: Option, + block_time: Option, block_height: Option, num_reward_partitions: Option, ) -> Self { @@ -1132,7 +1132,7 @@ impl UiConfirmedBlock { } #[getter] - pub fn parent_slot(&self) -> Slot { + pub fn parent_slot(&self) -> u64 { self.0.parent_slot } @@ -1158,7 +1158,7 @@ impl UiConfirmedBlock { .map(|v| v.into_iter().map(|r| r.into()).collect()) } #[getter] - pub fn block_time(&self) -> Option { + pub fn block_time(&self) -> Option { self.0.block_time } #[getter] diff --git a/crates/transaction/Cargo.toml b/crates/transaction/Cargo.toml index 5bd86b35..7419ca23 100644 --- a/crates/transaction/Cargo.toml +++ b/crates/transaction/Cargo.toml @@ -13,7 +13,11 @@ pyo3 = { workspace = true, features = ["macros"] } solders-traits = { workspace = true } solders-traits-core = { workspace = true } solders-macros = { workspace = true } -solana-sdk = { workspace = true } +solana-message = { workspace = true } +solana-pubkey = { workspace = true } +solana-sanitize = { workspace = true } +solana-signature = { workspace = true } +solana-transaction = { workspace = true, features = ["bincode", "verify"] } serde = { workspace = true } derive_more = { workspace = true } solders-message = { workspace = true } diff --git a/crates/transaction/src/lib.rs b/crates/transaction/src/lib.rs index 1883b179..666087b3 100644 --- a/crates/transaction/src/lib.rs +++ b/crates/transaction/src/lib.rs @@ -2,16 +2,14 @@ use derive_more::{From, Into}; use pyo3::{prelude::*, IntoPyObject}; use serde::{Deserialize, Serialize}; -use solana_sdk::{ - pubkey::Pubkey as PubkeyOriginal, - sanitize::Sanitize, - signature::Signature as SignatureOriginal, - transaction::{ - uses_durable_nonce, Legacy as LegacyOriginal, Transaction as TransactionOriginal, - TransactionVersion as TransactionVersionOriginal, - VersionedTransaction as VersionedTransactionOriginal, - }, -}; +use { + solana_pubkey::Pubkey as PubkeyOriginal, + solana_sanitize::Sanitize, + solana_signature::Signature as SignatureOriginal, + solana_transaction::{ + uses_durable_nonce, Transaction as TransactionOriginal, + versioned::{Legacy as LegacyOriginal, VersionedTransaction as VersionedTransactionOriginal, TransactionVersion as TransactionVersionOriginal}, + }}; use solders_macros::{common_methods, richcmp_eq_only}; use solders_pubkey::{convert_optional_pubkey, Pubkey}; use solders_traits::handle_py_err; @@ -385,7 +383,7 @@ impl Transaction { program_ids.into_iter().map(PubkeyOriginal::from).collect(); let converted_instructions = instructions .into_iter() - .map(solana_sdk::instruction::CompiledInstruction::from) + .map(solana_message::compiled_instruction::CompiledInstruction::from) .collect(); TransactionOriginal::new_with_compiled_instructions( &SignerVec(from_keypairs), diff --git a/poetry.lock b/poetry.lock index d67cb5df..2a6bc069 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -6,6 +6,7 @@ version = "0.7.13" description = "A configurable sidebar-enabled Sphinx theme" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "alabaster-0.7.13-py3-none-any.whl", hash = "sha256:1ee19aca801bbabb5ba3f5f258e4422dfa86f82f3e9cefb0859b283cdd7f62a3"}, {file = "alabaster-0.7.13.tar.gz", hash = "sha256:a27a4a084d5e690e16e01e03ad2b2e552c61a65469419b907243193de1a84ae2"}, @@ -17,18 +18,19 @@ version = "24.3.0" description = "Classes Without Boilerplate" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "attrs-24.3.0-py3-none-any.whl", hash = "sha256:ac96cd038792094f438ad1f6ff80837353805ac950cd2aa0e0625ef19850c308"}, {file = "attrs-24.3.0.tar.gz", hash = "sha256:8f5c07333d543103541ba7be0e2ce16eeee8130cb0b3f9238ab904ce1e85baff"}, ] [package.extras] -benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier (<24.7)"] -tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] -tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] +tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] [[package]] name = "babel" @@ -36,6 +38,7 @@ version = "2.16.0" description = "Internationalization utilities" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "babel-2.16.0-py3-none-any.whl", hash = "sha256:368b5b98b37c06b7daf6696391c3240c938b37767d4584413e8438c5c435fa8b"}, {file = "babel-2.16.0.tar.gz", hash = "sha256:d1f3554ca26605fe173f3de0c65f750f5a42f924499bf134de6423582298e316"}, @@ -53,6 +56,7 @@ version = "0.1.1" description = "A fast Python library for Base58 and Base58Check" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "based58-0.1.1-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:745851792ce5fada615f05ec61d7f360d19c76950d1e86163b2293c63a5d43bc"}, {file = "based58-0.1.1-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:f8448a71678bd1edc0a464033695686461ab9d6d0bc3282cb29b94f883583572"}, @@ -78,6 +82,7 @@ version = "1.0.1" description = "Version-bump your software with a single command!" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "bump2version-1.0.1-py2.py3-none-any.whl", hash = "sha256:37f927ea17cde7ae2d7baf832f8e80ce3777624554a653006c9144f8017fe410"}, {file = "bump2version-1.0.1.tar.gz", hash = "sha256:762cb2bfad61f4ec8e2bdf452c7c267416f8c70dd9ecb1653fd0bbb01fa936e6"}, @@ -89,6 +94,7 @@ version = "0.6.0" description = "Version-bump your software with a single command!" optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "bumpversion-0.6.0-py2.py3-none-any.whl", hash = "sha256:4eb3267a38194d09f048a2179980bb4803701969bff2c85fa8f6d1ce050be15e"}, {file = "bumpversion-0.6.0.tar.gz", hash = "sha256:4ba55e4080d373f80177b4dabef146c07ce73c7d1377aabf9d3c3ae1f94584a6"}, @@ -103,6 +109,7 @@ version = "2024.12.14" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "certifi-2024.12.14-py3-none-any.whl", hash = "sha256:1275f7a45be9464efc1173084eaa30f866fe2e47d389406136d332ed4967ec56"}, {file = "certifi-2024.12.14.tar.gz", hash = "sha256:b650d30f370c2b724812bee08008be0c4163b163ddaec3f2546c1caf65f191db"}, @@ -114,6 +121,7 @@ version = "3.4.1" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "charset_normalizer-3.4.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:91b36a978b5ae0ee86c394f5a54d6ef44db1de0815eb43de826d41d21e4af3de"}, {file = "charset_normalizer-3.4.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7461baadb4dc00fd9e0acbe254e3d7d2112e7f92ced2adc96e54ef6501c5f176"}, @@ -215,6 +223,8 @@ version = "0.4.6" description = "Cross-platform colored terminal text." optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" +groups = ["dev"] +markers = "sys_platform == \"win32\"" files = [ {file = "colorama-0.4.6-py2.py3-none-any.whl", hash = "sha256:4f1d9991f5acc0ca119f9d443620b77f9d6b33703e51011c16baf57afb285fc6"}, {file = "colorama-0.4.6.tar.gz", hash = "sha256:08695f5cb7ed6e0531a20572697297273c47b8cae5a63ffc6d6ed5c201be6e44"}, @@ -226,6 +236,7 @@ version = "0.18.1" description = "Docutils -- Python Documentation Utilities" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["dev"] files = [ {file = "docutils-0.18.1-py2.py3-none-any.whl", hash = "sha256:23010f129180089fbcd3bc08cfefccb3b890b0050e1ca00c867036e9d161b98c"}, {file = "docutils-0.18.1.tar.gz", hash = "sha256:679987caf361a7539d76e584cbeddc311e3aee937877c87346f31debc63e9d06"}, @@ -237,6 +248,8 @@ version = "1.2.2" description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "exceptiongroup-1.2.2-py3-none-any.whl", hash = "sha256:3111b9d131c238bec2f8f516e123e14ba243563fb135d3fe885990585aa7795b"}, {file = "exceptiongroup-1.2.2.tar.gz", hash = "sha256:47c2edf7c6738fafb49fd34290706d1a1a2f4d1c6df275526b62cbb4aa5393cc"}, @@ -251,6 +264,7 @@ version = "3.10" description = "Internationalized Domain Names in Applications (IDNA)" optional = false python-versions = ">=3.6" +groups = ["dev"] files = [ {file = "idna-3.10-py3-none-any.whl", hash = "sha256:946d195a0d259cbba61165e88e65941f16e9b36ea6ddb97f00452bae8b1287d3"}, {file = "idna-3.10.tar.gz", hash = "sha256:12f65c9b470abda6dc35cf8e63cc574b1c52b11df2c86030af0ac09b01b13ea9"}, @@ -265,6 +279,7 @@ version = "1.4.1" description = "Getting image size from png/jpeg/jpeg2000/gif file" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +groups = ["dev"] files = [ {file = "imagesize-1.4.1-py2.py3-none-any.whl", hash = "sha256:0d8d18d08f840c19d0ee7ca1fd82490fdc3729b7ac93f49870406ddde8ef8d8b"}, {file = "imagesize-1.4.1.tar.gz", hash = "sha256:69150444affb9cb0d5cc5a92b3676f0b2fb7cd9ae39e947a5e11a36b4497cd4a"}, @@ -276,6 +291,8 @@ version = "8.5.0" description = "Read metadata from Python packages" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.10\"" files = [ {file = "importlib_metadata-8.5.0-py3-none-any.whl", hash = "sha256:45e54197d28b7a7f1559e60b95e7c567032b602131fbd588f1497f47880aa68b"}, {file = "importlib_metadata-8.5.0.tar.gz", hash = "sha256:71522656f0abace1d072b9e5481a48f07c138e00f079c38c8f883823f9c26bd7"}, @@ -285,12 +302,12 @@ files = [ zipp = ">=3.20" [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] perf = ["ipython"] -test = ["flufl.flake8", "importlib-resources (>=1.3)", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] +test = ["flufl.flake8", "importlib-resources (>=1.3) ; python_version < \"3.9\"", "jaraco.test (>=5.4)", "packaging", "pyfakefs", "pytest (>=6,!=8.1.*)", "pytest-perf (>=0.9.2)"] type = ["pytest-mypy"] [[package]] @@ -299,6 +316,7 @@ version = "2.0.0" description = "brain-dead simple config-ini parsing" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, @@ -310,6 +328,7 @@ version = "3.1.5" description = "A very fast and expressive template engine." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "jinja2-3.1.5-py3-none-any.whl", hash = "sha256:aba0f4dc9ed8013c424088f68a5c226f7d6097ed89b246d7749c2ec4175c6adb"}, {file = "jinja2-3.1.5.tar.gz", hash = "sha256:8fefff8dc3034e27bb80d67c671eb8a9bc424c0ef4c0826edbff304cceff43bb"}, @@ -327,6 +346,7 @@ version = "0.1.1" description = "A microlibrary that defines a Json type alias for Python." optional = false python-versions = ">=3.7,<4.0" +groups = ["main", "dev"] files = [ {file = "jsonalias-0.1.1-py3-none-any.whl", hash = "sha256:a56d2888e6397812c606156504e861e8ec00e188005af149f003c787db3d3f18"}, {file = "jsonalias-0.1.1.tar.gz", hash = "sha256:64f04d935397d579fc94509e1fcb6212f2d081235d9d6395bd10baedf760a769"}, @@ -338,6 +358,7 @@ version = "2.2.0" description = "Python port of markdown-it. Markdown parsing, done right!" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "markdown-it-py-2.2.0.tar.gz", hash = "sha256:7c9a5e412688bc771c67432cbfebcdd686c93ce6484913dccf06cb5a0bea35a1"}, {file = "markdown_it_py-2.2.0-py3-none-any.whl", hash = "sha256:5a35f8d1870171d9acc47b99612dc146129b631baf04970128b568f190d0cc30"}, @@ -362,6 +383,7 @@ version = "2.1.5" description = "Safely add untrusted strings to HTML/XML markup." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a17a92de5231666cfbe003f0e4b9b3a7ae3afb1ec2845aadc2bacc93ff85febc"}, {file = "MarkupSafe-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:72b6be590cc35924b02c78ef34b467da4ba07e4e0f0454a2c5907f473fc50ce5"}, @@ -431,6 +453,7 @@ version = "1.8.1" description = "Build and publish crates with pyo3, cffi and uniffi bindings as well as rust binaries as python packages" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "maturin-1.8.1-py3-none-linux_armv6l.whl", hash = "sha256:7e590a23d9076b8a994f2e67bc63dc9a2d1c9a41b1e7b45ac354ba8275254e89"}, {file = "maturin-1.8.1-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:8d8251a95682c83ea60988c804b620c181911cd824aa107b4a49ac5333c92968"}, @@ -460,6 +483,7 @@ version = "0.3.5" description = "Collection of plugins for markdown-it-py" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "mdit-py-plugins-0.3.5.tar.gz", hash = "sha256:eee0adc7195e5827e17e02d2a258a2ba159944a0748f59c5099a4a27f78fcf6a"}, {file = "mdit_py_plugins-0.3.5-py3-none-any.whl", hash = "sha256:ca9a0714ea59a24b2b044a1831f48d817dd0c817e84339f20e7889f392d77c4e"}, @@ -479,6 +503,7 @@ version = "0.1.2" description = "Markdown URL utilities" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "mdurl-0.1.2-py3-none-any.whl", hash = "sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8"}, {file = "mdurl-0.1.2.tar.gz", hash = "sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba"}, @@ -490,6 +515,7 @@ version = "0.20" description = "Implementation of Bitcoin BIP-0039" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "mnemonic-0.20-py3-none-any.whl", hash = "sha256:acd2168872d0379e7a10873bb3e12bf6c91b35de758135c4fbd1015ef18fafc5"}, {file = "mnemonic-0.20.tar.gz", hash = "sha256:7c6fb5639d779388027a77944680aee4870f0fcd09b1e42a5525ee2ce4c625f6"}, @@ -501,6 +527,7 @@ version = "0.991" description = "Optional static typing for Python" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "mypy-0.991-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:7d17e0a9707d0772f4a7b878f04b4fd11f6f5bcb9b3813975a9b13c9332153ab"}, {file = "mypy-0.991-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0714258640194d75677e86c786e80ccf294972cc76885d3ebbb560f11db0003d"}, @@ -551,6 +578,7 @@ version = "1.0.0" description = "Type system extensions for programs checked with the mypy type checker." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "mypy_extensions-1.0.0-py3-none-any.whl", hash = "sha256:4392f6c0eb8a5668a69e23d168ffa70f0be9ccfd32b5cc2d26a34ae5b844552d"}, {file = "mypy_extensions-1.0.0.tar.gz", hash = "sha256:75dbf8955dc00442a438fc4d0666508a9a97b6bd41aa2f0ffe9d2f2725af0782"}, @@ -562,6 +590,7 @@ version = "1.0.0" description = "An extended [CommonMark](https://spec.commonmark.org/) compliant parser," optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "myst-parser-1.0.0.tar.gz", hash = "sha256:502845659313099542bd38a2ae62f01360e7dd4b1310f025dd014dfc0439cdae"}, {file = "myst_parser-1.0.0-py3-none-any.whl", hash = "sha256:69fb40a586c6fa68995e6521ac0a525793935db7e724ca9bac1d33be51be9a4c"}, @@ -588,6 +617,7 @@ version = "24.2" description = "Core utilities for Python packages" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "packaging-24.2-py3-none-any.whl", hash = "sha256:09abb1bccd265c01f4a3aa3f7a7db064b36514d2cba19a2f694fe6150451a759"}, {file = "packaging-24.2.tar.gz", hash = "sha256:c228a6dc5e932d346bc5739379109d49e8853dd8223571c7c5b55260edc0b97f"}, @@ -599,6 +629,7 @@ version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, @@ -614,6 +645,7 @@ version = "0.1.0" description = "Python binding to tiny-bip39, the Rust case conversion library" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pybip39-0.1.0-cp37-abi3-macosx_10_7_x86_64.whl", hash = "sha256:fd5c523d2322dc2f83f182ec21b43d1127642c7e231884b83ef65145dc329034"}, {file = "pybip39-0.1.0-cp37-abi3-macosx_10_9_x86_64.macosx_11_0_arm64.macosx_10_9_universal2.whl", hash = "sha256:84716be929385f6aef5a4480c54ae741ce00cc9e2c0a4f48465b51e0417163ec"}, @@ -639,6 +671,7 @@ version = "2.19.1" description = "Pygments is a syntax highlighting package written in Python." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "pygments-2.19.1-py3-none-any.whl", hash = "sha256:9ea1544ad55cecf4b8242fab6dd35a93bbce657034b0611ee383099054ab6d8c"}, {file = "pygments-2.19.1.tar.gz", hash = "sha256:61c16d2a8576dc0649d9f39e089b5f02bcd27fba10d8fb4dcc28173f7a45151f"}, @@ -653,6 +686,7 @@ version = "7.2.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "pytest-7.2.1-py3-none-any.whl", hash = "sha256:c7c6ca206e93355074ae32f7403e8ea12163b1163c976fee7d4d84027c162be5"}, {file = "pytest-7.2.1.tar.gz", hash = "sha256:d45e0952f3727241918b8fd0f376f5ff6b301cc0777c6f9a556935c92d8a7d42"}, @@ -676,6 +710,8 @@ version = "2024.2" description = "World timezone definitions, modern and historical" optional = false python-versions = "*" +groups = ["dev"] +markers = "python_version < \"3.9\"" files = [ {file = "pytz-2024.2-py2.py3-none-any.whl", hash = "sha256:31c7c1817eb7fae7ca4b8c7ee50c72f93aa2dd863de768e1ef4245d426aa0725"}, {file = "pytz-2024.2.tar.gz", hash = "sha256:2aa355083c50a0f93fa581709deac0c9ad65cca8a9e9beac660adcbd493c798a"}, @@ -687,6 +723,7 @@ version = "6.0.2" description = "YAML parser and emitter for Python" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "PyYAML-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0a9a2848a5b7feac301353437eb7d5957887edbf81d56e903999a75a3d743086"}, {file = "PyYAML-6.0.2-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:29717114e51c84ddfba879543fb232a6ed60086602313ca38cce623c1d62cfbf"}, @@ -749,6 +786,7 @@ version = "2.32.3" description = "Python HTTP for Humans." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "requests-2.32.3-py3-none-any.whl", hash = "sha256:70761cfe03c773ceb22aa2f671b4757976145175cdfca038c02654d061d6dcc6"}, {file = "requests-2.32.3.tar.gz", hash = "sha256:55365417734eb18255590a9ff9eb97e9e1da868d4ccd6402399eaf68af20a760"}, @@ -770,6 +808,7 @@ version = "0.1.6" description = "An extremely fast Python linter and code formatter, written in Rust." optional = false python-versions = ">=3.7" +groups = ["dev"] files = [ {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl", hash = "sha256:88b8cdf6abf98130991cbc9f6438f35f6e8d41a02622cc5ee130a02a0ed28703"}, {file = "ruff-0.1.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:5c549ed437680b6105a1299d2cd30e4964211606eeb48a0ff7a93ef70b902248"}, @@ -796,6 +835,7 @@ version = "2.2.0" description = "This package provides 29 stemmers for 28 languages generated from Snowball algorithms." optional = false python-versions = "*" +groups = ["dev"] files = [ {file = "snowballstemmer-2.2.0-py2.py3-none-any.whl", hash = "sha256:c8e1716e83cc398ae16824e5572ae04e0d9fc2c6b985fb0f900f5f0c96ecba1a"}, {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, @@ -807,6 +847,7 @@ version = "6.2.1" description = "Python documentation generator" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "Sphinx-6.2.1.tar.gz", hash = "sha256:6d56a34697bb749ffa0152feafc4b19836c755d90a7c59b72bc7dfd371b9cc6b"}, {file = "sphinx-6.2.1-py3-none-any.whl", hash = "sha256:97787ff1fa3256a3eef9eda523a63dbf299f7b47e053cfcf684a1c2a8380c912"}, @@ -842,6 +883,7 @@ version = "1.2.0" description = "Read the Docs theme for Sphinx" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,>=2.7" +groups = ["dev"] files = [ {file = "sphinx_rtd_theme-1.2.0-py2.py3-none-any.whl", hash = "sha256:f823f7e71890abe0ac6aaa6013361ea2696fc8d3e1fa798f463e82bdb77eeff2"}, {file = "sphinx_rtd_theme-1.2.0.tar.gz", hash = "sha256:a0d8bd1a2ed52e0b338cbe19c4b2eef3c5e7a048769753dac6a9f059c7b641b8"}, @@ -861,6 +903,7 @@ version = "1.0.4" description = "sphinxcontrib-applehelp is a Sphinx extension which outputs Apple help books" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "sphinxcontrib-applehelp-1.0.4.tar.gz", hash = "sha256:828f867945bbe39817c210a1abfd1bc4895c8b73fcaade56d45357a348a07d7e"}, {file = "sphinxcontrib_applehelp-1.0.4-py3-none-any.whl", hash = "sha256:29d341f67fb0f6f586b23ad80e072c8e6ad0b48417db2bde114a4c9746feb228"}, @@ -876,6 +919,7 @@ version = "1.0.2" description = "sphinxcontrib-devhelp is a sphinx extension which outputs Devhelp document." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-devhelp-1.0.2.tar.gz", hash = "sha256:ff7f1afa7b9642e7060379360a67e9c41e8f3121f2ce9164266f61b9f4b338e4"}, {file = "sphinxcontrib_devhelp-1.0.2-py2.py3-none-any.whl", hash = "sha256:8165223f9a335cc1af7ffe1ed31d2871f325254c0423bc0c4c7cd1c1e4734a2e"}, @@ -891,6 +935,7 @@ version = "2.0.1" description = "sphinxcontrib-htmlhelp is a sphinx extension which renders HTML help files" optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "sphinxcontrib-htmlhelp-2.0.1.tar.gz", hash = "sha256:0cbdd302815330058422b98a113195c9249825d681e18f11e8b1f78a2f11efff"}, {file = "sphinxcontrib_htmlhelp-2.0.1-py3-none-any.whl", hash = "sha256:c38cb46dccf316c79de6e5515e1770414b797162b23cd3d06e67020e1d2a6903"}, @@ -906,6 +951,7 @@ version = "4.1" description = "Extension to include jQuery on newer Sphinx releases" optional = false python-versions = ">=2.7" +groups = ["dev"] files = [ {file = "sphinxcontrib-jquery-4.1.tar.gz", hash = "sha256:1620739f04e36a2c779f1a131a2dfd49b2fd07351bf1968ced074365933abc7a"}, {file = "sphinxcontrib_jquery-4.1-py2.py3-none-any.whl", hash = "sha256:f936030d7d0147dd026a4f2b5a57343d233f1fc7b363f68b3d4f1cb0993878ae"}, @@ -920,6 +966,7 @@ version = "1.0.1" description = "A sphinx extension which renders display math in HTML via JavaScript" optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-jsmath-1.0.1.tar.gz", hash = "sha256:a9925e4a4587247ed2191a22df5f6970656cb8ca2bd6284309578f2153e0c4b8"}, {file = "sphinxcontrib_jsmath-1.0.1-py2.py3-none-any.whl", hash = "sha256:2ec2eaebfb78f3f2078e73666b1415417a116cc848b72e5172e596c871103178"}, @@ -934,6 +981,7 @@ version = "1.0.3" description = "sphinxcontrib-qthelp is a sphinx extension which outputs QtHelp document." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-qthelp-1.0.3.tar.gz", hash = "sha256:4c33767ee058b70dba89a6fc5c1892c0d57a54be67ddd3e7875a18d14cba5a72"}, {file = "sphinxcontrib_qthelp-1.0.3-py2.py3-none-any.whl", hash = "sha256:bd9fc24bcb748a8d51fd4ecaade681350aa63009a347a8c14e637895444dfab6"}, @@ -949,6 +997,7 @@ version = "1.1.5" description = "sphinxcontrib-serializinghtml is a sphinx extension which outputs \"serialized\" HTML files (json and pickle)." optional = false python-versions = ">=3.5" +groups = ["dev"] files = [ {file = "sphinxcontrib-serializinghtml-1.1.5.tar.gz", hash = "sha256:aa5f6de5dfdf809ef505c4895e51ef5c9eac17d0f287933eb49ec495280b6952"}, {file = "sphinxcontrib_serializinghtml-1.1.5-py2.py3-none-any.whl", hash = "sha256:352a9a00ae864471d3a7ead8d7d79f5fc0b57e8b3f95e9867eb9eb28999b92fd"}, @@ -964,6 +1013,8 @@ version = "2.2.1" description = "A lil' TOML parser" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.11\"" files = [ {file = "tomli-2.2.1-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:678e4fa69e4575eb77d103de3df8a895e1591b48e740211bd1067378c69e8249"}, {file = "tomli-2.2.1-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:023aa114dd824ade0100497eb2318602af309e5a55595f76b626d6d9f3b7b0a6"}, @@ -1005,6 +1056,7 @@ version = "4.12.2" description = "Backported and Experimental Type Hints for Python 3.8+" optional = false python-versions = ">=3.8" +groups = ["main", "dev"] files = [ {file = "typing_extensions-4.12.2-py3-none-any.whl", hash = "sha256:04e5ca0351e0f3f85c6853954072df659d0d13fac324d0072316b67d7794700d"}, {file = "typing_extensions-4.12.2.tar.gz", hash = "sha256:1a7ead55c7e559dd4dee8856e3a88b41225abfe1ce8df57b7c13915fe121ffb8"}, @@ -1016,13 +1068,14 @@ version = "2.2.3" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" +groups = ["dev"] files = [ {file = "urllib3-2.2.3-py3-none-any.whl", hash = "sha256:ca899ca043dcb1bafa3e262d73aa25c465bfb49e0bd9dd5d59f1d0acba2f8fac"}, {file = "urllib3-2.2.3.tar.gz", hash = "sha256:e7d814a81dad81e6caf2ec9fdedb284ecc9c73076b62654547cc64ccdcae26e9"}, ] [package.extras] -brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] @@ -1033,20 +1086,22 @@ version = "3.20.2" description = "Backport of pathlib-compatible object wrapper for zip files" optional = false python-versions = ">=3.8" +groups = ["dev"] +markers = "python_version < \"3.10\"" files = [ {file = "zipp-3.20.2-py3-none-any.whl", hash = "sha256:a817ac80d6cf4b23bf7f2828b7cabf326f15a001bea8b1f9b49631780ba28350"}, {file = "zipp-3.20.2.tar.gz", hash = "sha256:bc9eb26f4506fda01b81bcde0ca78103b6e62f991b381fec825435c836edbc29"}, ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\""] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] enabler = ["pytest-enabler (>=2.2)"] -test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] +test = ["big-O", "importlib-resources ; python_version < \"3.9\"", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-ignore-flaky"] type = ["pytest-mypy"] [metadata] -lock-version = "2.0" +lock-version = "2.1" python-versions = "^3.8" -content-hash = "123c266673a1f1eafa616c207cebfe4d55bfe87c051a9bfe96ea3578c68df8ca" +content-hash = "86be4757f24c066270aee0bc44664d574d599bbe80f941c2c036f0dec5078410" diff --git a/src/address_lookup_table_account.rs b/src/address_lookup_table_account.rs index f826cac6..2f175af0 100644 --- a/src/address_lookup_table_account.rs +++ b/src/address_lookup_table_account.rs @@ -1,8 +1,6 @@ use pyo3::prelude::*; -use solana_sdk::address_lookup_table::{ - program::ID, - state::{LOOKUP_TABLE_MAX_ADDRESSES, LOOKUP_TABLE_META_SIZE}, -}; +use solana_address_lookup_table_interface::state::{LOOKUP_TABLE_MAX_ADDRESSES, LOOKUP_TABLE_META_SIZE}; +use solana_sdk_ids::address_lookup_table::ID; use solders_address_lookup_table_account::{ derive_lookup_table_address, AddressLookupTable, AddressLookupTableAccount, LookupTableMeta, LookupTableStatusDeactivating, LookupTableStatusFieldless, SlotHashes, diff --git a/src/sysvar.rs b/src/sysvar.rs index fc66683a..8b19118f 100644 --- a/src/sysvar.rs +++ b/src/sysvar.rs @@ -1,6 +1,6 @@ use crate::Pubkey; use pyo3::prelude::*; -use solana_sdk::sysvar as sysvar_original; +use solana_sdk_ids::sysvar as sysvar_original; pub fn include_sysvar(m: &Bound<'_, PyModule>) -> PyResult<()> { let sysvars = vec![ From 809b9d5dc09e3e9bfa747913e756c31f60fa4641 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:01:19 +0000 Subject: [PATCH 03/13] remove unnecessary from_json methods --- Cargo.lock | 1 - crates/macros/src/lib.rs | 18 + crates/rpc-requests/Cargo.toml | 1 - crates/rpc-requests/src/lib.rs | 131 +++--- crates/traits-core/src/lib.rs | 6 + python/solders/rpc/requests.py | 32 -- python/solders/solders.pyi | 148 ------- tests/test_rpc_request_builder.py | 634 +----------------------------- 8 files changed, 78 insertions(+), 893 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a19bfc5f..a4252f06 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5126,7 +5126,6 @@ dependencies = [ "solders-rpc-sim-transaction-config", "solders-rpc-version", "solders-signature", - "solders-traits", "solders-traits-core", "solders-transaction", ] diff --git a/crates/macros/src/lib.rs b/crates/macros/src/lib.rs index 84603fb1..a9108f03 100644 --- a/crates/macros/src/lib.rs +++ b/crates/macros/src/lib.rs @@ -160,6 +160,24 @@ pub fn common_methods(_: TokenStream, item: TokenStream) -> TokenStream { TokenStream::from(ast.to_token_stream()) } +/// Add `__bytes__`, `__str__`, `__repr__`, and `to_json` using the `CommonMethods` trait. +/// +/// Also add `from_bytes` if not already defined. +#[proc_macro_attribute] +pub fn common_methods_ser_only(_: TokenStream, item: TokenStream) -> TokenStream { + let mut ast = parse_macro_input!(item as ItemImpl); + add_core_methods(&mut ast); + let methods = vec![ + ImplItem::Verbatim(quote! { + /// Convert to a JSON string. + pub fn to_json(&self) -> String { + solders_traits_core::CommonMethodsSerOnly::py_to_json(self) + } }), + ]; + ast.items.extend_from_slice(&methods); + TokenStream::from(ast.to_token_stream()) +} + /// Add `__bytes__`, `__str__`, `__repr__`, `__reduce__`, `to_json`, `from_json`, `from_bytes` and `__richcmp__` using the `CommonMethodsRpcResp` trait. #[proc_macro_attribute] pub fn common_methods_rpc_resp(_: TokenStream, item: TokenStream) -> TokenStream { diff --git a/crates/rpc-requests/Cargo.toml b/crates/rpc-requests/Cargo.toml index e22ff6f9..6fb8431b 100644 --- a/crates/rpc-requests/Cargo.toml +++ b/crates/rpc-requests/Cargo.toml @@ -16,7 +16,6 @@ serde_json = { workspace = true } solders-hash = { workspace = true } solders-macros = { workspace = true } solders-traits-core = { workspace = true } -solders-traits = { workspace = true } solders-commitment-config = { workspace = true } solders-rpc-config-no-filter = { workspace = true } solders-rpc-account-info-config = { workspace = true } diff --git a/crates/rpc-requests/src/lib.rs b/crates/rpc-requests/src/lib.rs index 4fbe1990..2734170d 100644 --- a/crates/rpc-requests/src/lib.rs +++ b/crates/rpc-requests/src/lib.rs @@ -1,15 +1,14 @@ #![allow(deprecated)] use camelpaste::paste; -use pyo3::{exceptions::PyValueError, prelude::*, IntoPyObject, IntoPyObjectExt}; +use pyo3::{prelude::*, IntoPyObject, IntoPyObjectExt}; use serde::{Deserialize, Serialize}; use serde_with::skip_serializing_none; use solders_commitment_config::{CommitmentConfig, CommitmentLevel}; use solders_hash::Hash as SolderHash; -use solders_macros::{common_methods, richcmp_eq_only, rpc_id_getter}; +use solders_macros::{common_methods_ser_only, richcmp_eq_only, rpc_id_getter}; use solders_message::VersionedMessage; use solders_pubkey::Pubkey; use solders_signature::Signature; -use solders_traits::to_py_err; use solders_traits_core::{ py_from_bytes_general_via_cbor, pybytes_general_via_cbor, RichcmpEqualityOnly, }; @@ -56,22 +55,11 @@ macro_rules! request_boilerplate { ($name:ident) => { rpc_impl_display!($name); impl solders_traits_core::CommonMethodsCore for $name {} - impl solders_traits_core::CommonMethods<'_> for $name { + impl solders_traits_core::CommonMethodsSerOnly<'_> for $name { fn py_to_json(&self) -> String { let wrapped = Body::from(self.clone()); serde_json::to_string(&wrapped).unwrap() } - - fn py_from_json(raw: &str) -> PyResult { - let parsed = serde_json::from_str::(raw).map_err(to_py_err)?; - match parsed { - Body::$name(x) => Ok(x), - _ => Err(PyValueError::new_err(format!( - "Deserialized to wrong type: {:?}", - parsed - ))), - } - } } impl RichcmpEqualityOnly for $name {} pybytes_general_via_cbor!($name); @@ -107,7 +95,7 @@ Example: } #[richcmp_eq_only] - #[common_methods] + #[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl $name { @@ -150,7 +138,7 @@ Example: } #[richcmp_eq_only] - #[common_methods] + #[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl $name { @@ -200,7 +188,7 @@ pub struct GetAccountInfo { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetAccountInfo { @@ -249,7 +237,7 @@ pub struct GetBalance { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBalance { @@ -299,7 +287,7 @@ pub struct GetBlock { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlock { @@ -349,7 +337,7 @@ pub struct GetBlockHeight { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlockHeight { @@ -395,7 +383,7 @@ pub struct GetBlockProduction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlockProduction { @@ -435,7 +423,7 @@ pub struct GetBlockCommitment { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlockCommitment { @@ -478,7 +466,7 @@ pub struct GetBlocks { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlocks { @@ -538,7 +526,7 @@ pub struct GetBlocksWithLimit { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlocksWithLimit { @@ -595,7 +583,7 @@ pub struct GetBlockTime { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetBlockTime { @@ -642,7 +630,7 @@ pub struct GetEpochInfo { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetEpochInfo { @@ -687,7 +675,7 @@ pub struct GetFeeForMessage { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetFeeForMessage { @@ -747,7 +735,7 @@ pub struct GetInflationGovernor { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetInflationGovernor { @@ -793,7 +781,7 @@ pub struct GetInflationReward { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetInflationReward { @@ -846,7 +834,7 @@ pub struct GetLargestAccounts { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetLargestAccounts { @@ -905,7 +893,7 @@ pub struct GetLatestBlockhash { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetLatestBlockhash { @@ -951,7 +939,7 @@ pub struct GetLeaderSchedule { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetLeaderSchedule { @@ -1004,7 +992,7 @@ pub struct GetMinimumBalanceForRentExemption { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetMinimumBalanceForRentExemption { @@ -1059,7 +1047,7 @@ pub struct GetMultipleAccounts { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetMultipleAccounts { @@ -1111,7 +1099,7 @@ pub struct GetProgramAccounts { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetProgramAccounts { @@ -1159,7 +1147,7 @@ pub struct GetRecentPerformanceSamples { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetRecentPerformanceSamples { @@ -1202,7 +1190,7 @@ pub struct GetSignaturesForAddress { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetSignaturesForAddress { @@ -1256,7 +1244,7 @@ pub struct GetSignatureStatuses { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetSignatureStatuses { @@ -1310,7 +1298,7 @@ pub struct GetSlot { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetSlot { @@ -1354,7 +1342,7 @@ pub struct GetSlotLeader { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetSlotLeader { @@ -1395,7 +1383,7 @@ pub struct GetSlotLeaders { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetSlotLeaders { @@ -1445,7 +1433,7 @@ pub struct GetStakeActivation { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetStakeActivation { @@ -1495,7 +1483,7 @@ pub struct GetSupply { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetSupply { @@ -1538,7 +1526,7 @@ pub struct GetTokenAccountBalance { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTokenAccountBalance { @@ -1596,7 +1584,7 @@ pub struct GetTokenAccountsByDelegate { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTokenAccountsByDelegate { @@ -1666,7 +1654,7 @@ pub struct GetTokenAccountsByOwner { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTokenAccountsByOwner { @@ -1725,7 +1713,7 @@ pub struct GetTokenLargestAccounts { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTokenLargestAccounts { @@ -1773,7 +1761,7 @@ pub struct GetTokenSupply { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTokenSupply { @@ -1823,7 +1811,7 @@ pub struct GetTransaction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTransaction { @@ -1873,7 +1861,7 @@ pub struct GetTransactionCount { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetTransactionCount { @@ -1918,7 +1906,7 @@ pub struct GetVoteAccounts { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl GetVoteAccounts { @@ -1960,7 +1948,7 @@ pub struct IsBlockhashValid { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl IsBlockhashValid { @@ -2013,7 +2001,7 @@ pub struct RequestAirdrop { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl RequestAirdrop { @@ -2091,7 +2079,7 @@ pub struct SendVersionedTransaction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl SendVersionedTransaction { @@ -2162,7 +2150,7 @@ pub struct SendLegacyTransaction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl SendLegacyTransaction { @@ -2228,7 +2216,7 @@ pub struct SendRawTransaction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl SendRawTransaction { @@ -2297,7 +2285,7 @@ pub struct SimulateLegacyTransaction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl SimulateLegacyTransaction { @@ -2366,7 +2354,7 @@ pub struct SimulateVersionedTransaction { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl SimulateVersionedTransaction { @@ -2421,7 +2409,7 @@ pub struct AccountSubscribe { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl AccountSubscribe { @@ -2475,7 +2463,7 @@ pub struct BlockSubscribe { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl BlockSubscribe { @@ -2532,7 +2520,7 @@ pub struct LogsSubscribe { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl LogsSubscribe { @@ -2589,7 +2577,7 @@ pub struct ProgramSubscribe { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl ProgramSubscribe { @@ -2639,7 +2627,7 @@ pub struct SignatureSubscribe { } #[richcmp_eq_only] -#[common_methods] +#[common_methods_ser_only] #[rpc_id_getter] #[pymethods] impl SignatureSubscribe { @@ -2675,7 +2663,7 @@ zero_param_req_def!(VoteSubscribe); macro_rules ! pyunion { ($name:ident, $($variant:ident),+) => { - #[derive(FromPyObject, Clone, Debug, PartialEq, Serialize, Deserialize)] + #[derive(FromPyObject, Clone, Debug, PartialEq, Serialize)] #[serde(tag = "method", rename_all = "camelCase")] pub enum $name { $($variant($variant),)+ @@ -2787,18 +2775,6 @@ pub fn batch_requests_to_json(reqs: Vec) -> String { serde_json::to_string(&reqs).unwrap() } -#[pyfunction] -pub fn batch_requests_from_json<'py>( - py: Python<'py>, - raw: &str, -) -> PyResult>> { - let deser: Vec = serde_json::from_str(raw).unwrap(); - Ok(deser - .into_iter() - .map(|x| x.into_bound_py_any(py).unwrap()) - .collect()) -} - pub fn include_requests(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; @@ -2875,7 +2851,6 @@ pub fn include_requests(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; let funcs = [ wrap_pyfunction!(batch_requests_to_json, m)?, - wrap_pyfunction!(batch_requests_from_json, m)?, ]; for func in funcs { m.add_function(func)?; diff --git a/crates/traits-core/src/lib.rs b/crates/traits-core/src/lib.rs index ca93a955..2c5c697f 100644 --- a/crates/traits-core/src/lib.rs +++ b/crates/traits-core/src/lib.rs @@ -229,6 +229,12 @@ pub trait CommonMethodsCore: } } +pub trait CommonMethodsSerOnly<'a>: CommonMethodsCore + Serialize { + fn py_to_json(&self) -> String { + serde_json::to_string(self).unwrap() + } +} + pub trait CommonMethods<'a>: CommonMethodsCore + Serialize + Deserialize<'a> { fn py_to_json(&self) -> String { serde_json::to_string(self).unwrap() diff --git a/python/solders/rpc/requests.py b/python/solders/rpc/requests.py index fe6e0f95..06bf3716 100644 --- a/python/solders/rpc/requests.py +++ b/python/solders/rpc/requests.py @@ -75,9 +75,6 @@ VoteSubscribe, VoteUnsubscribe, ) -from ..solders import ( - batch_requests_from_json as _batch_from_json, -) from ..solders import ( batch_requests_to_json as _batch_to_json, ) @@ -176,35 +173,6 @@ def batch_to_json(reqs: Sequence[Body]) -> str: return _batch_to_json(reqs) -def batch_from_json(raw: str) -> List[Body]: - """Deserialize a batch request JSON string into a list of request objects. - - Args: - raw (str): The batch JSON string. - - Returns: - A list of request objects. - - Example: - >>> from solders.rpc.requests import batch_from_json - >>> raw = '[{"jsonrpc":"2.0","id":0,"method":"getClusterNodes"},{"jsonrpc":"2.0","id":1,"method":"getEpochSchedule"}]' - >>> batch_from_json(raw) - [GetClusterNodes { - base: RequestBase { - jsonrpc: TwoPointOh, - id: 0, - }, - }, GetEpochSchedule { - base: RequestBase { - jsonrpc: TwoPointOh, - id: 1, - }, - }] - - """ # noqa: E501 - return _batch_from_json(raw) - - __all__ = [ "Body", "GetAccountInfo", diff --git a/python/solders/solders.pyi b/python/solders/solders.pyi index 9f78442a..54c6f180 100644 --- a/python/solders/solders.pyi +++ b/python/solders/solders.pyi @@ -619,7 +619,6 @@ class Mint: is_initialized: bool mint_authority: Optional[Pubkey] supply: int - @classmethod def __init__( self, mint_authority: Optional[Pubkey], @@ -642,7 +641,6 @@ class Multisig: m: int n: int signers: List[Pubkey] - @classmethod def __init__( self, m: int, n: int, is_initialized: bool, signers: Sequence[Pubkey] ) -> None: ... @@ -5496,8 +5494,6 @@ class GetAccountInfo: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetAccountInfo": ... - @staticmethod def from_bytes(data: bytes) -> "GetAccountInfo": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5520,8 +5516,6 @@ class GetBalance: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBalance": ... - @staticmethod def from_bytes(data: bytes) -> "GetBalance": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5544,8 +5538,6 @@ class GetBlock: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlock": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlock": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5563,8 +5555,6 @@ class GetBlockHeight: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlockHeight": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlockHeight": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5584,8 +5574,6 @@ class GetBlockProduction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlockProduction": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlockProduction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5601,8 +5589,6 @@ class GetBlockCommitment: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlockCommitment": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlockCommitment": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5628,8 +5614,6 @@ class GetBlocks: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlocks": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlocks": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5655,8 +5639,6 @@ class GetBlocksWithLimit: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlocksWithLimit": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlocksWithLimit": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5672,8 +5654,6 @@ class GetBlockTime: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetBlockTime": ... - @staticmethod def from_bytes(data: bytes) -> "GetBlockTime": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5691,8 +5671,6 @@ class GetEpochInfo: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetEpochInfo": ... - @staticmethod def from_bytes(data: bytes) -> "GetEpochInfo": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5717,8 +5695,6 @@ class GetFeeForMessage: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetFeeForMessage": ... - @staticmethod def from_bytes(data: bytes) -> "GetFeeForMessage": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5732,8 +5708,6 @@ class GetIdentity: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetIdentity": ... - @staticmethod def from_bytes(data: bytes) -> "GetIdentity": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5751,8 +5725,6 @@ class GetInflationGovernor: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetInflationGovernor": ... - @staticmethod def from_bytes(data: bytes) -> "GetInflationGovernor": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5775,8 +5747,6 @@ class GetInflationReward: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetInflationReward": ... - @staticmethod def from_bytes(data: bytes) -> "GetInflationReward": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5799,8 +5769,6 @@ class GetLargestAccounts: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetLargestAccounts": ... - @staticmethod def from_bytes(data: bytes) -> "GetLargestAccounts": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5818,8 +5786,6 @@ class GetLatestBlockhash: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetLatestBlockhash": ... - @staticmethod def from_bytes(data: bytes) -> "GetLatestBlockhash": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5842,8 +5808,6 @@ class GetLeaderSchedule: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetLeaderSchedule": ... - @staticmethod def from_bytes(data: bytes) -> "GetLeaderSchedule": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5866,8 +5830,6 @@ class GetMinimumBalanceForRentExemption: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetMinimumBalanceForRentExemption": ... - @staticmethod def from_bytes(data: bytes) -> "GetMinimumBalanceForRentExemption": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5890,8 +5852,6 @@ class GetMultipleAccounts: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetMultipleAccounts": ... - @staticmethod def from_bytes(data: bytes) -> "GetMultipleAccounts": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5914,8 +5874,6 @@ class GetProgramAccounts: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetProgramAccounts": ... - @staticmethod def from_bytes(data: bytes) -> "GetProgramAccounts": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5931,8 +5889,6 @@ class GetRecentPerformanceSamples: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetRecentPerformanceSamples": ... - @staticmethod def from_bytes(data: bytes) -> "GetRecentPerformanceSamples": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5955,8 +5911,6 @@ class GetSignaturesForAddress: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetSignaturesForAddress": ... - @staticmethod def from_bytes(data: bytes) -> "GetSignaturesForAddress": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5979,8 +5933,6 @@ class GetSignatureStatuses: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetSignatureStatuses": ... - @staticmethod def from_bytes(data: bytes) -> "GetSignatureStatuses": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -5998,8 +5950,6 @@ class GetSlot: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetSlot": ... - @staticmethod def from_bytes(data: bytes) -> "GetSlot": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6017,8 +5967,6 @@ class GetSlotLeader: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetSlotLeader": ... - @staticmethod def from_bytes(data: bytes) -> "GetSlotLeader": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6036,8 +5984,6 @@ class GetSlotLeaders: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetSlotLeaders": ... - @staticmethod def from_bytes(data: bytes) -> "GetSlotLeaders": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6060,8 +6006,6 @@ class GetStakeActivation: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetStakeActivation": ... - @staticmethod def from_bytes(data: bytes) -> "GetStakeActivation": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6079,8 +6023,6 @@ class GetSupply: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetSupply": ... - @staticmethod def from_bytes(data: bytes) -> "GetSupply": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6103,8 +6045,6 @@ class GetTokenAccountBalance: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTokenAccountBalance": ... - @staticmethod def from_bytes(data: bytes) -> "GetTokenAccountBalance": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6132,8 +6072,6 @@ class GetTokenAccountsByDelegate: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTokenAccountsByDelegate": ... - @staticmethod def from_bytes(data: bytes) -> "GetTokenAccountsByDelegate": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6161,8 +6099,6 @@ class GetTokenAccountsByOwner: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTokenAccountsByOwner": ... - @staticmethod def from_bytes(data: bytes) -> "GetTokenAccountsByOwner": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6185,8 +6121,6 @@ class GetTokenLargestAccounts: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTokenLargestAccounts": ... - @staticmethod def from_bytes(data: bytes) -> "GetTokenLargestAccounts": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6209,8 +6143,6 @@ class GetTokenSupply: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTokenSupply": ... - @staticmethod def from_bytes(data: bytes) -> "GetTokenSupply": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6233,8 +6165,6 @@ class GetTransaction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTransaction": ... - @staticmethod def from_bytes(data: bytes) -> "GetTransaction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6252,8 +6182,6 @@ class GetTransactionCount: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetTransactionCount": ... - @staticmethod def from_bytes(data: bytes) -> "GetTransactionCount": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6273,8 +6201,6 @@ class GetVoteAccounts: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetVoteAccounts": ... - @staticmethod def from_bytes(data: bytes) -> "GetVoteAccounts": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6297,8 +6223,6 @@ class IsBlockhashValid: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "IsBlockhashValid": ... - @staticmethod def from_bytes(data: bytes) -> "IsBlockhashValid": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6324,8 +6248,6 @@ class RequestAirdrop: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "RequestAirdrop": ... - @staticmethod def from_bytes(data: bytes) -> "RequestAirdrop": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6348,8 +6270,6 @@ class SendLegacyTransaction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SendLegacyTransaction": ... - @staticmethod def from_bytes(data: bytes) -> "SendLegacyTransaction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6372,8 +6292,6 @@ class SendRawTransaction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SendRawTransaction": ... - @staticmethod def from_bytes(data: bytes) -> "SendRawTransaction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6396,8 +6314,6 @@ class SendVersionedTransaction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SendVersionedTransaction": ... - @staticmethod def from_bytes(data: bytes) -> "SendVersionedTransaction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6420,8 +6336,6 @@ class SimulateLegacyTransaction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SimulateLegacyTransaction": ... - @staticmethod def from_bytes(data: bytes) -> "SimulateLegacyTransaction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6444,8 +6358,6 @@ class SimulateVersionedTransaction: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SimulateVersionedTransaction": ... - @staticmethod def from_bytes(data: bytes) -> "SimulateVersionedTransaction": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6459,8 +6371,6 @@ class ValidatorExit: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "ValidatorExit": ... - @staticmethod def from_bytes(data: bytes) -> "ValidatorExit": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6483,8 +6393,6 @@ class AccountSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "AccountSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "AccountSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6509,8 +6417,6 @@ class BlockSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "BlockSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "BlockSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6535,8 +6441,6 @@ class LogsSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "LogsSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "LogsSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6559,8 +6463,6 @@ class ProgramSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "ProgramSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "ProgramSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6583,8 +6485,6 @@ class SignatureSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SignatureSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "SignatureSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6598,8 +6498,6 @@ class GetClusterNodes: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetClusterNodes": ... - @staticmethod def from_bytes(data: bytes) -> "GetClusterNodes": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6613,8 +6511,6 @@ class GetEpochSchedule: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetEpochSchedule": ... - @staticmethod def from_bytes(data: bytes) -> "GetEpochSchedule": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6628,8 +6524,6 @@ class GetFirstAvailableBlock: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetFirstAvailableBlock": ... - @staticmethod def from_bytes(data: bytes) -> "GetFirstAvailableBlock": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6643,8 +6537,6 @@ class GetGenesisHash: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetGenesisHash": ... - @staticmethod def from_bytes(data: bytes) -> "GetGenesisHash": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6658,8 +6550,6 @@ class GetHealth: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetHealth": ... - @staticmethod def from_bytes(data: bytes) -> "GetHealth": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6673,8 +6563,6 @@ class GetHighestSnapshotSlot: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetHighestSnapshotSlot": ... - @staticmethod def from_bytes(data: bytes) -> "GetHighestSnapshotSlot": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6688,8 +6576,6 @@ class GetInflationRate: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetInflationRate": ... - @staticmethod def from_bytes(data: bytes) -> "GetInflationRate": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6703,8 +6589,6 @@ class GetMaxRetransmitSlot: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetMaxRetransmitSlot": ... - @staticmethod def from_bytes(data: bytes) -> "GetMaxRetransmitSlot": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6718,8 +6602,6 @@ class GetMaxShredInsertSlot: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetMaxShredInsertSlot": ... - @staticmethod def from_bytes(data: bytes) -> "GetMaxShredInsertSlot": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6733,8 +6615,6 @@ class GetVersion: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "GetVersion": ... - @staticmethod def from_bytes(data: bytes) -> "GetVersion": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6748,8 +6628,6 @@ class MinimumLedgerSlot: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "MinimumLedgerSlot": ... - @staticmethod def from_bytes(data: bytes) -> "MinimumLedgerSlot": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6763,8 +6641,6 @@ class SlotSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SlotSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "SlotSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6778,8 +6654,6 @@ class SlotsUpdatesSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SlotsUpdatesSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "SlotsUpdatesSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6793,8 +6667,6 @@ class RootSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "RootSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "RootSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6808,8 +6680,6 @@ class VoteSubscribe: def id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "VoteSubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "VoteSubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6825,8 +6695,6 @@ class AccountUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "AccountUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "AccountUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6842,8 +6710,6 @@ class BlockUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "BlockUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "BlockUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6859,8 +6725,6 @@ class LogsUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "LogsUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "LogsUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6876,8 +6740,6 @@ class ProgramUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "ProgramUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "ProgramUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6893,8 +6755,6 @@ class SignatureUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SignatureUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "SignatureUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6910,8 +6770,6 @@ class SlotUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SlotUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "SlotUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6927,8 +6785,6 @@ class SlotsUpdatesUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "SlotsUpdatesUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "SlotsUpdatesUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6944,8 +6800,6 @@ class RootUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "RootUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "RootUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... @@ -6961,8 +6815,6 @@ class VoteUnsubscribe: def subscription_id(self) -> int: ... def to_json(self) -> str: ... @staticmethod - def from_json(raw: str) -> "VoteUnsubscribe": ... - @staticmethod def from_bytes(data: bytes) -> "VoteUnsubscribe": ... def __str__(self) -> str: ... def __repr__(self) -> str: ... diff --git a/tests/test_rpc_request_builder.py b/tests/test_rpc_request_builder.py index 167ddd4d..c466e998 100644 --- a/tests/test_rpc_request_builder.py +++ b/tests/test_rpc_request_builder.py @@ -2,645 +2,14 @@ from typing import List, Union -from solders.account_decoder import UiAccountEncoding, UiDataSliceConfig -from solders.commitment_config import CommitmentLevel -from solders.hash import Hash -from solders.instruction import AccountMeta, Instruction -from solders.keypair import Keypair -from solders.message import Message from solders.pubkey import Pubkey -from solders.rpc.config import ( - RpcAccountInfoConfig, - RpcBlockConfig, - RpcBlockProductionConfig, - RpcBlockProductionConfigRange, - RpcBlockSubscribeConfig, - RpcBlockSubscribeFilter, - RpcBlockSubscribeFilterMentions, - RpcContextConfig, - RpcEpochConfig, - RpcGetVoteAccountsConfig, - RpcLargestAccountsFilter, - RpcLeaderScheduleConfig, - RpcProgramAccountsConfig, - RpcRequestAirdropConfig, - RpcSendTransactionConfig, - RpcSignaturesForAddressConfig, - RpcSignatureStatusConfig, - RpcSignatureSubscribeConfig, - RpcSimulateTransactionAccountsConfig, - RpcSimulateTransactionConfig, - RpcSupplyConfig, - RpcTokenAccountsFilterMint, - RpcTokenAccountsFilterProgramId, - RpcTransactionConfig, - RpcTransactionLogsConfig, - RpcTransactionLogsFilter, - RpcTransactionLogsFilterMentions, -) -from solders.rpc.filter import Memcmp +from solders.rpc.config import RpcSignatureStatusConfig from solders.rpc.requests import ( - AccountSubscribe, - AccountUnsubscribe, - BlockSubscribe, - BlockUnsubscribe, - GetAccountInfo, - GetBalance, - GetBlock, - GetBlockCommitment, - GetBlockHeight, - GetBlockProduction, - GetBlocks, - GetBlocksWithLimit, - GetBlockTime, - GetClusterNodes, - GetEpochInfo, - GetEpochSchedule, - GetFeeForMessage, - GetFirstAvailableBlock, - GetGenesisHash, - GetHealth, - GetHighestSnapshotSlot, - GetIdentity, - GetInflationGovernor, - GetInflationRate, - GetInflationReward, - GetLargestAccounts, - GetLatestBlockhash, - GetLeaderSchedule, - GetMaxRetransmitSlot, - GetMaxShredInsertSlot, - GetMinimumBalanceForRentExemption, - GetMultipleAccounts, - GetProgramAccounts, - GetRecentPerformanceSamples, - GetSignaturesForAddress, GetSignatureStatuses, - GetSlot, - GetSlotLeader, - GetSlotLeaders, - GetStakeActivation, - GetSupply, - GetTokenAccountBalance, - GetTokenAccountsByDelegate, - GetTokenAccountsByOwner, - GetTokenLargestAccounts, - GetTokenSupply, - GetTransaction, - GetTransactionCount, - GetVersion, - GetVoteAccounts, - IsBlockhashValid, - LogsSubscribe, - LogsUnsubscribe, - MinimumLedgerSlot, - ProgramSubscribe, - ProgramUnsubscribe, RequestAirdrop, - RootSubscribe, - RootUnsubscribe, - SendLegacyTransaction, - SignatureSubscribe, - SignatureUnsubscribe, - SimulateLegacyTransaction, - SlotSubscribe, - SlotsUpdatesSubscribe, - SlotsUpdatesUnsubscribe, - SlotUnsubscribe, - ValidatorExit, - VoteSubscribe, - VoteUnsubscribe, - batch_from_json, batch_to_json, ) from solders.signature import Signature -from solders.transaction import Transaction -from solders.transaction_status import TransactionDetails, UiTransactionEncoding - - -def test_get_account_info() -> None: - config = RpcAccountInfoConfig(UiAccountEncoding.Base64) - req = GetAccountInfo(Pubkey.default(), config) - as_json = req.to_json() - assert GetAccountInfo.from_json(as_json) == req - - -def test_get_balance() -> None: - config = RpcContextConfig(min_context_slot=1) - req = GetBalance(Pubkey.default(), config) - as_json = req.to_json() - assert GetBalance.from_json(as_json) == req - - -def test_get_block() -> None: - config = RpcBlockConfig( - encoding=UiTransactionEncoding.Base58, - transaction_details=TransactionDetails.None_, - ) - req = GetBlock(123, config) - as_json = req.to_json() - assert GetBlock.from_json(as_json) == req - - -def test_get_block_height() -> None: - config = RpcContextConfig(min_context_slot=123) - req = GetBlockHeight(config) - as_json = req.to_json() - assert GetBlockHeight.from_json(as_json) == req - - -def test_get_block_production() -> None: - slot_range = RpcBlockProductionConfigRange(first_slot=10, last_slot=15) - config = RpcBlockProductionConfig(identity=Pubkey.default(), range=slot_range) - req = GetBlockProduction(config) - as_json = req.to_json() - assert GetBlockProduction.from_json(as_json) == req - - -def test_get_block_commitment() -> None: - req = GetBlockCommitment(123) - as_json = req.to_json() - assert GetBlockCommitment.from_json(as_json) == req - - -def test_get_blocks() -> None: - req = GetBlocks(123, commitment=CommitmentLevel.Processed) - as_json = req.to_json() - assert GetBlocks.from_json(as_json) == req - req2 = GetBlocks(123) - as_json2 = req2.to_json() - assert GetBlocks.from_json(as_json2) == req2 - req3 = GetBlocks(123, 124) - as_json3 = req3.to_json() - assert GetBlocks.from_json(as_json3) == req3 - - -def test_get_blocks_with_limit() -> None: - req = GetBlocksWithLimit(123, 5, commitment=CommitmentLevel.Processed) - as_json = req.to_json() - assert GetBlocksWithLimit.from_json(as_json) == req - - -def test_get_block_time() -> None: - req = GetBlockTime(123) - as_json = req.to_json() - assert GetBlockTime.from_json(as_json) == req - - -def test_get_cluster_nodes() -> None: - req = GetClusterNodes(123) - as_json = req.to_json() - assert GetClusterNodes.from_json(as_json) == req - - -def test_get_epoch_info() -> None: - config = RpcContextConfig(commitment=CommitmentLevel.Processed) - req = GetEpochInfo(config) - as_json = req.to_json() - assert GetEpochInfo.from_json(as_json) == req - - -def test_get_epoch_schedule() -> None: - req = GetEpochSchedule(123) - as_json = req.to_json() - assert GetEpochSchedule.from_json(as_json) == req - - -def test_get_fee_for_message() -> None: - req = GetFeeForMessage(Message.default(), commitment=CommitmentLevel.Processed) - as_json = req.to_json() - assert GetFeeForMessage.from_json(as_json) == req - - -def test_get_first_available_block() -> None: - req = GetFirstAvailableBlock(123) - as_json = req.to_json() - assert GetFirstAvailableBlock.from_json(as_json) == req - - -def test_get_genesis_hash() -> None: - req = GetGenesisHash(123) - as_json = req.to_json() - assert GetGenesisHash.from_json(as_json) == req - - -def test_get_health() -> None: - req = GetHealth(123) - as_json = req.to_json() - assert GetHealth.from_json(as_json) == req - - -def test_get_highest_snapshot_slot() -> None: - req = GetHighestSnapshotSlot(123) - as_json = req.to_json() - assert GetHighestSnapshotSlot.from_json(as_json) == req - - -def test_get_identity() -> None: - req = GetIdentity(123) - as_json = req.to_json() - assert GetIdentity.from_json(as_json) == req - - -def test_validator_exit() -> None: - req = ValidatorExit(123) - as_json = req.to_json() - assert ValidatorExit.from_json(as_json) == req - - -def test_get_inflation_governor() -> None: - req = GetInflationGovernor(CommitmentLevel.Finalized) - as_json = req.to_json() - assert GetInflationGovernor.from_json(as_json) == req - - -def test_get_inflation_rate() -> None: - req = GetInflationRate(123) - as_json = req.to_json() - assert GetInflationRate.from_json(as_json) == req - - -def test_get_inflation_reward() -> None: - config = RpcEpochConfig(epoch=1234) - addresses = [Pubkey.default(), Pubkey.default()] - req = GetInflationReward(addresses, config) - as_json = req.to_json() - assert GetInflationReward.from_json(as_json) == req - - -def test_get_largest_accounts() -> None: - commitment = CommitmentLevel.Processed - filter_ = RpcLargestAccountsFilter.Circulating - req = GetLargestAccounts(commitment=commitment, filter_=filter_) - as_json = req.to_json() - assert GetLargestAccounts.from_json(as_json) == req - req2 = GetLargestAccounts() - as_json2 = req2.to_json() - assert GetLargestAccounts.from_json(as_json2) == req2 - req3 = GetLargestAccounts(commitment=commitment) - as_json3 = req3.to_json() - assert GetLargestAccounts.from_json(as_json3) == req3 - req4 = GetLargestAccounts(filter_=filter_) - as_json4 = req4.to_json() - assert GetLargestAccounts.from_json(as_json4) == req4 - - -def test_get_latest_blockhash() -> None: - config = RpcContextConfig(commitment=CommitmentLevel.Processed) - req = GetLatestBlockhash(config) - as_json = req.to_json() - assert GetLatestBlockhash.from_json(as_json) == req - - -def test_get_leader_schedule() -> None: - config = RpcLeaderScheduleConfig(identity=Pubkey.default()) - req = GetLeaderSchedule(123, config) - as_json = req.to_json() - assert GetLeaderSchedule.from_json(as_json) == req - req2 = GetLeaderSchedule() - as_json2 = req2.to_json() - assert GetLeaderSchedule.from_json(as_json2) == req2 - req3 = GetLeaderSchedule(config=config) - as_json3 = req3.to_json() - assert GetLeaderSchedule.from_json(as_json3) == req3 - req4 = GetLeaderSchedule(123) - as_json4 = req4.to_json() - assert GetLeaderSchedule.from_json(as_json4) == req4 - - -def test_get_max_retransmit_slot() -> None: - req = GetMaxRetransmitSlot(123) - as_json = req.to_json() - assert GetMaxRetransmitSlot.from_json(as_json) == req - - -def test_get_max_shred_insert_slot() -> None: - req = GetMaxShredInsertSlot(123) - as_json = req.to_json() - assert GetMaxShredInsertSlot.from_json(as_json) == req - - -def test_get_minimum_balance_for_rent_exemption() -> None: - req = GetMinimumBalanceForRentExemption(50) - as_json = req.to_json() - assert GetMinimumBalanceForRentExemption.from_json(as_json) == req - - -def test_get_multiple_accounts() -> None: - encoding = UiAccountEncoding.Base64Zstd - data_slice = UiDataSliceConfig(10, 8) - config = RpcAccountInfoConfig(encoding=encoding, data_slice=data_slice) - accounts = [Pubkey.default(), Pubkey.default()] - req = GetMultipleAccounts(accounts, config) - as_json = req.to_json() - assert GetMultipleAccounts.from_json(as_json) == req - - -def test_get_program_accounts() -> None: - acc_info_config = RpcAccountInfoConfig.default() - filters: List[Union[int, Memcmp]] = [10, Memcmp(offset=10, bytes_=b"123")] - config = RpcProgramAccountsConfig(acc_info_config, filters) - req = GetProgramAccounts(Pubkey.default(), config) - as_json = req.to_json() - assert GetProgramAccounts.from_json(as_json) == req - - -def test_get_recent_performance_samples() -> None: - req = GetRecentPerformanceSamples(5) - as_json = req.to_json() - assert GetRecentPerformanceSamples.from_json(as_json) == req - - -def test_get_signatures_for_address() -> None: - config = RpcSignaturesForAddressConfig(limit=10) - req = GetSignaturesForAddress(Pubkey.default(), config) - as_json = req.to_json() - assert GetSignaturesForAddress.from_json(as_json) == req - - -def test_get_signature_statuses() -> None: - req = GetSignatureStatuses([Signature.default()], RpcSignatureStatusConfig(True)) - as_json = req.to_json() - assert GetSignatureStatuses.from_json(as_json) == req - - -def test_get_slot() -> None: - config = RpcContextConfig(min_context_slot=123) - req = GetSlot(config) - as_json = req.to_json() - assert GetSlot.from_json(as_json) == req - - -def test_get_slot_leader() -> None: - config = RpcContextConfig(min_context_slot=123) - req = GetSlotLeader(config) - as_json = req.to_json() - assert GetSlotLeader.from_json(as_json) == req - - -def test_get_slot_leaders() -> None: - req = GetSlotLeaders(100, 10) - as_json = req.to_json() - assert GetSlotLeaders.from_json(as_json) == req - - -def test_get_stake_activation() -> None: - config = RpcEpochConfig(epoch=1234) - req = GetStakeActivation(Pubkey.default(), config) - as_json = req.to_json() - assert GetStakeActivation.from_json(as_json) == req - - -def test_get_supply() -> None: - config = RpcSupplyConfig(exclude_non_circulating_accounts_list=True) - req = GetSupply(config) - as_json = req.to_json() - assert GetSupply.from_json(as_json) == req - - -def test_get_token_account_balance() -> None: - req = GetTokenAccountBalance(Pubkey.default(), CommitmentLevel.Processed) - as_json = req.to_json() - assert GetTokenAccountBalance.from_json(as_json) == req - - -def test_get_token_accounts_by_delegate() -> None: - program_filter = RpcTokenAccountsFilterProgramId( - Pubkey.from_string("TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA") - ) - config = RpcAccountInfoConfig(min_context_slot=1234) - req = GetTokenAccountsByDelegate(Pubkey.default(), program_filter, config) - assert req.filter_ == program_filter - as_json = req.to_json() - assert GetTokenAccountsByDelegate.from_json(as_json) == req - - -def test_get_token_accounts_by_owner() -> None: - mint_filter = RpcTokenAccountsFilterMint(Pubkey.default()) - config = RpcAccountInfoConfig(min_context_slot=1234) - req = GetTokenAccountsByOwner(Pubkey.default(), mint_filter, config) - assert req.filter_ == mint_filter - as_json = req.to_json() - assert GetTokenAccountsByOwner.from_json(as_json) == req - - -def test_get_token_largest_accounts() -> None: - req = GetTokenLargestAccounts(Pubkey.default()) - as_json = req.to_json() - assert GetTokenLargestAccounts.from_json(as_json) == req - - -def test_get_token_supply() -> None: - req = GetTokenSupply(Pubkey.default()) - as_json = req.to_json() - assert GetTokenSupply.from_json(as_json) == req - - -def test_get_transaction() -> None: - config = RpcTransactionConfig(max_supported_transaction_version=1) - req = GetTransaction(Signature.default(), config) - as_json = req.to_json() - assert GetTransaction.from_json(as_json) == req - - -def test_get_transaction_count() -> None: - config = RpcContextConfig(min_context_slot=1234) - req = GetTransactionCount(config) - as_json = req.to_json() - assert GetTransactionCount.from_json(as_json) == req - - -def test_get_version() -> None: - req = GetVersion(123) - as_json = req.to_json() - assert GetVersion.from_json(as_json) == req - - -def test_get_vote_accounts() -> None: - config = RpcGetVoteAccountsConfig(keep_unstaked_delinquents=False) - req = GetVoteAccounts(config) - as_json = req.to_json() - assert GetVoteAccounts.from_json(as_json) == req - - -def test_is_blockhash_valid() -> None: - req = IsBlockhashValid(Hash.default()) - as_json = req.to_json() - assert IsBlockhashValid.from_json(as_json) == req - - -def test_minimum_ledger_slot() -> None: - req = MinimumLedgerSlot(123) - as_json = req.to_json() - assert MinimumLedgerSlot.from_json(as_json) == req - - -def test_request_airdrop() -> None: - config = RpcRequestAirdropConfig(commitment=CommitmentLevel.Confirmed) - req = RequestAirdrop(Pubkey.default(), 1000, config) - as_json = req.to_json() - assert RequestAirdrop.from_json(as_json) == req - - -def test_send_transaction() -> None: - program_id = Pubkey.default() - arbitrary_instruction_data = b"abc" - accounts: List[AccountMeta] = [] - instruction = Instruction(program_id, arbitrary_instruction_data, accounts) - seed = bytes([1] * 32) - payer = Keypair.from_seed(seed) - message = Message([instruction], payer.pubkey()) - blockhash = Hash.default() # replace with a real blockhash - tx = Transaction([payer], message, blockhash) - commitment = CommitmentLevel.Confirmed - config = RpcSendTransactionConfig(preflight_commitment=commitment) - req = SendLegacyTransaction(tx, config) - as_json = req.to_json() - assert SendLegacyTransaction.from_json(as_json) == req - - -def test_simulate_transaction() -> None: - program_id = Pubkey.default() - arbitrary_instruction_data = b"abc" - accounts: List[AccountMeta] = [] - instruction = Instruction(program_id, arbitrary_instruction_data, accounts) - seed = bytes([1] * 32) - payer = Keypair.from_seed(seed) - message = Message([instruction], payer.pubkey()) - blockhash = Hash.default() # replace with a real blockhash - tx = Transaction([payer], message, blockhash) - account_encoding = UiAccountEncoding.Base64Zstd - accounts_config = RpcSimulateTransactionAccountsConfig( - [Pubkey.default()], account_encoding - ) - commitment = CommitmentLevel.Confirmed - config = RpcSimulateTransactionConfig( - commitment=commitment, accounts=accounts_config - ) - req = SimulateLegacyTransaction(tx, config) - as_json = req.to_json() - assert SimulateLegacyTransaction.from_json(as_json) == req - - -def test_account_subscribe() -> None: - config = RpcAccountInfoConfig(UiAccountEncoding.Base64) - req = AccountSubscribe(Pubkey.default(), config) - as_json = req.to_json() - assert AccountSubscribe.from_json(as_json) == req - - -def test_block_subscribe() -> None: - config = RpcBlockSubscribeConfig(transaction_details=TransactionDetails.Signatures) - req = BlockSubscribe(RpcBlockSubscribeFilter.All, config) - as_json = req.to_json() - assert BlockSubscribe.from_json(as_json) == req - req2 = BlockSubscribe(RpcBlockSubscribeFilterMentions(Pubkey.default()), config) - as_json2 = req2.to_json() - assert BlockSubscribe.from_json(as_json2) == req2 - - -def test_logs_subscribe() -> None: - config = RpcTransactionLogsConfig(commitment=CommitmentLevel.Confirmed) - req = LogsSubscribe(RpcTransactionLogsFilter.All, config) - as_json = req.to_json() - assert LogsSubscribe.from_json(as_json) == req - req2 = LogsSubscribe(RpcTransactionLogsFilterMentions(Pubkey.default()), config) - as_json2 = req2.to_json() - assert LogsSubscribe.from_json(as_json2) == req2 - - -def test_program_subscribe() -> None: - acc_info_config = RpcAccountInfoConfig.default() - filters: List[Union[int, Memcmp]] = [10, Memcmp(offset=10, bytes_=b"123")] - config = RpcProgramAccountsConfig(acc_info_config, filters) - req = ProgramSubscribe(Pubkey.default(), config) - as_json = req.to_json() - assert ProgramSubscribe.from_json(as_json) == req - - -def test_signature_subscribe() -> None: - config = RpcSignatureSubscribeConfig(enable_received_notification=False) - req = SignatureSubscribe(Signature.default(), config) - as_json = req.to_json() - assert SignatureSubscribe.from_json(as_json) == req - - -def test_slot_subscribe() -> None: - req = SlotSubscribe(123) - as_json = req.to_json() - assert SlotSubscribe.from_json(as_json) == req - - -def test_slots_updates_subscribe() -> None: - req = SlotsUpdatesSubscribe(123) - as_json = req.to_json() - assert SlotsUpdatesSubscribe.from_json(as_json) == req - - -def test_root_subscribe() -> None: - req = RootSubscribe(123) - as_json = req.to_json() - assert RootSubscribe.from_json(as_json) == req - - -def test_vote_subscribe() -> None: - req = VoteSubscribe(123) - as_json = req.to_json() - assert VoteSubscribe.from_json(as_json) == req - - -def test_account_unsubscribe() -> None: - req = AccountUnsubscribe(1, 2) - as_json = req.to_json() - assert AccountUnsubscribe.from_json(as_json) == req - - -def test_block_unsubscribe() -> None: - req = BlockUnsubscribe(1, 2) - as_json = req.to_json() - assert BlockUnsubscribe.from_json(as_json) == req - - -def test_logs_unsubscribe() -> None: - req = LogsUnsubscribe(1, 2) - as_json = req.to_json() - assert LogsUnsubscribe.from_json(as_json) == req - - -def test_program_unsubscribe() -> None: - req = ProgramUnsubscribe(1, 2) - as_json = req.to_json() - assert ProgramUnsubscribe.from_json(as_json) == req - - -def test_signature_unsubscribe() -> None: - req = SignatureUnsubscribe(1, 2) - as_json = req.to_json() - assert SignatureUnsubscribe.from_json(as_json) == req - - -def test_slot_unsubscribe() -> None: - req = SlotUnsubscribe(1, 2) - as_json = req.to_json() - assert SlotUnsubscribe.from_json(as_json) == req - - -def test_slots_updates_unsubscribe() -> None: - req = SlotsUpdatesUnsubscribe(1, 2) - as_json = req.to_json() - assert SlotsUpdatesUnsubscribe.from_json(as_json) == req - - -def test_root_unsubscribe() -> None: - req = RootUnsubscribe(1, 2) - as_json = req.to_json() - assert RootUnsubscribe.from_json(as_json) == req - - -def test_vote_unsubscribe() -> None: - req = VoteUnsubscribe(1, 2) - as_json = req.to_json() - assert VoteUnsubscribe.from_json(as_json) == req def test_batch() -> None: @@ -655,4 +24,3 @@ def test_batch() -> None: '{"searchTransactionHistory":true}]},{"method":"requestAirdrop","jsonrpc":"2.0","id":0,' '"params":["11111111111111111111111111111111",1000]}]' ) - assert batch_from_json(as_json) == reqs From 13aa7b155a6e662542404fd2eb831aa95eec788d Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:01:32 +0000 Subject: [PATCH 04/13] fmt --- crates/account-decoder/src/lib.rs | 3 +-- .../address-lookup-table-account/src/lib.rs | 9 ++++---- crates/base64-string/src/lib.rs | 3 ++- crates/compute-budget/src/lib.rs | 2 +- crates/hash/src/lib.rs | 10 ++++----- crates/instruction/src/lib.rs | 7 +++---- crates/keypair/src/lib.rs | 15 ++++++------- crates/keypair/src/null_signer.rs | 2 +- crates/keypair/src/signer.rs | 2 +- crates/litesvm/src/lib.rs | 19 ++++++++--------- crates/litesvm/src/transaction_metadata.rs | 4 ++-- crates/macros/src/lib.rs | 12 +++++------ crates/message/src/lib.rs | 14 ++++++------- crates/primitives/src/epoch_schedule.rs | 2 +- crates/rpc-requests/src/lib.rs | 4 +--- crates/rpc-send-transaction-config/src/lib.rs | 2 +- crates/system-program/src/lib.rs | 2 +- crates/token/src/state.rs | 3 ++- crates/traits/src/lib.rs | 2 +- crates/transaction-error/src/lib.rs | 4 ++-- crates/transaction-status/src/lib.rs | 5 ++--- crates/transaction/src/lib.rs | 21 ++++++++++++------- src/address_lookup_table_account.rs | 4 +++- 23 files changed, 76 insertions(+), 75 deletions(-) diff --git a/crates/account-decoder/src/lib.rs b/crates/account-decoder/src/lib.rs index fa1d8063..96c3d0a1 100644 --- a/crates/account-decoder/src/lib.rs +++ b/crates/account-decoder/src/lib.rs @@ -10,8 +10,7 @@ use pythonize::{depythonize, pythonize}; use serde::{Deserialize, Serialize}; use serde_json::Value; use solana_account_decoder_client_types::{ - ParsedAccount as ParsedAccountOriginal, - token::UiTokenAmount as UiTokenAmountOriginal, + token::UiTokenAmount as UiTokenAmountOriginal, ParsedAccount as ParsedAccountOriginal, UiAccountEncoding as UiAccountEncodingOriginal, UiDataSliceConfig as UiDataSliceConfigOriginal, }; use solders_macros::{common_methods, enum_original_mapping, richcmp_eq_only}; diff --git a/crates/address-lookup-table-account/src/lib.rs b/crates/address-lookup-table-account/src/lib.rs index c9b35342..23500b3d 100644 --- a/crates/address-lookup-table-account/src/lib.rs +++ b/crates/address-lookup-table-account/src/lib.rs @@ -2,17 +2,16 @@ use derive_more::{From, Into}; use pyo3::exceptions::PyValueError; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_message::AddressLookupTableAccount as AddressLookupTableAccountOriginal; -use solana_pubkey::Pubkey as PubkeyOriginal; -use solana_slot_hashes::SlotHashes as SlotHashesOriginal; use solana_address_lookup_table_interface::{ instruction::derive_lookup_table_address as derive_lookup_table_address_original, state::{ AddressLookupTable as AddressLookupTableOriginal, - LookupTableMeta as LookupTableMetaOriginal, - LookupTableStatus as LookupTableStatusOriginal, + LookupTableMeta as LookupTableMetaOriginal, LookupTableStatus as LookupTableStatusOriginal, }, }; +use solana_message::AddressLookupTableAccount as AddressLookupTableAccountOriginal; +use solana_pubkey::Pubkey as PubkeyOriginal; +use solana_slot_hashes::SlotHashes as SlotHashesOriginal; use solders_hash::Hash; use solders_macros::{common_methods, richcmp_eq_only}; use solders_pubkey::Pubkey; diff --git a/crates/base64-string/src/lib.rs b/crates/base64-string/src/lib.rs index 03908f4b..12c3d76f 100644 --- a/crates/base64-string/src/lib.rs +++ b/crates/base64-string/src/lib.rs @@ -5,7 +5,8 @@ use serde::{Deserialize, Serialize}; use { solana_message::VersionedMessage as VersionedMessageOriginal, solana_transaction::{ - Transaction as TransactionOriginal, versioned::VersionedTransaction as VersionedTransactionOriginal, + versioned::VersionedTransaction as VersionedTransactionOriginal, + Transaction as TransactionOriginal, }, }; diff --git a/crates/compute-budget/src/lib.rs b/crates/compute-budget/src/lib.rs index 570459b3..98d62ebf 100644 --- a/crates/compute-budget/src/lib.rs +++ b/crates/compute-budget/src/lib.rs @@ -1,9 +1,9 @@ use pyo3::prelude::*; use solana_compute_budget::compute_budget::ComputeBudget as ComputeBudgetOriginal; use solana_compute_budget_interface::ComputeBudgetInstruction; +use solana_sdk_ids::compute_budget::ID; use solders_instruction::Instruction; use solders_pubkey::Pubkey; -use solana_sdk_ids::compute_budget::ID; use solders_traits_core::RichcmpEqualityOnly; /// Request a specific transaction-wide program heap region size in bytes. diff --git a/crates/hash/src/lib.rs b/crates/hash/src/lib.rs index a405f986..41ec357c 100644 --- a/crates/hash/src/lib.rs +++ b/crates/hash/src/lib.rs @@ -1,11 +1,9 @@ use std::str::FromStr; use derive_more::{From, Into}; -use pyo3::{prelude::*, exceptions::PyValueError}; +use pyo3::{exceptions::PyValueError, prelude::*}; use serde::{Deserialize, Serialize}; -use solana_hash::{ - Hash as HashOriginal, ParseHashError as ParseHashErrorOriginal, HASH_BYTES, -}; +use solana_hash::{Hash as HashOriginal, ParseHashError as ParseHashErrorOriginal, HASH_BYTES}; use solana_sha256_hasher::hash; use solders_macros::{common_methods, pyhash, richcmp_full}; @@ -134,7 +132,9 @@ impl Hash { impl PyFromBytesGeneral for Hash { fn py_from_bytes_general(raw: &[u8]) -> PyResult { - let converted = raw.try_into().map_err(|e| PyErr::new::(format!("{:?}", e)))?; + let converted = raw + .try_into() + .map_err(|e| PyErr::new::(format!("{:?}", e)))?; Ok(HashOriginal::new_from_array(converted).into()) } } diff --git a/crates/instruction/src/lib.rs b/crates/instruction/src/lib.rs index db0593d8..038fe8f8 100644 --- a/crates/instruction/src/lib.rs +++ b/crates/instruction/src/lib.rs @@ -3,16 +3,15 @@ use std::hash::Hasher; use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; +use solders_macros::{common_methods, pyhash, richcmp_eq_only}; +use solders_pubkey::Pubkey; use { solana_instruction::{ - account_meta::AccountMeta as AccountMetaOriginal, - Instruction as InstructionOriginal, + account_meta::AccountMeta as AccountMetaOriginal, Instruction as InstructionOriginal, }, solana_message::compiled_instruction::CompiledInstruction as CompiledInstructionOriginal, solana_pubkey::Pubkey as PubkeyOriginal, }; -use solders_macros::{common_methods, pyhash, richcmp_eq_only}; -use solders_pubkey::Pubkey; use solders_traits_core::{ impl_display, py_from_bytes_general_via_bincode, pybytes_general_via_bincode, diff --git a/crates/keypair/src/lib.rs b/crates/keypair/src/lib.rs index 2eaee932..308be274 100644 --- a/crates/keypair/src/lib.rs +++ b/crates/keypair/src/lib.rs @@ -1,17 +1,17 @@ use derive_more::{From, Into}; use pyo3::{exceptions::PyValueError, prelude::*}; use serde::{Deserialize, Serialize}; +use solders_macros::{common_methods, pyhash, richcmp_signer}; +use solders_pubkey::Pubkey; +use solders_signature::Signature; use { solana_derivation_path::DerivationPath, - solana_signer::Signer as SignerTrait, solana_keypair::{ - keypair_from_seed, keypair_from_seed_phrase_and_passphrase, Keypair as KeypairOriginal, - seed_derivable::keypair_from_seed_and_derivation_path + keypair_from_seed, keypair_from_seed_phrase_and_passphrase, + seed_derivable::keypair_from_seed_and_derivation_path, Keypair as KeypairOriginal, }, + solana_signer::Signer as SignerTrait, }; -use solders_macros::{common_methods, pyhash, richcmp_signer}; -use solders_pubkey::Pubkey; -use solders_signature::Signature; use solders_traits::{impl_signer_hash, RichcmpSigner, SignerTraitWrapper, ToSignerOriginal}; use solders_traits_core::{ @@ -120,7 +120,8 @@ impl Keypair { /// pub fn from_base58_string(s: &str) -> PyResult { let mut buf = [0u8; 64]; - five8::decode_64(s, &mut buf).map_err(|e| PyErr::new::(format!("{:?}", e)))?; + five8::decode_64(s, &mut buf) + .map_err(|e| PyErr::new::(format!("{:?}", e)))?; Self::py_from_bytes_general(&buf) } /// Gets this ``Keypair``'s secret key. diff --git a/crates/keypair/src/null_signer.rs b/crates/keypair/src/null_signer.rs index b7163593..4a7e5890 100644 --- a/crates/keypair/src/null_signer.rs +++ b/crates/keypair/src/null_signer.rs @@ -15,7 +15,7 @@ mod null_signer_serde { use serde::{self, Deserialize, Deserializer, Serializer}; use { solana_pubkey::Pubkey as PubkeyOriginal, - solana_signer::{Signer, null_signer::NullSigner as NullSignerOriginal}, + solana_signer::{null_signer::NullSigner as NullSignerOriginal, Signer}, }; pub fn serialize(ns: &NullSignerOriginal, serializer: S) -> Result diff --git a/crates/keypair/src/signer.rs b/crates/keypair/src/signer.rs index 394746f6..b1c29f97 100644 --- a/crates/keypair/src/signer.rs +++ b/crates/keypair/src/signer.rs @@ -1,12 +1,12 @@ use pyo3::prelude::*; use crate::{null_signer::NullSigner, presigner::Presigner, Keypair}; +use solders_traits::{SignerTraitWrapper, ToSignerOriginal}; use { solana_pubkey::Pubkey as PubkeyOriginal, solana_signature::Signature as SignatureOriginal, solana_signer::{signers::Signers, Signer as SignerTrait, SignerError as SignerErrorOriginal}, }; -use solders_traits::{SignerTraitWrapper, ToSignerOriginal}; #[derive(FromPyObject, Debug)] pub enum Signer { diff --git a/crates/litesvm/src/lib.rs b/crates/litesvm/src/lib.rs index 4cb7f662..9297305a 100644 --- a/crates/litesvm/src/lib.rs +++ b/crates/litesvm/src/lib.rs @@ -1,16 +1,6 @@ use { litesvm::LiteSVM as LiteSVMOriginal, pyo3::{exceptions::PyFileNotFoundError, prelude::*}, - { - solana_account::Account as AccountOriginal, - solana_clock::Clock as ClockOriginal, - solana_epoch_rewards::EpochRewards as EpochRewardsOriginal, - solana_epoch_schedule::EpochSchedule as EpochScheduleOriginal, - solana_feature_set::FeatureSet as FeatureSetOriginal, solana_rent::Rent as RentOriginal, - solana_slot_hashes::SlotHashes, solana_slot_history::SlotHistory as SlotHistoryOriginal, - solana_stake_interface::stake_history::StakeHistory as StakeHistoryOriginal, - solana_last_restart_slot::LastRestartSlot, - }, solders_account::Account, solders_compute_budget::ComputeBudget, solders_hash::Hash as Blockhash, @@ -28,6 +18,15 @@ use { path::PathBuf, }, transaction_metadata::{SimulateResult, TransactionResult}, + { + solana_account::Account as AccountOriginal, solana_clock::Clock as ClockOriginal, + solana_epoch_rewards::EpochRewards as EpochRewardsOriginal, + solana_epoch_schedule::EpochSchedule as EpochScheduleOriginal, + solana_feature_set::FeatureSet as FeatureSetOriginal, + solana_last_restart_slot::LastRestartSlot, solana_rent::Rent as RentOriginal, + solana_slot_hashes::SlotHashes, solana_slot_history::SlotHistory as SlotHistoryOriginal, + solana_stake_interface::stake_history::StakeHistory as StakeHistoryOriginal, + }, }; pub mod transaction_metadata; diff --git a/crates/litesvm/src/transaction_metadata.rs b/crates/litesvm/src/transaction_metadata.rs index cfcc9021..da63b51d 100644 --- a/crates/litesvm/src/transaction_metadata.rs +++ b/crates/litesvm/src/transaction_metadata.rs @@ -7,8 +7,8 @@ use { }, pyo3::prelude::*, serde::{Deserialize, Serialize}, - solana_account::Account as AccountOriginal, - solana_message::inner_instruction::InnerInstruction as InnerInstructionOriginal, + solana_account::Account as AccountOriginal, + solana_message::inner_instruction::InnerInstruction as InnerInstructionOriginal, solders_account::Account, solders_instruction::CompiledInstruction, solders_pubkey::Pubkey, diff --git a/crates/macros/src/lib.rs b/crates/macros/src/lib.rs index a9108f03..3390b5a4 100644 --- a/crates/macros/src/lib.rs +++ b/crates/macros/src/lib.rs @@ -167,13 +167,11 @@ pub fn common_methods(_: TokenStream, item: TokenStream) -> TokenStream { pub fn common_methods_ser_only(_: TokenStream, item: TokenStream) -> TokenStream { let mut ast = parse_macro_input!(item as ItemImpl); add_core_methods(&mut ast); - let methods = vec![ - ImplItem::Verbatim(quote! { - /// Convert to a JSON string. - pub fn to_json(&self) -> String { - solders_traits_core::CommonMethodsSerOnly::py_to_json(self) - } }), - ]; + let methods = vec![ImplItem::Verbatim(quote! { + /// Convert to a JSON string. + pub fn to_json(&self) -> String { + solders_traits_core::CommonMethodsSerOnly::py_to_json(self) + } })]; ast.items.extend_from_slice(&methods); TokenStream::from(ast.to_token_stream()) } diff --git a/crates/message/src/lib.rs b/crates/message/src/lib.rs index a9d689c4..174175f2 100644 --- a/crates/message/src/lib.rs +++ b/crates/message/src/lib.rs @@ -1,27 +1,27 @@ use derive_more::{From, Into}; use pyo3::{create_exception, exceptions::PyException, prelude::*}; use serde::{Deserialize, Serialize}; +use solders_macros::{common_methods, richcmp_eq_only}; +use solders_traits::{handle_py_err, PyErrWrapper}; +use solders_traits_core::{ + handle_py_value_err, impl_display, py_from_bytes_general_via_bincode, + pybytes_general_via_bincode, CommonMethodsCore, PyBytesGeneral, RichcmpEqualityOnly, +}; use { solana_instruction::Instruction as InstructionOriginal, solana_message::{ - AddressLookupTableAccount as AddressLookupTableAccountOriginal, compiled_instruction::CompiledInstruction as CompiledInstructionOriginal, legacy::Message as MessageOriginal, v0::{ Message as MessageV0Original, MessageAddressTableLookup as MessageAddressTableLookupOriginal, }, + AddressLookupTableAccount as AddressLookupTableAccountOriginal, MessageHeader as MessageHeaderOriginal, VersionedMessage as VersionedMessageOriginal, MESSAGE_HEADER_LENGTH, }, solana_pubkey::Pubkey as PubkeyOriginal, }; -use solders_macros::{common_methods, richcmp_eq_only}; -use solders_traits::{handle_py_err, PyErrWrapper}; -use solders_traits_core::{ - handle_py_value_err, impl_display, py_from_bytes_general_via_bincode, - pybytes_general_via_bincode, CommonMethodsCore, PyBytesGeneral, RichcmpEqualityOnly, -}; use solders_address_lookup_table_account::AddressLookupTableAccount; use solders_hash::Hash as SolderHash; diff --git a/crates/primitives/src/epoch_schedule.rs b/crates/primitives/src/epoch_schedule.rs index 481ea653..d4c0584d 100644 --- a/crates/primitives/src/epoch_schedule.rs +++ b/crates/primitives/src/epoch_schedule.rs @@ -1,11 +1,11 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; +use solders_macros::{common_methods, richcmp_eq_only}; use { solana_clock::{Epoch, Slot}, solana_epoch_schedule::EpochSchedule as EpochScheduleOriginal, }; -use solders_macros::{common_methods, richcmp_eq_only}; use solders_traits_core::{ impl_display, py_from_bytes_general_via_bincode, pybytes_general_via_bincode, diff --git a/crates/rpc-requests/src/lib.rs b/crates/rpc-requests/src/lib.rs index 2734170d..76a8658c 100644 --- a/crates/rpc-requests/src/lib.rs +++ b/crates/rpc-requests/src/lib.rs @@ -2849,9 +2849,7 @@ pub fn include_requests(m: &Bound<'_, PyModule>) -> PyResult<()> { m.add_class::()?; m.add_class::()?; m.add_class::()?; - let funcs = [ - wrap_pyfunction!(batch_requests_to_json, m)?, - ]; + let funcs = [wrap_pyfunction!(batch_requests_to_json, m)?]; for func in funcs { m.add_function(func)?; } diff --git a/crates/rpc-send-transaction-config/src/lib.rs b/crates/rpc-send-transaction-config/src/lib.rs index 3cca8f48..874f1801 100644 --- a/crates/rpc-send-transaction-config/src/lib.rs +++ b/crates/rpc-send-transaction-config/src/lib.rs @@ -1,7 +1,7 @@ use pyo3::prelude::*; use serde::{Deserialize, Serialize}; -use solana_rpc_client_api::config as rpc_config; use solana_commitment_config::CommitmentLevel as CommitmentLevelOriginal; +use solana_rpc_client_api::config as rpc_config; use solana_transaction_status_client_types::UiTransactionEncoding as UiTransactionEncodingOriginal; use solders_commitment_config::CommitmentLevel; use solders_macros::{common_methods, richcmp_eq_only}; diff --git a/crates/system-program/src/lib.rs b/crates/system-program/src/lib.rs index d1ed122f..fb6d8fb6 100644 --- a/crates/system-program/src/lib.rs +++ b/crates/system-program/src/lib.rs @@ -12,6 +12,7 @@ use solana_address_lookup_table_interface::instruction::{ use { solana_instruction::Instruction as InstructionOriginal, solana_pubkey::Pubkey as PubkeyOriginal, + solana_sdk_ids::system_program, solana_system_interface::instruction::{ advance_nonce_account as advance_nonce_account_original, allocate as allocate_original, allocate_with_seed as allocate_with_seed_original, assign as assign_original, @@ -26,7 +27,6 @@ use { withdraw_nonce_account as withdraw_nonce_account_original, SystemInstruction as SystemInstructionOriginal, }, - solana_sdk_ids::system_program, }; use solders_instruction::Instruction; diff --git a/crates/token/src/state.rs b/crates/token/src/state.rs index 324e5b8f..0476d240 100644 --- a/crates/token/src/state.rs +++ b/crates/token/src/state.rs @@ -1,6 +1,7 @@ use derive_more::{From, Into}; use pyo3::prelude::*; -use solana_program_option::COption; use solana_program_pack::Pack; +use solana_program_option::COption; +use solana_program_pack::Pack; use solders_macros::{common_methods_core, enum_original_mapping, richcmp_eq_only}; use solders_pubkey::Pubkey; use solders_traits_core::{ diff --git a/crates/traits/src/lib.rs b/crates/traits/src/lib.rs index a2c97d04..cf1a2716 100644 --- a/crates/traits/src/lib.rs +++ b/crates/traits/src/lib.rs @@ -4,6 +4,7 @@ use litesvm::error::LiteSVMError as LiteSVMErrorOriginal; use pyo3::{create_exception, exceptions::PyException, prelude::*, pyclass::CompareOp}; #[cfg(feature = "banks-client")] use solana_banks_client::BanksClientError as BanksClientErrorOriginal; +use solders_traits_core::richcmp_type_error; use { solana_commitment_config::ParseCommitmentLevelError as ParseCommitmentLevelErrorOriginal, solana_hash::ParseHashError as ParseHashErrorOriginal, @@ -13,7 +14,6 @@ use { solana_signer::{Signer as SignerTrait, SignerError as SignerErrorOriginal}, solana_transaction_error::TransactionError as TransactionErrorOriginal, }; -use solders_traits_core::richcmp_type_error; pub struct PyErrWrapper(pub PyErr); impl From for PyErr { diff --git a/crates/transaction-error/src/lib.rs b/crates/transaction-error/src/lib.rs index 1d5caa78..04696ee0 100644 --- a/crates/transaction-error/src/lib.rs +++ b/crates/transaction-error/src/lib.rs @@ -1,12 +1,12 @@ use derive_more::{From, Into}; use pyo3::prelude::*; use serde::{Deserialize, Serialize}; +use solders_macros::{common_methods, richcmp_eq_only}; +use solders_traits_core::transaction_status_boilerplate; use { solana_instruction::error::InstructionError as InstructionErrorOriginal, solana_transaction_error::TransactionError as TransactionErrorOriginal, }; -use solders_macros::{common_methods, richcmp_eq_only}; -use solders_traits_core::transaction_status_boilerplate; #[derive(Clone, Debug, PartialEq, Eq, Serialize, Deserialize, From, Into)] #[pyclass(module = "solders.transaction_status", subclass)] diff --git a/crates/transaction-status/src/lib.rs b/crates/transaction-status/src/lib.rs index 08cac3a6..6a3715d4 100644 --- a/crates/transaction-status/src/lib.rs +++ b/crates/transaction-status/src/lib.rs @@ -30,11 +30,10 @@ use serde::{Deserialize, Serialize}; use serde_json::Value; use solana_reward_info::RewardType as RewardTypeOriginal; use solana_transaction_status_client_types::{ - ParsedAccount as ParsedAccountOriginal, ParsedAccountSource as ParsedAccountSourceOriginal, - ParsedInstruction as ParsedInstructionOriginal, EncodedTransaction as EncodedTransactionOriginal, EncodedTransactionWithStatusMeta as EncodedTransactionWithStatusMetaOriginal, - Reward as RewardOriginal, + ParsedAccount as ParsedAccountOriginal, ParsedAccountSource as ParsedAccountSourceOriginal, + ParsedInstruction as ParsedInstructionOriginal, Reward as RewardOriginal, TransactionBinaryEncoding as TransactionBinaryEncodingOriginal, UiAccountsList as UiAccountsListOriginal, UiAddressTableLookup as UiAddressTableLookupOriginal, UiCompiledInstruction as UiCompiledInstructionOriginal, diff --git a/crates/transaction/src/lib.rs b/crates/transaction/src/lib.rs index 666087b3..5b1b9973 100644 --- a/crates/transaction/src/lib.rs +++ b/crates/transaction/src/lib.rs @@ -2,14 +2,6 @@ use derive_more::{From, Into}; use pyo3::{prelude::*, IntoPyObject}; use serde::{Deserialize, Serialize}; -use { - solana_pubkey::Pubkey as PubkeyOriginal, - solana_sanitize::Sanitize, - solana_signature::Signature as SignatureOriginal, - solana_transaction::{ - uses_durable_nonce, Transaction as TransactionOriginal, - versioned::{Legacy as LegacyOriginal, VersionedTransaction as VersionedTransactionOriginal, TransactionVersion as TransactionVersionOriginal}, - }}; use solders_macros::{common_methods, richcmp_eq_only}; use solders_pubkey::{convert_optional_pubkey, Pubkey}; use solders_traits::handle_py_err; @@ -17,6 +9,19 @@ use solders_traits_core::{ impl_display, py_from_bytes_general_via_bincode, pybytes_general_via_bincode, CommonMethodsCore, RichcmpEqualityOnly, }; +use { + solana_pubkey::Pubkey as PubkeyOriginal, + solana_sanitize::Sanitize, + solana_signature::Signature as SignatureOriginal, + solana_transaction::{ + uses_durable_nonce, + versioned::{ + Legacy as LegacyOriginal, TransactionVersion as TransactionVersionOriginal, + VersionedTransaction as VersionedTransactionOriginal, + }, + Transaction as TransactionOriginal, + }, +}; use solders_hash::Hash as SolderHash; use solders_instruction::{convert_instructions, CompiledInstruction, Instruction}; diff --git a/src/address_lookup_table_account.rs b/src/address_lookup_table_account.rs index 2f175af0..21abfdd8 100644 --- a/src/address_lookup_table_account.rs +++ b/src/address_lookup_table_account.rs @@ -1,5 +1,7 @@ use pyo3::prelude::*; -use solana_address_lookup_table_interface::state::{LOOKUP_TABLE_MAX_ADDRESSES, LOOKUP_TABLE_META_SIZE}; +use solana_address_lookup_table_interface::state::{ + LOOKUP_TABLE_MAX_ADDRESSES, LOOKUP_TABLE_META_SIZE, +}; use solana_sdk_ids::address_lookup_table::ID; use solders_address_lookup_table_account::{ derive_lookup_table_address, AddressLookupTable, AddressLookupTableAccount, LookupTableMeta, From dfb7d338242577818de00af615c8c14d6440e89d Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:02:21 +0000 Subject: [PATCH 05/13] sort deps --- Cargo.toml | 159 +++++++++--------- crates/account-decoder/Cargo.toml | 12 +- crates/account/Cargo.toml | 8 +- .../address-lookup-table-account/Cargo.toml | 8 +- crates/base64-string/Cargo.toml | 4 +- crates/commitment-config/Cargo.toml | 6 +- crates/compute-budget/Cargo.toml | 2 +- crates/epoch-info/Cargo.toml | 8 +- crates/hash/Cargo.toml | 10 +- crates/instruction/Cargo.toml | 6 +- crates/keypair/Cargo.toml | 8 +- crates/litesvm/Cargo.toml | 4 +- crates/macros/Cargo.toml | 4 +- crates/message/Cargo.toml | 14 +- crates/primitives/Cargo.toml | 12 +- crates/pubkey/Cargo.toml | 10 +- crates/rpc-account-info-config/Cargo.toml | 8 +- crates/rpc-common/Cargo.toml | 12 +- crates/rpc-config-no-filter/Cargo.toml | 10 +- crates/rpc-config-no-rpc-api/Cargo.toml | 2 +- crates/rpc-config/Cargo.toml | 4 +- crates/rpc-errors-no-tx-status/Cargo.toml | 4 +- crates/rpc-errors-tx-status/Cargo.toml | 6 +- crates/rpc-errors/Cargo.toml | 2 +- crates/rpc-filter/Cargo.toml | 6 +- crates/rpc-program-accounts-config/Cargo.toml | 8 +- crates/rpc-request-airdrop-config/Cargo.toml | 6 +- .../rpc-request-params-no-config/Cargo.toml | 4 +- crates/rpc-request-params/Cargo.toml | 10 +- crates/rpc-requests/Cargo.toml | 20 +-- crates/rpc-responses-common/Cargo.toml | 18 +- crates/rpc-responses-tx-status/Cargo.toml | 10 +- crates/rpc-responses/Cargo.toml | 36 ++-- crates/rpc-send-transaction-config/Cargo.toml | 6 +- crates/rpc-sig-status-config/Cargo.toml | 2 +- crates/rpc-sigs-for-address-config/Cargo.toml | 4 +- crates/rpc-sim-transaction-config/Cargo.toml | 6 +- .../Cargo.toml | 2 +- crates/signature/Cargo.toml | 8 +- crates/system-program/Cargo.toml | 16 +- crates/token/Cargo.toml | 2 +- crates/traits-core/Cargo.toml | 4 +- crates/traits/Cargo.toml | 10 +- .../Cargo.toml | 2 +- crates/transaction-error/Cargo.toml | 6 +- crates/transaction-return-data/Cargo.toml | 10 +- crates/transaction-status-enums/Cargo.toml | 2 +- crates/transaction-status-struct/Cargo.toml | 8 +- crates/transaction-status/Cargo.toml | 24 +-- crates/transaction/Cargo.toml | 16 +- 50 files changed, 283 insertions(+), 286 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0058c674..0e2847b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,17 +14,17 @@ name = "solders" crate-type = ["cdylib", "rlib"] [dependencies] -pyo3 = { workspace = true, features = ["macros", "extension-module", "abi3-py37"] } bincode = { workspace = true } -serde = { workspace = true } derive_more = { workspace = true } +pyo3 = { workspace = true, features = ["macros", "extension-module", "abi3-py37"] } +serde = { workspace = true } solana-address-lookup-table-interface = { workspace = true } solana-sdk-ids = { workspace = true } solders-account = { workspace = true } solders-account-decoder = { workspace = true } solders-address-lookup-table-account = { workspace = true } -solders-compute-budget = { workspace = true } solders-commitment-config = { workspace = true } +solders-compute-budget = { workspace = true } solders-epoch-info = { workspace = true } solders-hash = { workspace = true } solders-instruction = { workspace = true } @@ -40,10 +40,10 @@ solders-rpc-requests = { workspace = true, optional = true } solders-rpc-responses = { workspace = true, optional = true } solders-signature = { workspace = true } solders-system-program = { workspace = true } +solders-token = { workspace = true } solders-traits = { workspace = true } solders-transaction = { workspace = true } solders-transaction-status = { workspace = true } -solders-token = { workspace = true } [features] default = ["litesvm", "ring"] @@ -53,14 +53,11 @@ ring = [ "dep:solders-rpc-errors", "dep:solders-rpc-filter", "dep:solders-rpc-requests", - "dep:solders-rpc-responses", + "dep:solders-rpc-responses" ] [workspace] -members = [ - ".", - "crates/*", -] +members = [".", "crates/*"] [workspace.package] version = "0.23.0" @@ -69,72 +66,30 @@ license = "MIT" edition = "2021" [workspace.dependencies] +base64 = "0.13.0" +bincode = "1.3.3" +bs58 = "0.4.0" +camelpaste = "0.1.0" chrono-humanize = "0.2.3" +derive_more = "0.99.17" five8 = "0.2.1" +litesvm = { git = "https://github.com/LiteSVM/litesvm.git", rev = "7e3d9a8" } log = "0.4" pyo3 = { version = "0.23", default-features = false } -solana-compute-budget = "2.1.10" -solders-macros = { path = "./crates/macros", version = "=0.23.0" } -solders-traits = { path = "./crates/traits", version = "=0.23.0" } -solders-traits-core = { path = "./crates/traits-core", version = "=0.23.0" } -solders-account-decoder = { path = "./crates/account-decoder", version = "=0.23.0" } -solders-banks-interface = { path = "./crates/banks-interface", version = "=0.23.0" } -solders-commitment-config = { path = "./crates/commitment-config", version = "=0.23.0" } -solders-compute-budget = { path = "./crates/compute-budget", version = "=0.23.0" } -solders-epoch-info = { path = "./crates/epoch-info", version = "=0.23.0" } -solders-litesvm = { path = "./crates/litesvm", version = "=0.1.0" } -solders-transaction-confirmation-status = { path = "./crates/transaction-confirmation-status", version = "=0.23.0" } -solders-transaction-return-data = { path = "./crates/transaction-return-data", version = "=0.23.0" } -solders-transaction-status = { path = "./crates/transaction-status", version = "=0.23.0" } -solders-transaction-status-enums = { path = "./crates/transaction-status-enums", version = "=0.23.0" } -solders-transaction-status-struct = { path = "./crates/transaction-status-struct", version = "=0.23.0" } -solders-base64-string = { path = "./crates/base64-string", version = "=0.23.0" } -solders-rpc-filter = { path = "./crates/rpc-filter", version = "=0.23.0" } -solders-rpc-config = { path = "./crates/rpc-config", version = "=0.23.0" } -solders-rpc-config-macros = { path = "./crates/rpc-config-macros", version = "=0.23.0" } -solders-rpc-config-no-filter = { path = "./crates/rpc-config-no-filter", version = "=0.23.0" } -solders-rpc-config-no-rpc-api = { path = "./crates/rpc-config-no-rpc-api", version = "=0.23.0" } -solders-rpc-account-info-config = { path = "./crates/rpc-account-info-config", version = "=0.23.0" } -solders-rpc-program-accounts-config = { path = "./crates/rpc-program-accounts-config", version = "=0.23.0" } -solders-rpc-common = { path = "./crates/rpc-common", version = "=0.23.0" } -solders-rpc-errors = { path = "./crates/rpc-errors", version = "=0.23.0" } -solders-rpc-errors-common = { path = "./crates/rpc-errors-common", version = "=0.23.0" } -solders-rpc-errors-tx-status = { path = "./crates/rpc-errors-tx-status", version = "=0.23.0" } -solders-rpc-errors-no-tx-status = { path = "./crates/rpc-errors-no-tx-status", version = "=0.23.0" } -solders-rpc-request-airdrop-config = { path = "./crates/rpc-request-airdrop-config", version = "=0.23.0" } -solders-rpc-request-params = { path = "./crates/rpc-request-params", version = "=0.23.0" } -solders-rpc-request-params-no-config = { path = "./crates/rpc-request-params-no-config", version = "=0.23.0" } -solders-rpc-requests = { path = "./crates/rpc-requests", version = "=0.23.0" } -solders-rpc-responses = { path = "./crates/rpc-responses", version = "=0.23.0" } -solders-rpc-responses-common = { path = "./crates/rpc-responses-common", version = "=0.23.0" } -solders-rpc-responses-tx-status = { path = "./crates/rpc-responses-tx-status", version = "=0.23.0" } -solders-rpc-response-data-boilerplate = { path = "./crates/rpc-response-data-boilerplate", version = "=0.23.0" } -solders-rpc-send-transaction-config = { path = "./crates/rpc-send-transaction-config", version = "=0.23.0" } -solders-rpc-sig-status-config = { path = "./crates/rpc-sig-status-config", version = "=0.23.0" } -solders-rpc-sigs-for-address-config = { path = "./crates/rpc-sigs-for-address-config", version = "=0.23.0" } -solders-rpc-sim-transaction-config = { path = "./crates/rpc-sim-transaction-config", version = "=0.23.0" } -solders-rpc-simulate-tx-accounts-config = { path = "./crates/rpc-simulate-tx-accounts-config", version = "=0.23.0" } -solders-rpc-version = { path = "./crates/rpc-version", version = "=0.23.0" } -solders-primitives = { path = "./crates/primitives", version = "=0.23.0" } -solders-pubkey = { path = "./crates/pubkey", version = "=0.23.0" } -solders-system-program = { path = "./crates/system-program", version = "=0.23.0" } -solders-instruction = { path = "./crates/instruction", version = "=0.23.0" } -solders-address-lookup-table-account = { path = "./crates/address-lookup-table-account", version = "=0.23.0" } -solders-message = { path = "./crates/message", version = "=0.23.0" } -solders-signature = { path = "./crates/signature", version = "=0.23.0" } -solders-keypair = { path = "./crates/keypair", version = "=0.23.0" } -solders-token = { path = "./crates/token", version = "=0.23.0" } -solders-transaction = { path = "./crates/transaction", version = "=0.23.0" } -solders-transaction-error = { path = "./crates/transaction-error", version = "=0.23.0" } -solders-account = { path = "./crates/account", version = "=0.23.0" } -solders-hash = { path = "./crates/hash", version = "=0.23.0" } +pythonize = "0.23" +serde = "^1.0.188" +serde_bytes = "0.11.12" +serde_cbor = "^0.11.2" +serde_json = "^1.0.106" serde_with = { version = "^1.14.0", features = ["base64"] } solana-account = "2.2.1" solana-account-decoder-client-types = { version = "2.1.0", features = ["zstd"] } solana-address-lookup-table-interface = "2.2.1" +solana-banks-client = "2.1.0" solana-banks-interface = "2.1.0" solana-clock = "2.2.1" solana-commitment-config = "2.2.1" +solana-compute-budget = "2.1.10" solana-compute-budget-interface = "2.2.1" solana-derivation-path = "2.2.1" solana-epoch-info = "2.2.1" @@ -143,15 +98,17 @@ solana-epoch-schedule = "2.2.1" solana-feature-set = "2.2.1" solana-hash = "2.2.1" solana-instruction = "2.2.1" -solana-last-restart-slot = "2.2.1" solana-keypair = "2.2.1" +solana-last-restart-slot = "2.2.1" solana-message = "2.2.1" solana-presigner = "2.2.1" solana-program-option = "2.2.1" solana-program-pack = "2.2.1" +solana-program-test = "2.1.10" solana-pubkey = "2.2.1" solana-rent = "2.2.1" solana-reward-info = "2.2.1" +solana-rpc-client-api = "2.1.0" solana-sanitize = "2.2.1" solana-sdk-ids = "2.2.1" solana-sha256-hasher = "2.2.1" @@ -164,24 +121,64 @@ solana-system-interface = "1.0.0" solana-sysvar = "2.2.1" solana-transaction = "2.2.1" solana-transaction-context = "2.2.1" -solana-transaction-status-client-types = "2.1.0" solana-transaction-error = "2.2.1" -solana-rpc-client-api = "2.1.0" +solana-transaction-status-client-types = "2.1.0" +solders-account = { path = "./crates/account", version = "=0.23.0" } +solders-account-decoder = { path = "./crates/account-decoder", version = "=0.23.0" } +solders-address-lookup-table-account = { path = "./crates/address-lookup-table-account", version = "=0.23.0" } +solders-banks-interface = { path = "./crates/banks-interface", version = "=0.23.0" } +solders-base64-string = { path = "./crates/base64-string", version = "=0.23.0" } +solders-commitment-config = { path = "./crates/commitment-config", version = "=0.23.0" } +solders-compute-budget = { path = "./crates/compute-budget", version = "=0.23.0" } +solders-epoch-info = { path = "./crates/epoch-info", version = "=0.23.0" } +solders-hash = { path = "./crates/hash", version = "=0.23.0" } +solders-instruction = { path = "./crates/instruction", version = "=0.23.0" } +solders-keypair = { path = "./crates/keypair", version = "=0.23.0" } +solders-litesvm = { path = "./crates/litesvm", version = "=0.1.0" } +solders-macros = { path = "./crates/macros", version = "=0.23.0" } +solders-message = { path = "./crates/message", version = "=0.23.0" } +solders-primitives = { path = "./crates/primitives", version = "=0.23.0" } +solders-pubkey = { path = "./crates/pubkey", version = "=0.23.0" } +solders-rpc-account-info-config = { path = "./crates/rpc-account-info-config", version = "=0.23.0" } +solders-rpc-common = { path = "./crates/rpc-common", version = "=0.23.0" } +solders-rpc-config = { path = "./crates/rpc-config", version = "=0.23.0" } +solders-rpc-config-macros = { path = "./crates/rpc-config-macros", version = "=0.23.0" } +solders-rpc-config-no-filter = { path = "./crates/rpc-config-no-filter", version = "=0.23.0" } +solders-rpc-config-no-rpc-api = { path = "./crates/rpc-config-no-rpc-api", version = "=0.23.0" } +solders-rpc-errors = { path = "./crates/rpc-errors", version = "=0.23.0" } +solders-rpc-errors-common = { path = "./crates/rpc-errors-common", version = "=0.23.0" } +solders-rpc-errors-no-tx-status = { path = "./crates/rpc-errors-no-tx-status", version = "=0.23.0" } +solders-rpc-errors-tx-status = { path = "./crates/rpc-errors-tx-status", version = "=0.23.0" } +solders-rpc-filter = { path = "./crates/rpc-filter", version = "=0.23.0" } +solders-rpc-program-accounts-config = { path = "./crates/rpc-program-accounts-config", version = "=0.23.0" } +solders-rpc-request-airdrop-config = { path = "./crates/rpc-request-airdrop-config", version = "=0.23.0" } +solders-rpc-request-params = { path = "./crates/rpc-request-params", version = "=0.23.0" } +solders-rpc-request-params-no-config = { path = "./crates/rpc-request-params-no-config", version = "=0.23.0" } +solders-rpc-requests = { path = "./crates/rpc-requests", version = "=0.23.0" } +solders-rpc-response-data-boilerplate = { path = "./crates/rpc-response-data-boilerplate", version = "=0.23.0" } +solders-rpc-responses = { path = "./crates/rpc-responses", version = "=0.23.0" } +solders-rpc-responses-common = { path = "./crates/rpc-responses-common", version = "=0.23.0" } +solders-rpc-responses-tx-status = { path = "./crates/rpc-responses-tx-status", version = "=0.23.0" } +solders-rpc-send-transaction-config = { path = "./crates/rpc-send-transaction-config", version = "=0.23.0" } +solders-rpc-sig-status-config = { path = "./crates/rpc-sig-status-config", version = "=0.23.0" } +solders-rpc-sigs-for-address-config = { path = "./crates/rpc-sigs-for-address-config", version = "=0.23.0" } +solders-rpc-sim-transaction-config = { path = "./crates/rpc-sim-transaction-config", version = "=0.23.0" } +solders-rpc-simulate-tx-accounts-config = { path = "./crates/rpc-simulate-tx-accounts-config", version = "=0.23.0" } +solders-rpc-version = { path = "./crates/rpc-version", version = "=0.23.0" } +solders-signature = { path = "./crates/signature", version = "=0.23.0" } +solders-system-program = { path = "./crates/system-program", version = "=0.23.0" } +solders-token = { path = "./crates/token", version = "=0.23.0" } +solders-traits = { path = "./crates/traits", version = "=0.23.0" } +solders-traits-core = { path = "./crates/traits-core", version = "=0.23.0" } +solders-transaction = { path = "./crates/transaction", version = "=0.23.0" } +solders-transaction-confirmation-status = { path = "./crates/transaction-confirmation-status", version = "=0.23.0" } +solders-transaction-error = { path = "./crates/transaction-error", version = "=0.23.0" } +solders-transaction-return-data = { path = "./crates/transaction-return-data", version = "=0.23.0" } +solders-transaction-status = { path = "./crates/transaction-status", version = "=0.23.0" } +solders-transaction-status-enums = { path = "./crates/transaction-status-enums", version = "=0.23.0" } +solders-transaction-status-struct = { path = "./crates/transaction-status-struct", version = "=0.23.0" } spl-associated-token-account-client = "2.0" spl-token = "7.0" -bincode = "1.3.3" -base64 = "0.13.0" -litesvm = { git = "https://github.com/LiteSVM/litesvm.git", rev = "7e3d9a8" } -serde = "^1.0.188" -serde_bytes = "0.11.12" -serde_json = "^1.0.106" -serde_cbor = "^0.11.2" -time = "0.3.35" -derive_more = "0.99.17" -solana-program-test = "2.1.10" -solana-banks-client = "2.1.0" -pythonize = "0.23" -bs58 = "0.4.0" thiserror = "^1.0.31" -camelpaste = "0.1.0" +time = "0.3.35" zeroize = "1.7" diff --git a/crates/account-decoder/Cargo.toml b/crates/account-decoder/Cargo.toml index b8ee2166..b742aa75 100644 --- a/crates/account-decoder/Cargo.toml +++ b/crates/account-decoder/Cargo.toml @@ -9,14 +9,14 @@ repository = { workspace = true } description = "Solders account decoder crate." [dependencies] +base64 = { workspace = true } +bs58 = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } +pythonize = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -derive_more = { workspace = true } -pythonize = { workspace = true } +solana-account-decoder-client-types = { workspace = true } solders-macros = { workspace = true } -zstd = "0.11.2" -base64 = { workspace = true } -bs58 = { workspace = true } solders-traits-core = { workspace = true } -solana-account-decoder-client-types = { workspace = true } +zstd = "0.11.2" diff --git a/crates/account/Cargo.toml b/crates/account/Cargo.toml index cb9763b7..c7f9ba2d 100644 --- a/crates/account/Cargo.toml +++ b/crates/account/Cargo.toml @@ -9,15 +9,15 @@ repository = { workspace = true } description = "Solders Account crate." [dependencies] +base64 = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } serde_bytes.workspace = true serde_with.workspace = true -derive_more = { workspace = true } solana-account = { workspace = true } +solana-account-decoder-client-types = { workspace = true } +solders-account-decoder = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } solders-traits-core = { workspace = true } -solana-account-decoder-client-types = { workspace = true } -solders-account-decoder = { workspace = true } -base64 = { workspace = true } diff --git a/crates/address-lookup-table-account/Cargo.toml b/crates/address-lookup-table-account/Cargo.toml index 1cca9fc7..86d127a4 100644 --- a/crates/address-lookup-table-account/Cargo.toml +++ b/crates/address-lookup-table-account/Cargo.toml @@ -9,14 +9,14 @@ repository = { workspace = true } description = "Solders address lookup table account crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } +serde = { workspace = true } solana-address-lookup-table-interface = { workspace = true, features = ["bincode", "bytemuck"] } solana-message = { workspace = true } solana-pubkey = { workspace = true } solana-slot-hashes = { workspace = true, features = ["serde"] } -solders-traits-core = { workspace = true } +solders-hash = { workspace = true } solders-macros = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } solders-pubkey = { workspace = true } -solders-hash = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/base64-string/Cargo.toml b/crates/base64-string/Cargo.toml index e0850c7d..31b23a6d 100644 --- a/crates/base64-string/Cargo.toml +++ b/crates/base64-string/Cargo.toml @@ -9,10 +9,10 @@ repository = { workspace = true } description = "Solders base64 string crate." [dependencies] +base64 = { workspace = true } +bincode = { workspace = true } serde = { workspace = true } solana-message = { workspace = true } solana-transaction = { workspace = true } solders-message = { workspace = true } solders-transaction = { workspace = true } -base64 = { workspace = true } -bincode = { workspace = true } diff --git a/crates/commitment-config/Cargo.toml b/crates/commitment-config/Cargo.toml index 4938e4f3..7c051fbb 100644 --- a/crates/commitment-config/Cargo.toml +++ b/crates/commitment-config/Cargo.toml @@ -9,8 +9,8 @@ repository = { workspace = true } description = "Solders commitment config crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits = { workspace = true } -solana-commitment-config = { workspace = true } serde = { workspace = true } -derive_more = { workspace = true } +solana-commitment-config = { workspace = true } +solders-traits = { workspace = true } diff --git a/crates/compute-budget/Cargo.toml b/crates/compute-budget/Cargo.toml index ac6fc4c4..9c5aa0ce 100644 --- a/crates/compute-budget/Cargo.toml +++ b/crates/compute-budget/Cargo.toml @@ -13,7 +13,7 @@ pyo3 = { workspace = true, features = ["macros"] } solana-compute-budget = { workspace = true } solana-compute-budget-interface = { workspace = true } solana-sdk-ids = { workspace = true } +solders-instruction = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } -solders-instruction = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/epoch-info/Cargo.toml b/crates/epoch-info/Cargo.toml index f767a78f..dcd9ac57 100644 --- a/crates/epoch-info/Cargo.toml +++ b/crates/epoch-info/Cargo.toml @@ -9,9 +9,9 @@ repository = { workspace = true } description = "Solders epoch info crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits-core = { workspace = true } -solders-macros = { workspace = true } -solana-epoch-info = { workspace = true, features = ["serde"] } serde = { workspace = true } -derive_more = { workspace = true } +solana-epoch-info = { workspace = true, features = ["serde"] } +solders-macros = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/hash/Cargo.toml b/crates/hash/Cargo.toml index 2bb795c9..a246f20e 100644 --- a/crates/hash/Cargo.toml +++ b/crates/hash/Cargo.toml @@ -9,11 +9,11 @@ repository = { workspace = true } description = "Solders hash crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits = { workspace = true } -solders-traits-core = { workspace = true } -solders-macros = { workspace = true } +serde = { workspace = true } solana-hash = { workspace = true } solana-sha256-hasher = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } +solders-macros = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/instruction/Cargo.toml b/crates/instruction/Cargo.toml index af3cb5fc..691b5408 100644 --- a/crates/instruction/Cargo.toml +++ b/crates/instruction/Cargo.toml @@ -9,12 +9,12 @@ repository = { workspace = true } description = "Solders instruction crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } +serde = { workspace = true } solana-instruction = { workspace = true } solana-message = { workspace = true } solana-pubkey = { workspace = true } -solders-traits-core = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/keypair/Cargo.toml b/crates/keypair/Cargo.toml index f50145ce..b3bc8e51 100644 --- a/crates/keypair/Cargo.toml +++ b/crates/keypair/Cargo.toml @@ -9,18 +9,18 @@ repository = { workspace = true } description = "Solders keypair crate." [dependencies] +derive_more = { workspace = true } five8 = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } +serde = { workspace = true } solana-derivation-path = { workspace = true } solana-keypair = { workspace = true, features = ["seed-derivable"] } solana-presigner = { workspace = true } solana-pubkey = { workspace = true } solana-signature = { workspace = true } solana-signer = { workspace = true } -solders-traits-core = { workspace = true } -solders-traits = { workspace = true } solders-macros = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } solders-pubkey = { workspace = true } solders-signature = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/litesvm/Cargo.toml b/crates/litesvm/Cargo.toml index 948d5fab..ee412de0 100644 --- a/crates/litesvm/Cargo.toml +++ b/crates/litesvm/Cargo.toml @@ -9,21 +9,21 @@ repository = { workspace = true } description = "Solders LiteSVM crate." [dependencies] +litesvm = { workspace = true, features = ["nodejs-internal", "serde"] } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -litesvm = { workspace = true, features = ["nodejs-internal", "serde"] } solana-account = { workspace = true } solana-clock = { workspace = true } solana-epoch-rewards = { workspace = true } solana-epoch-schedule = { workspace = true } solana-feature-set = { workspace = true } solana-hash = { workspace = true } +solana-last-restart-slot = { workspace = true } solana-message = { workspace = true } solana-rent = { workspace = true } solana-slot-hashes = { workspace = true } solana-slot-history = { workspace = true } solana-stake-interface = { workspace = true } -solana-last-restart-slot = { workspace = true } solders-account = { workspace = true } solders-compute-budget = { workspace = true } solders-hash = { workspace = true } diff --git a/crates/macros/Cargo.toml b/crates/macros/Cargo.toml index caa703ef..f1e5c591 100644 --- a/crates/macros/Cargo.toml +++ b/crates/macros/Cargo.toml @@ -12,6 +12,6 @@ repository = { workspace = true } proc-macro = true [dependencies] -quote = "1.0.18" -syn = {version="1.0.96", features = ["full"]} proc-macro2 = "1.0.39" +quote = "1.0.18" +syn = { version = "1.0.96", features = ["full"] } diff --git a/crates/message/Cargo.toml b/crates/message/Cargo.toml index b4c8c82f..5bc0782e 100644 --- a/crates/message/Cargo.toml +++ b/crates/message/Cargo.toml @@ -9,17 +9,17 @@ repository = { workspace = true } description = "Solders message crate." [dependencies] +bincode = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits-core = { workspace = true } -solders-traits = { workspace = true } -solders-macros = { workspace = true } +serde = { workspace = true } solana-instruction = { workspace = true } solana-message = { workspace = true, features = ["bincode", "blake3"] } solana-pubkey = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } solders-address-lookup-table-account = { workspace = true } -solders-pubkey = { workspace = true } solders-hash = { workspace = true } solders-instruction = { workspace = true } -bincode = { workspace = true } +solders-macros = { workspace = true } +solders-pubkey = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/primitives/Cargo.toml b/crates/primitives/Cargo.toml index 6cac9a17..8c4106d5 100644 --- a/crates/primitives/Cargo.toml +++ b/crates/primitives/Cargo.toml @@ -9,17 +9,17 @@ repository = { workspace = true } description = "Solders primitives crate." [dependencies] +bincode = { workspace = true } bv = "0.11.1" +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-hash = { workspace = true } -solders-traits-core = { workspace = true } -solders-macros = { workspace = true } +serde = { workspace = true } solana-clock = { workspace = true } solana-epoch-rewards = { workspace = true } solana-epoch-schedule = { workspace = true } solana-rent = { workspace = true } solana-slot-history = { workspace = true } solana-stake-interface = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } -bincode = { workspace = true } +solders-hash = { workspace = true } +solders-macros = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/pubkey/Cargo.toml b/crates/pubkey/Cargo.toml index 09df4884..4147ffb1 100644 --- a/crates/pubkey/Cargo.toml +++ b/crates/pubkey/Cargo.toml @@ -9,10 +9,10 @@ repository = { workspace = true } description = "Solders pubkey crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits-core = { workspace = true } -solders-traits = { workspace = true } -solders-macros = { workspace = true } -solana-pubkey = { workspace = true } serde = { workspace = true } -derive_more = { workspace = true } +solana-pubkey = { workspace = true } +solders-macros = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/rpc-account-info-config/Cargo.toml b/crates/rpc-account-info-config/Cargo.toml index f0236ed5..6f3d639b 100644 --- a/crates/rpc-account-info-config/Cargo.toml +++ b/crates/rpc-account-info-config/Cargo.toml @@ -11,10 +11,10 @@ description = "Solders RPC account info crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } -solders-traits-core = { workspace = true } -solders-account-decoder = { workspace = true } solana-account-decoder-client-types = { workspace = true } -solders-rpc-config-macros = { workspace = true } solana-rpc-client-api = { workspace = true } +solders-account-decoder = { workspace = true } solders-commitment-config = { workspace = true } +solders-macros = { workspace = true } +solders-rpc-config-macros = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/rpc-common/Cargo.toml b/crates/rpc-common/Cargo.toml index a93cf849..c6d60cc2 100644 --- a/crates/rpc-common/Cargo.toml +++ b/crates/rpc-common/Cargo.toml @@ -9,18 +9,18 @@ repository = { workspace = true } description = "Solders RPC common crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } -solders-macros = { workspace = true } -solders-traits-core = { workspace = true } +serde_with = { workspace = true } solana-account-decoder-client-types = { workspace = true } -solana-transaction-status-client-types = { workspace = true } solana-rpc-client-api = { workspace = true } +solana-transaction-status-client-types = { workspace = true } solders-account = { workspace = true } +solders-macros = { workspace = true } solders-rpc-response-data-boilerplate = { workspace = true } solders-rpc-responses-common = { workspace = true } -solders-transaction-return-data = { workspace = true } +solders-traits-core = { workspace = true } solders-transaction-error = { workspace = true } +solders-transaction-return-data = { workspace = true } solders-transaction-status = { workspace = true } -serde_with = { workspace = true } diff --git a/crates/rpc-config-no-filter/Cargo.toml b/crates/rpc-config-no-filter/Cargo.toml index 9820da07..a03ec000 100644 --- a/crates/rpc-config-no-filter/Cargo.toml +++ b/crates/rpc-config-no-filter/Cargo.toml @@ -11,12 +11,12 @@ description = "Solders RPC config-no-filter crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } -solders-traits-core = { workspace = true } solana-account-decoder-client-types = { workspace = true } -solders-pubkey = { workspace = true } -solders-transaction-status-enums = { workspace = true } solana-rpc-client-api = { workspace = true } +solders-commitment-config = { workspace = true } +solders-macros = { workspace = true } +solders-pubkey = { workspace = true } solders-rpc-config-macros = { workspace = true } solders-rpc-config-no-rpc-api = { workspace = true } -solders-commitment-config = { workspace = true } +solders-traits-core = { workspace = true } +solders-transaction-status-enums = { workspace = true } diff --git a/crates/rpc-config-no-rpc-api/Cargo.toml b/crates/rpc-config-no-rpc-api/Cargo.toml index 9e06e044..d0f32f8c 100644 --- a/crates/rpc-config-no-rpc-api/Cargo.toml +++ b/crates/rpc-config-no-rpc-api/Cargo.toml @@ -12,5 +12,5 @@ description = "Solders RPC config-no-rpc-api crate." pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } solders-macros = { workspace = true } -solders-traits-core = { workspace = true } solders-pubkey = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/rpc-config/Cargo.toml b/crates/rpc-config/Cargo.toml index d2b83806..95195cb7 100644 --- a/crates/rpc-config/Cargo.toml +++ b/crates/rpc-config/Cargo.toml @@ -10,13 +10,13 @@ description = "Solders RPC config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } +solders-rpc-account-info-config = { workspace = true } solders-rpc-config-no-filter = { workspace = true } +solders-rpc-config-no-rpc-api = { workspace = true } solders-rpc-program-accounts-config = { workspace = true } -solders-rpc-account-info-config = { workspace = true } solders-rpc-request-airdrop-config = { workspace = true } solders-rpc-send-transaction-config = { workspace = true } solders-rpc-sig-status-config = { workspace = true } solders-rpc-sigs-for-address-config = { workspace = true } solders-rpc-sim-transaction-config = { workspace = true } solders-rpc-simulate-tx-accounts-config = { workspace = true } -solders-rpc-config-no-rpc-api = { workspace = true } diff --git a/crates/rpc-errors-no-tx-status/Cargo.toml b/crates/rpc-errors-no-tx-status/Cargo.toml index d57ea8a6..ae8f2fa0 100644 --- a/crates/rpc-errors-no-tx-status/Cargo.toml +++ b/crates/rpc-errors-no-tx-status/Cargo.toml @@ -9,10 +9,10 @@ repository = { workspace = true } description = "Solders RPC errors-no-tx-status crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } solders-macros = { workspace = true } +solders-rpc-errors-common = { workspace = true } solders-traits-core = { workspace = true } solders-transaction-error = { workspace = true } -solders-rpc-errors-common = { workspace = true } diff --git a/crates/rpc-errors-tx-status/Cargo.toml b/crates/rpc-errors-tx-status/Cargo.toml index b65ca1a4..6f796fd0 100644 --- a/crates/rpc-errors-tx-status/Cargo.toml +++ b/crates/rpc-errors-tx-status/Cargo.toml @@ -8,11 +8,11 @@ license = { workspace = true } repository = { workspace = true } [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } solders-macros = { workspace = true } +solders-rpc-common = { workspace = true } +solders-rpc-errors-common = { workspace = true } solders-traits-core = { workspace = true } solders-transaction-error = { workspace = true } -solders-rpc-errors-common = { workspace = true } -solders-rpc-common = { workspace = true } diff --git a/crates/rpc-errors/Cargo.toml b/crates/rpc-errors/Cargo.toml index 07e50965..d7eebc7d 100644 --- a/crates/rpc-errors/Cargo.toml +++ b/crates/rpc-errors/Cargo.toml @@ -12,5 +12,5 @@ description = "Solders RPC errors crate." pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } solders-macros = { workspace = true } -solders-rpc-errors-tx-status = { workspace = true } solders-rpc-errors-no-tx-status = { workspace = true } +solders-rpc-errors-tx-status = { workspace = true } diff --git a/crates/rpc-filter/Cargo.toml b/crates/rpc-filter/Cargo.toml index 2bd04d7f..b085d5f8 100644 --- a/crates/rpc-filter/Cargo.toml +++ b/crates/rpc-filter/Cargo.toml @@ -9,12 +9,12 @@ repository = { workspace = true } description = "Solders RPC filter crate." [dependencies] +base64 = { workspace = true } +bs58 = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } solana-rpc-client-api = { workspace = true } solders-macros = { workspace = true } solders-traits-core = { workspace = true } thiserror = { workspace = true } -bs58 = { workspace = true } -base64 = { workspace = true } diff --git a/crates/rpc-program-accounts-config/Cargo.toml b/crates/rpc-program-accounts-config/Cargo.toml index 1e11dde9..670a335f 100644 --- a/crates/rpc-program-accounts-config/Cargo.toml +++ b/crates/rpc-program-accounts-config/Cargo.toml @@ -11,9 +11,9 @@ description = "Solders RPC program accounts config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } +solana-rpc-client-api = { workspace = true } solders-macros = { workspace = true } -solders-traits-core = { workspace = true } -solders-rpc-filter = { workspace = true } -solders-rpc-config-macros = { workspace = true } solders-rpc-account-info-config = { workspace = true } -solana-rpc-client-api = { workspace = true } +solders-rpc-config-macros = { workspace = true } +solders-rpc-filter = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/rpc-request-airdrop-config/Cargo.toml b/crates/rpc-request-airdrop-config/Cargo.toml index 92c8cef8..124eb686 100644 --- a/crates/rpc-request-airdrop-config/Cargo.toml +++ b/crates/rpc-request-airdrop-config/Cargo.toml @@ -11,9 +11,9 @@ description = "Solders RPC request airdrop config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } -solders-hash = { workspace = true } solana-rpc-client-api = { workspace = true } -solders-rpc-config-macros = { workspace = true } solders-commitment-config = { workspace = true } +solders-hash = { workspace = true } +solders-macros = { workspace = true } +solders-rpc-config-macros = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/rpc-request-params-no-config/Cargo.toml b/crates/rpc-request-params-no-config/Cargo.toml index 35f283d4..7609bb3e 100644 --- a/crates/rpc-request-params-no-config/Cargo.toml +++ b/crates/rpc-request-params-no-config/Cargo.toml @@ -12,8 +12,8 @@ description = "Solders RPC request-params-no-config crate." bincode = { workspace = true } serde = { workspace = true } serde_with = { workspace = true } +solders-base64-string = { workspace = true } solders-commitment-config = { workspace = true } -solders-rpc-version = { workspace = true } solders-message = { workspace = true } solders-pubkey = { workspace = true } -solders-base64-string = { workspace = true } +solders-rpc-version = { workspace = true } diff --git a/crates/rpc-request-params/Cargo.toml b/crates/rpc-request-params/Cargo.toml index 1769669d..8bd8f6dc 100644 --- a/crates/rpc-request-params/Cargo.toml +++ b/crates/rpc-request-params/Cargo.toml @@ -12,17 +12,17 @@ description = "Solders RPC request params crate." bincode = { workspace = true } serde = { workspace = true } serde_with = { workspace = true } -solders-hash = { workspace = true } +solana-rpc-client-api = { workspace = true } +solders-base64-string = { workspace = true } solders-commitment-config = { workspace = true } -solders-rpc-config-no-filter = { workspace = true } +solders-hash = { workspace = true } +solders-pubkey = { workspace = true } solders-rpc-account-info-config = { workspace = true } +solders-rpc-config-no-filter = { workspace = true } solders-rpc-program-accounts-config = { workspace = true } solders-rpc-request-airdrop-config = { workspace = true } solders-rpc-send-transaction-config = { workspace = true } solders-rpc-sig-status-config = { workspace = true } solders-rpc-sigs-for-address-config = { workspace = true } solders-rpc-sim-transaction-config = { workspace = true } -solana-rpc-client-api = { workspace = true } -solders-pubkey = { workspace = true } solders-signature = { workspace = true } -solders-base64-string = { workspace = true } diff --git a/crates/rpc-requests/Cargo.toml b/crates/rpc-requests/Cargo.toml index 6fb8431b..c2611d6e 100644 --- a/crates/rpc-requests/Cargo.toml +++ b/crates/rpc-requests/Cargo.toml @@ -9,27 +9,27 @@ repository = { workspace = true } description = "Solders RPC requests crate." [dependencies] +camelpaste = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -serde_with = { workspace = true } serde_json = { workspace = true } +serde_with = { workspace = true } +solders-commitment-config = { workspace = true } solders-hash = { workspace = true } solders-macros = { workspace = true } -solders-traits-core = { workspace = true } -solders-commitment-config = { workspace = true } -solders-rpc-config-no-filter = { workspace = true } +solders-message = { workspace = true } +solders-pubkey = { workspace = true } solders-rpc-account-info-config = { workspace = true } +solders-rpc-config-no-filter = { workspace = true } solders-rpc-program-accounts-config = { workspace = true } solders-rpc-request-airdrop-config = { workspace = true } +solders-rpc-request-params = { workspace = true } +solders-rpc-request-params-no-config = { workspace = true } solders-rpc-send-transaction-config = { workspace = true } solders-rpc-sig-status-config = { workspace = true } solders-rpc-sigs-for-address-config = { workspace = true } solders-rpc-sim-transaction-config = { workspace = true } -solders-rpc-request-params = { workspace = true } -solders-rpc-request-params-no-config = { workspace = true } solders-rpc-version = { workspace = true } -solders-message = { workspace = true } -solders-transaction = { workspace = true } -solders-pubkey = { workspace = true } solders-signature = { workspace = true } -camelpaste = { workspace = true } +solders-traits-core = { workspace = true } +solders-transaction = { workspace = true } diff --git a/crates/rpc-responses-common/Cargo.toml b/crates/rpc-responses-common/Cargo.toml index f8f866a4..1221b6c3 100644 --- a/crates/rpc-responses-common/Cargo.toml +++ b/crates/rpc-responses-common/Cargo.toml @@ -9,19 +9,19 @@ repository = { workspace = true } description = "Solders RPC responses-common crate." [dependencies] +camelpaste = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } serde_with = { workspace = true } -derive_more = { workspace = true } -solders-macros = { workspace = true } -solders-hash = { workspace = true } -solders-traits-core = { workspace = true } -solders-account = { workspace = true } -solders-account-decoder = { workspace = true } solana-account-decoder-client-types = { workspace = true } solana-rpc-client-api = { workspace = true } -solders-transaction-error = { workspace = true } +solders-account = { workspace = true } +solders-account-decoder = { workspace = true } +solders-hash = { workspace = true } +solders-macros = { workspace = true } +solders-pubkey = { workspace = true } solders-rpc-response-data-boilerplate = { workspace = true } solders-rpc-version = { workspace = true } -solders-pubkey = { workspace = true } -camelpaste = { workspace = true } +solders-traits-core = { workspace = true } +solders-transaction-error = { workspace = true } diff --git a/crates/rpc-responses-tx-status/Cargo.toml b/crates/rpc-responses-tx-status/Cargo.toml index 12c0590c..d0384ce7 100644 --- a/crates/rpc-responses-tx-status/Cargo.toml +++ b/crates/rpc-responses-tx-status/Cargo.toml @@ -9,13 +9,13 @@ repository = { workspace = true } description = "Solders RPC responses-tx-status crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } -solders-macros = { workspace = true } -solders-traits-core = { workspace = true } -solders-transaction-error = { workspace = true } solana-rpc-client-api = { workspace = true } -solders-transaction-confirmation-status = { workspace = true } +solders-macros = { workspace = true } solders-rpc-response-data-boilerplate = { workspace = true } solders-signature = { workspace = true } +solders-traits-core = { workspace = true } +solders-transaction-confirmation-status = { workspace = true } +solders-transaction-error = { workspace = true } diff --git a/crates/rpc-responses/Cargo.toml b/crates/rpc-responses/Cargo.toml index c1eb74c0..0c37482b 100644 --- a/crates/rpc-responses/Cargo.toml +++ b/crates/rpc-responses/Cargo.toml @@ -9,33 +9,33 @@ repository = { workspace = true } description = "Solders RPC responses crate." [dependencies] +camelpaste = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -serde_with = { workspace = true } serde_json = { workspace = true } -derive_more = { workspace = true } -solders-macros = { workspace = true } -solders-hash = { workspace = true } -solders-primitives = { workspace = true } -solders-traits-core = { workspace = true } -solders-traits = { workspace = true } +serde_with = { workspace = true } +solana-account-decoder-client-types = { workspace = true } +solana-rpc-client-api = { workspace = true } +solana-transaction-status-client-types = { workspace = true } solders-account = { workspace = true } solders-account-decoder = { workspace = true } solders-epoch-info = { workspace = true } -solders-transaction-error = { workspace = true } -solders-transaction-status = { workspace = true } -solana-transaction-status-client-types = { workspace = true } -solders-transaction-status-struct = { workspace = true } -solana-rpc-client-api = { workspace = true } -solders-rpc-responses-common = { workspace = true } -solders-rpc-responses-tx-status = { workspace = true } -solders-rpc-response-data-boilerplate = { workspace = true } +solders-hash = { workspace = true } +solders-macros = { workspace = true } +solders-primitives = { workspace = true } +solders-pubkey = { workspace = true } solders-rpc-common = { workspace = true } solders-rpc-errors-no-tx-status = { workspace = true } solders-rpc-errors-tx-status = { workspace = true } +solders-rpc-response-data-boilerplate = { workspace = true } +solders-rpc-responses-common = { workspace = true } +solders-rpc-responses-tx-status = { workspace = true } solders-rpc-version = { workspace = true } -solders-pubkey = { workspace = true } solders-signature = { workspace = true } -solana-account-decoder-client-types = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } +solders-transaction-error = { workspace = true } +solders-transaction-status = { workspace = true } +solders-transaction-status-struct = { workspace = true } thiserror = { workspace = true } -camelpaste = { workspace = true } diff --git a/crates/rpc-send-transaction-config/Cargo.toml b/crates/rpc-send-transaction-config/Cargo.toml index 50145c84..f08da6d7 100644 --- a/crates/rpc-send-transaction-config/Cargo.toml +++ b/crates/rpc-send-transaction-config/Cargo.toml @@ -11,11 +11,11 @@ description = "Solders RPC send transaction config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } solana-commitment-config = { workspace = true } solana-rpc-client-api = { workspace = true } -solders-rpc-config-macros = { workspace = true } +solana-transaction-status-client-types = { workspace = true } solders-commitment-config = { workspace = true } +solders-macros = { workspace = true } +solders-rpc-config-macros = { workspace = true } solders-traits-core = { workspace = true } -solana-transaction-status-client-types = { workspace = true } solders-transaction-status-enums = { workspace = true } diff --git a/crates/rpc-sig-status-config/Cargo.toml b/crates/rpc-sig-status-config/Cargo.toml index fc619f2e..0590c226 100644 --- a/crates/rpc-sig-status-config/Cargo.toml +++ b/crates/rpc-sig-status-config/Cargo.toml @@ -11,7 +11,7 @@ description = "Solders RPC signature status config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } solana-rpc-client-api = { workspace = true } +solders-macros = { workspace = true } solders-rpc-config-macros = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/rpc-sigs-for-address-config/Cargo.toml b/crates/rpc-sigs-for-address-config/Cargo.toml index fb5eef9a..5f53e5b1 100644 --- a/crates/rpc-sigs-for-address-config/Cargo.toml +++ b/crates/rpc-sigs-for-address-config/Cargo.toml @@ -11,9 +11,9 @@ description = "Solders RPC signature for address config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } solana-rpc-client-api = { workspace = true } -solders-rpc-config-macros = { workspace = true } solders-commitment-config = { workspace = true } +solders-macros = { workspace = true } +solders-rpc-config-macros = { workspace = true } solders-signature = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/rpc-sim-transaction-config/Cargo.toml b/crates/rpc-sim-transaction-config/Cargo.toml index ed336999..3a3b3a65 100644 --- a/crates/rpc-sim-transaction-config/Cargo.toml +++ b/crates/rpc-sim-transaction-config/Cargo.toml @@ -11,11 +11,11 @@ description = "Solders RPC simulate transaction config crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } solana-rpc-client-api = { workspace = true } +solana-transaction-status-client-types = { workspace = true } +solders-commitment-config = { workspace = true } +solders-macros = { workspace = true } solders-rpc-config-macros = { workspace = true } solders-rpc-simulate-tx-accounts-config = { workspace = true } -solders-commitment-config = { workspace = true } solders-traits-core = { workspace = true } -solana-transaction-status-client-types = { workspace = true } solders-transaction-status-enums = { workspace = true } diff --git a/crates/rpc-simulate-tx-accounts-config/Cargo.toml b/crates/rpc-simulate-tx-accounts-config/Cargo.toml index a0510018..27701638 100644 --- a/crates/rpc-simulate-tx-accounts-config/Cargo.toml +++ b/crates/rpc-simulate-tx-accounts-config/Cargo.toml @@ -11,9 +11,9 @@ description = "Solders RPC simulate transaction accounts crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } +solana-rpc-client-api = { workspace = true } solders-account-decoder = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } -solana-rpc-client-api = { workspace = true } solders-rpc-config-macros = { workspace = true } solders-traits-core = { workspace = true } diff --git a/crates/signature/Cargo.toml b/crates/signature/Cargo.toml index 6daf3e7e..73b31d82 100644 --- a/crates/signature/Cargo.toml +++ b/crates/signature/Cargo.toml @@ -9,10 +9,10 @@ repository = { workspace = true } description = "Solders signature crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits-core = { workspace = true } +serde = { workspace = true } +solana-signature = { workspace = true, features = ["rand"] } solders-macros = { workspace = true } solders-pubkey = { workspace = true } -solana-signature = { workspace = true, features = ["rand"] } -serde = { workspace = true } -derive_more = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/system-program/Cargo.toml b/crates/system-program/Cargo.toml index b709627e..645ea4f6 100644 --- a/crates/system-program/Cargo.toml +++ b/crates/system-program/Cargo.toml @@ -9,18 +9,18 @@ repository = { workspace = true } description = "Solders system program crate." [dependencies] -pyo3 = { workspace = true, features = ["macros"] } +bincode = { workspace = true } +derive_more = { workspace = true } dict_derive = "0.6.0" +pyo3 = { workspace = true, features = ["macros"] } +serde = { workspace = true } +solana-address-lookup-table-interface = { workspace = true } solana-instruction = { workspace = true } solana-pubkey = { workspace = true } solana-sdk-ids = { workspace = true } solana-system-interface = { workspace = true } -solders-traits-core = { workspace = true } -solders-traits = { workspace = true } solders-instruction = { workspace = true } -solders-pubkey = { workspace = true } solders-macros = { workspace = true } -solana-address-lookup-table-interface = { workspace = true } -serde = { workspace = true } -derive_more = { workspace = true } -bincode = { workspace = true } +solders-pubkey = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } diff --git a/crates/token/Cargo.toml b/crates/token/Cargo.toml index c6199088..a6fa3307 100644 --- a/crates/token/Cargo.toml +++ b/crates/token/Cargo.toml @@ -9,9 +9,9 @@ repository = { workspace = true } description = "Solders SPL Token crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } solana-program-option = { workspace = true } solana-program-pack = { workspace = true } solders-macros = { workspace = true } diff --git a/crates/traits-core/Cargo.toml b/crates/traits-core/Cargo.toml index bc1069d4..d5c0b3d0 100644 --- a/crates/traits-core/Cargo.toml +++ b/crates/traits-core/Cargo.toml @@ -9,8 +9,8 @@ license = { workspace = true } repository = { workspace = true } [dependencies] -pyo3 = { workspace = true } bincode = { workspace = true } +pyo3 = { workspace = true } serde = { workspace = true } -serde_json = { workspace = true } serde_cbor = { workspace = true } +serde_json = { workspace = true } diff --git a/crates/traits/Cargo.toml b/crates/traits/Cargo.toml index fe027e6b..0621e094 100644 --- a/crates/traits/Cargo.toml +++ b/crates/traits/Cargo.toml @@ -9,7 +9,12 @@ license = { workspace = true } repository = { workspace = true } [dependencies] +bincode = { workspace = true } +litesvm = { workspace = true, optional = true } pyo3 = { workspace = true } +serde_cbor = { workspace = true } +serde_json = { workspace = true } +solana-banks-client = { workspace = true, optional = true } solana-commitment-config = { workspace = true } solana-hash = { workspace = true } solana-pubkey = { workspace = true } @@ -17,12 +22,7 @@ solana-sanitize = { workspace = true } solana-signature = { workspace = true } solana-signer = { workspace = true } solana-transaction-error = { workspace = true } -bincode = { workspace = true } -litesvm = { workspace = true, optional = true } -serde_json = { workspace = true } -serde_cbor = { workspace = true } solders-traits-core = { workspace = true } -solana-banks-client = { workspace = true, optional = true } [features] banks-client = ["dep:solana-banks-client"] diff --git a/crates/transaction-confirmation-status/Cargo.toml b/crates/transaction-confirmation-status/Cargo.toml index f6bc5945..9a742a26 100644 --- a/crates/transaction-confirmation-status/Cargo.toml +++ b/crates/transaction-confirmation-status/Cargo.toml @@ -11,5 +11,5 @@ description = "Solders transaction confirmation status crate." [dependencies] pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solders-macros = { workspace = true } solana-transaction-status-client-types = { workspace = true } +solders-macros = { workspace = true } diff --git a/crates/transaction-error/Cargo.toml b/crates/transaction-error/Cargo.toml index 8adf5cb1..fe025f64 100644 --- a/crates/transaction-error/Cargo.toml +++ b/crates/transaction-error/Cargo.toml @@ -9,10 +9,10 @@ repository = { workspace = true } description = "Solders transaction error crate." [dependencies] +derive_more = { workspace = true } +pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } solana-instruction = { workspace = true } solana-transaction-error = { workspace = true } -solders-traits-core = { workspace = true } solders-macros = { workspace = true } -derive_more = { workspace = true } -pyo3 = { workspace = true, features = ["macros"] } +solders-traits-core = { workspace = true } diff --git a/crates/transaction-return-data/Cargo.toml b/crates/transaction-return-data/Cargo.toml index 2d8baa23..6a9ad7f1 100644 --- a/crates/transaction-return-data/Cargo.toml +++ b/crates/transaction-return-data/Cargo.toml @@ -9,12 +9,12 @@ repository = { workspace = true } description = "Solders transaction return data crate." [dependencies] +base64 = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solana-transaction-context = { workspace = true } serde = { workspace = true } -derive_more = { workspace = true } -solders-pubkey = { workspace = true } +solana-transaction-context = { workspace = true } +solana-transaction-status-client-types = { workspace = true } solders-macros = { workspace = true } -base64 = { workspace = true } +solders-pubkey = { workspace = true } solders-traits-core = { workspace = true } -solana-transaction-status-client-types = { workspace = true } diff --git a/crates/transaction-status-enums/Cargo.toml b/crates/transaction-status-enums/Cargo.toml index be93afbc..0c649b3d 100644 --- a/crates/transaction-status-enums/Cargo.toml +++ b/crates/transaction-status-enums/Cargo.toml @@ -9,7 +9,7 @@ repository = { workspace = true } description = "Solders transaction status enums crate." [dependencies] -serde = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } +serde = { workspace = true } solana-transaction-status-client-types = { workspace = true } solders-macros = { workspace = true } diff --git a/crates/transaction-status-struct/Cargo.toml b/crates/transaction-status-struct/Cargo.toml index 2d8156d5..28bd6467 100644 --- a/crates/transaction-status-struct/Cargo.toml +++ b/crates/transaction-status-struct/Cargo.toml @@ -9,12 +9,12 @@ repository = { workspace = true } description = "Solders TransactionStatus struct crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -derive_more = { workspace = true } +solana-transaction-status-client-types = { workspace = true } +solders-commitment-config = { workspace = true } solders-macros = { workspace = true } solders-traits-core = { workspace = true } -solana-transaction-status-client-types = { workspace = true } -solders-transaction-error = { workspace = true } solders-transaction-confirmation-status = { workspace = true } -solders-commitment-config = { workspace = true } +solders-transaction-error = { workspace = true } diff --git a/crates/transaction-status/Cargo.toml b/crates/transaction-status/Cargo.toml index 4b766dc6..1f4e521e 100644 --- a/crates/transaction-status/Cargo.toml +++ b/crates/transaction-status/Cargo.toml @@ -9,27 +9,27 @@ repository = { workspace = true } description = "Solders transaction status crate." [dependencies] +base64 = { workspace = true } +bincode = { workspace = true } +bs58 = { workspace = true } +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solana-reward-info = { workspace = true } +pythonize = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } -derive_more = { workspace = true } -pythonize = { workspace = true } -solders-pubkey = { workspace = true } -solders-signature = { workspace = true } -solders-macros = { workspace = true } -base64 = { workspace = true } -bs58 = { workspace = true } -solders-traits-core = { workspace = true } solana-account-decoder-client-types = { workspace = true } +solana-reward-info = { workspace = true } +solana-transaction-status-client-types = { workspace = true } solders-account-decoder = { workspace = true } solders-hash = { workspace = true } +solders-macros = { workspace = true } solders-message = { workspace = true } +solders-pubkey = { workspace = true } +solders-signature = { workspace = true } +solders-traits-core = { workspace = true } solders-transaction = { workspace = true } -solana-transaction-status-client-types = { workspace = true } -solders-transaction-error = { workspace = true } solders-transaction-confirmation-status = { workspace = true } +solders-transaction-error = { workspace = true } solders-transaction-return-data = { workspace = true } solders-transaction-status-enums = { workspace = true } solders-transaction-status-struct = { workspace = true } -bincode = { workspace = true } diff --git a/crates/transaction/Cargo.toml b/crates/transaction/Cargo.toml index 7419ca23..bae80345 100644 --- a/crates/transaction/Cargo.toml +++ b/crates/transaction/Cargo.toml @@ -9,20 +9,20 @@ repository = { workspace = true } description = "Solders transaction crate." [dependencies] +derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } -solders-traits = { workspace = true } -solders-traits-core = { workspace = true } -solders-macros = { workspace = true } +serde = { workspace = true } solana-message = { workspace = true } solana-pubkey = { workspace = true } solana-sanitize = { workspace = true } solana-signature = { workspace = true } solana-transaction = { workspace = true, features = ["bincode", "verify"] } -serde = { workspace = true } -derive_more = { workspace = true } +solders-hash = { workspace = true } +solders-instruction = { workspace = true } +solders-keypair = { workspace = true } +solders-macros = { workspace = true } solders-message = { workspace = true } solders-pubkey = { workspace = true } -solders-keypair = { workspace = true } solders-signature = { workspace = true } -solders-hash = { workspace = true } -solders-instruction = { workspace = true } +solders-traits = { workspace = true } +solders-traits-core = { workspace = true } From 155634ea107744c30455ec4324aacc47bd1b1ae7 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:05:01 +0000 Subject: [PATCH 06/13] lint --- crates/rpc-responses/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rpc-responses/src/lib.rs b/crates/rpc-responses/src/lib.rs index 3e5a669f..d57b6e6f 100644 --- a/crates/rpc-responses/src/lib.rs +++ b/crates/rpc-responses/src/lib.rs @@ -597,7 +597,7 @@ where fn into_pyobject( self, py: Python<'py>, - ) -> Result as IntoPyObject>::Error> { + ) -> Result as IntoPyObject<'py>>::Error> { Ok(match self { Self::Error { error: e, .. } => e.into_bound_py_any(py).unwrap(), Self::Result { result: r, .. } => r.into_bound_py_any(py).unwrap(), From b78506a7fdfe2815da85d0ec8d774731d2ac8848 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:07:58 +0000 Subject: [PATCH 07/13] ensure openssl-vendored feature is activated --- Cargo.lock | 11 +++++++++++ Cargo.toml | 1 + crates/litesvm/Cargo.toml | 2 ++ 3 files changed, 14 insertions(+) diff --git a/Cargo.lock b/Cargo.lock index a4252f06..c489e2dc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1889,6 +1889,15 @@ dependencies = [ "syn 2.0.87", ] +[[package]] +name = "openssl-src" +version = "300.4.2+3.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "168ce4e058f975fe43e89d9ccf78ca668601887ae736090aacc23ae353c298e2" +dependencies = [ + "cc", +] + [[package]] name = "openssl-sys" version = "0.9.104" @@ -1897,6 +1906,7 @@ checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" dependencies = [ "cc", "libc", + "openssl-src", "pkg-config", "vcpkg", ] @@ -4812,6 +4822,7 @@ dependencies = [ "solana-hash", "solana-last-restart-slot", "solana-message", + "solana-precompiles", "solana-rent", "solana-slot-hashes", "solana-slot-history", diff --git a/Cargo.toml b/Cargo.toml index 0e2847b5..28fcfa9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -101,6 +101,7 @@ solana-instruction = "2.2.1" solana-keypair = "2.2.1" solana-last-restart-slot = "2.2.1" solana-message = "2.2.1" +solana-precompiles = "2.2.1" solana-presigner = "2.2.1" solana-program-option = "2.2.1" solana-program-pack = "2.2.1" diff --git a/crates/litesvm/Cargo.toml b/crates/litesvm/Cargo.toml index ee412de0..6cd7e55c 100644 --- a/crates/litesvm/Cargo.toml +++ b/crates/litesvm/Cargo.toml @@ -20,6 +20,8 @@ solana-feature-set = { workspace = true } solana-hash = { workspace = true } solana-last-restart-slot = { workspace = true } solana-message = { workspace = true } +# add the precopmiles crate to ensure openssl-vendored is activated +solana-precompiles = { workspace = true, features = ["openssl-vendored"] } solana-rent = { workspace = true } solana-slot-hashes = { workspace = true } solana-slot-history = { workspace = true } From 55e2744685459e0390c64494f5339cb84c5db802 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:12:00 +0000 Subject: [PATCH 08/13] update changelog --- CHANGELOG.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b8425c1..3c2c1957 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,13 @@ # Changelog -# [0.25.0] -2025-01-27 +# Unreleased + +### Changed + +- Upgrade to Solana 2.2 crates [(#137)](https://github.com/kevinheavey/solders/pull/137) +- Remove `from_json` methods in `solders.rpc.requests` [(#137)](https://github.com/kevinheavey/solders/pull/137) + +# [0.25.0] - 2025-01-27 ### Changed From ff029cc3d6159b94fcfaa4d549fcaeac02e361e6 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:16:31 +0000 Subject: [PATCH 09/13] replace deprecated action --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f22e2afa..a2be0149 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall pytest - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -96,7 +96,7 @@ jobs: python -m pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall python -m pytest --ignore=tests/litesvm - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -138,7 +138,7 @@ jobs: pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall pytest - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -176,7 +176,7 @@ jobs: fi fi - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -213,7 +213,7 @@ jobs: pip3 install ${{ env.name }} --find-links /io/dist/ --force-reinstall --no-index --no-dependencies --break-system-packages python3 -m pytest --ignore=tests/litesvm - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -242,7 +242,7 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -268,7 +268,7 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -294,7 +294,7 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist @@ -313,7 +313,7 @@ jobs: args: --out dist maturin-version: ${{ env.maturin_version }} - name: Upload sdist - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: wheels path: dist From 97369dbee5b9054f5e8e41f33c70e7de1fe8ace2 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:23:00 +0000 Subject: [PATCH 10/13] unused import --- python/solders/rpc/requests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/solders/rpc/requests.py b/python/solders/rpc/requests.py index 06bf3716..fce9068f 100644 --- a/python/solders/rpc/requests.py +++ b/python/solders/rpc/requests.py @@ -1,4 +1,4 @@ -from typing import List, Sequence, Union +from typing import Sequence, Union from ..solders import ( AccountSubscribe, From 6b931eb2e355cf7615f416699533030727daa434 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:23:14 +0000 Subject: [PATCH 11/13] missing feature activations --- crates/commitment-config/Cargo.toml | 2 +- crates/transaction-return-data/Cargo.toml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/commitment-config/Cargo.toml b/crates/commitment-config/Cargo.toml index 7c051fbb..60a5e3f0 100644 --- a/crates/commitment-config/Cargo.toml +++ b/crates/commitment-config/Cargo.toml @@ -12,5 +12,5 @@ description = "Solders commitment config crate." derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solana-commitment-config = { workspace = true } +solana-commitment-config = { workspace = true, features = ["serde"] } solders-traits = { workspace = true } diff --git a/crates/transaction-return-data/Cargo.toml b/crates/transaction-return-data/Cargo.toml index 6a9ad7f1..feb58900 100644 --- a/crates/transaction-return-data/Cargo.toml +++ b/crates/transaction-return-data/Cargo.toml @@ -13,7 +13,7 @@ base64 = { workspace = true } derive_more = { workspace = true } pyo3 = { workspace = true, features = ["macros"] } serde = { workspace = true } -solana-transaction-context = { workspace = true } +solana-transaction-context = { workspace = true, features = ["serde"] } solana-transaction-status-client-types = { workspace = true } solders-macros = { workspace = true } solders-pubkey = { workspace = true } From 6c77a7f24318fd1f74ceec39c36ff7d8d52e4cf6 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 12:39:14 +0000 Subject: [PATCH 12/13] try upload-artifact v2 --- .github/workflows/build.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a2be0149..f9d9ce56 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,7 +65,7 @@ jobs: pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall pytest - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -96,7 +96,7 @@ jobs: python -m pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall python -m pytest --ignore=tests/litesvm - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -138,7 +138,7 @@ jobs: pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall pytest - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -176,7 +176,7 @@ jobs: fi fi - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -213,7 +213,7 @@ jobs: pip3 install ${{ env.name }} --find-links /io/dist/ --force-reinstall --no-index --no-dependencies --break-system-packages python3 -m pytest --ignore=tests/litesvm - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -242,7 +242,7 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -268,7 +268,7 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -294,7 +294,7 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist @@ -313,7 +313,7 @@ jobs: args: --out dist maturin-version: ${{ env.maturin_version }} - name: Upload sdist - uses: actions/upload-artifact@v4 + uses: actions/upload-artifact@v2 with: name: wheels path: dist From 8899e43fe5fe9321fb16a0ae62b2ea72e99c3ed0 Mon Sep 17 00:00:00 2001 From: Kevin Heavey Date: Tue, 18 Feb 2025 13:01:58 +0000 Subject: [PATCH 13/13] give up and use v4 --- .github/workflows/build.yml | 36 +++++++++++++++++------------------ .github/workflows/release.yml | 5 +++-- 2 files changed, 21 insertions(+), 20 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f9d9ce56..ef550b2e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,9 +65,9 @@ jobs: pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall pytest - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-macos_universal2 path: dist windows: @@ -96,9 +96,9 @@ jobs: python -m pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall python -m pytest --ignore=tests/litesvm - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-windows path: dist linux-x86_64: @@ -138,9 +138,9 @@ jobs: pip install ${{ env.name }} --no-index --no-dependencies --find-links dist --force-reinstall pytest - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-linux-matrix-${{ matrix.target }} path: dist linux-i686: @@ -176,9 +176,9 @@ jobs: fi fi - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-linux-i686 path: dist musllinux-x86_64: @@ -213,9 +213,9 @@ jobs: pip3 install ${{ env.name }} --find-links /io/dist/ --force-reinstall --no-index --no-dependencies --break-system-packages python3 -m pytest --ignore=tests/litesvm - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-musllinux-x86_64 path: dist musllinux-i686: @@ -242,9 +242,9 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-musllinux-i686 path: dist linux-aarch64: @@ -268,9 +268,9 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-linux-aarch64 path: dist linux-armv7: @@ -294,9 +294,9 @@ jobs: args: --release --no-default-features -F ring --out dist maturin-version: ${{ env.maturin_version }} - name: Upload wheels - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-linux-armv7 path: dist sdist: @@ -313,7 +313,7 @@ jobs: args: --out dist maturin-version: ${{ env.maturin_version }} - name: Upload sdist - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: - name: wheels + name: wheels-sdist path: dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bc2a0ebb..e6278233 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -7,10 +7,11 @@ jobs: release_pypi: runs-on: ubuntu-latest steps: - - uses: dawidd6/action-download-artifact@v2 + - uses: dawidd6/action-download-artifact@v4 with: workflow: build.yml - name: wheels + name: wheels-* + merge-multiple: true - name: Publish to PyPi env: MATURIN_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}