diff --git a/.gitignore b/.gitignore index 70487d2..4b79068 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ node_modules test-ledger dist +.idea diff --git a/Cargo.lock b/Cargo.lock index f14d95c..98b5449 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,21 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "addr2line" +version = "0.24.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" +dependencies = [ + "gimli", +] + +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.5.2" @@ -50,6 +65,30 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" + +[[package]] +name = "alloc-stdlib" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" +dependencies = [ + "alloc-no-stdlib", +] + [[package]] name = "ark-bn254" version = "0.4.0" @@ -91,7 +130,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools 0.10.5", - "num-bigint", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -114,7 +153,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -143,7 +182,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint", + "num-bigint 0.4.6", ] [[package]] @@ -179,18 +218,70 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "async-compression" +version = "0.4.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df895a515f70646414f4b45c0b79082783b80552b373a68283012928df56f522" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "atty" +version = "0.2.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" +dependencies = [ + "hermit-abi", + "libc", + "winapi", +] + [[package]] name = "autocfg" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +[[package]] +name = "backtrace" +version = "0.3.74" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +dependencies = [ + "addr2line", + "cfg-if", + "libc", + "miniz_oxide", + "object", + "rustc-demangle", + "windows-targets 0.52.6", +] + [[package]] name = "base64" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" +[[package]] +name = "base64" +version = "0.21.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" + [[package]] name = "base64" version = "0.22.1" @@ -206,6 +297,12 @@ dependencies = [ "serde", ] +[[package]] +name = "bitflags" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + [[package]] name = "bitflags" version = "2.8.0" @@ -290,7 +387,7 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -315,6 +412,27 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "brotli" +version = "7.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc97b8f16f944bba54f0433f07e30be199b6dc2bd25937444bbad560bcea29bd" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", + "brotli-decompressor", +] + +[[package]] +name = "brotli-decompressor" +version = "4.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74fa05ad7d803d413eb8380983b092cbbaf9a85f151b871360e7b00cd7060b37" +dependencies = [ + "alloc-no-stdlib", + "alloc-stdlib", +] + [[package]] name = "bs58" version = "0.5.1" @@ -326,9 +444,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.16.0" +version = "3.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" +checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" [[package]] name = "bv" @@ -357,7 +475,7 @@ checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -366,11 +484,17 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "325918d6fe32f23b19878fe4b34794ae41fc19ddbe53b10571a4874d44ffd39b" + [[package]] name = "cc" -version = "1.2.10" +version = "1.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13208fcbb66eaeffe09b99fffbe1af420f00a7b35aa99ad683dfc1aa76145229" +checksum = "e4730490333d58093109dc02c23174c3f4d490998c3fed3cc8e82d57afedb9cf" dependencies = [ "shlex", ] @@ -395,7 +519,7 @@ checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -417,6 +541,19 @@ dependencies = [ "inout", ] +[[package]] +name = "combine" +version = "3.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da3da6baa321ec19e1cc41d31bf599f00c783d0517095cdaf0332e3fe8d20680" +dependencies = [ + "ascii", + "byteorder", + "either", + "memchr", + "unreachable", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -443,15 +580,55 @@ version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "core-foundation-sys" +version = "0.8.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" + [[package]] name = "cpufeatures" -version = "0.2.16" +version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b80225097f2e5ae4e7179dd2266824648f3e2f49d9134d584b76389d31c4c3" +checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "crossbeam-channel" +version = "0.5.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06ba6d68e24814cb8de6bb986db8222d3a027d15872cabc0d18817bc3c0e4471" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" + [[package]] name = "crunchy" version = "0.2.3" @@ -527,7 +704,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -551,7 +728,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -562,7 +739,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -602,6 +779,23 @@ dependencies = [ "subtle", ] +[[package]] +name = "displaydoc" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "eager" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abe71d579d1812060163dff96056261deb5bf6729b100fa2e36a68b9649ba3d3" + [[package]] name = "ed25519" version = "1.5.3" @@ -643,6 +837,48 @@ version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" +[[package]] +name = "encoding_rs" +version = "0.8.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75030f3c4f45dafd7586dd6780965a8c7e8e285a5ecb86713e63a79c5b2766f3" +dependencies = [ + "cfg-if", +] + +[[package]] +name = "enum-iterator" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd242f399be1da0a5354aa462d57b4ab2b4ee0683cc552f7c007d2d12d36e94" +dependencies = [ + "enum-iterator-derive", +] + +[[package]] +name = "enum-iterator-derive" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[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" @@ -676,6 +912,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94474d15a76982be62ca8a39570dccce148d98c238ebb7408b0a21b2c4bdddc4" +[[package]] +name = "flate2" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c936bfdafb507ebbf50b8074c54fa31c5be9a1e7e5f467dd659697041407d07c" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "fnv" version = "1.0.7" @@ -697,6 +943,63 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" +[[package]] +name = "form_urlencoded" +version = "1.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "futures-channel" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", +] + +[[package]] +name = "futures-core" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" + +[[package]] +name = "futures-io" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" + +[[package]] +name = "futures-sink" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" + +[[package]] +name = "futures-task" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" + +[[package]] +name = "futures-util" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-core", + "futures-io", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + [[package]] name = "generic-array" version = "0.14.7" @@ -708,6 +1011,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -734,6 +1047,40 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "gimli" +version = "0.31.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" + +[[package]] +name = "h2" +version = "0.3.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap", + "slab", + "tokio", + "tokio-util", + "tracing", +] + +[[package]] +name = "hash32" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] + [[package]] name = "hashbrown" version = "0.13.2" @@ -749,6 +1096,15 @@ version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +[[package]] +name = "hermit-abi" +version = "0.1.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +dependencies = [ + "libc", +] + [[package]] name = "hmac" version = "0.8.1" @@ -780,81 +1136,304 @@ dependencies = [ ] [[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "indexmap" -version = "2.7.1" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "equivalent", - "hashbrown 0.15.2", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "inout" -version = "0.1.3" +name = "http-body" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "generic-array", + "bytes", + "http", + "pin-project-lite", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "httparse" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] +checksum = "f2d708df4e7140240a16cd6ab0ab65c972d7433ab77819ea693fde9c43811e2a" [[package]] -name = "itertools" -version = "0.12.1" +name = "httpdate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "itoa" -version = "1.0.14" +name = "humantime" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] -name = "js-sys" -version = "0.3.77" +name = "hyper" +version = "0.14.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ - "once_cell", - "wasm-bindgen", + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", ] [[package]] -name = "keccak" -version = "0.1.5" +name = "hyper-rustls" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "cpufeatures", + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", ] [[package]] -name = "lazy_static" +name = "icu_collections" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "libc" +name = "icu_locid" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] + +[[package]] +name = "icu_locid_transform" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_locid_transform_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdc8ff3388f852bede6b579ad4e978ab004f139284d7b28715f773507b946f6e" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", + "smallvec", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", +] + +[[package]] +name = "icu_normalizer_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8cafbf7aa791e9b22bec55a167906f9e1215fd475cd22adfcf660e03e989516" + +[[package]] +name = "icu_properties" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" +dependencies = [ + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", +] + +[[package]] +name = "icu_properties_data" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67a8effbc3dd3e4ba1afa8ad918d5684b8868b3b26500753effea8d2eed19569" + +[[package]] +name = "icu_provider" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] + +[[package]] +name = "icu_provider_macros" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "ident_case" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" + +[[package]] +name = "idna" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" +dependencies = [ + "idna_adapter", + "smallvec", + "utf8_iter", +] + +[[package]] +name = "idna_adapter" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" +dependencies = [ + "icu_normalizer", + "icu_properties", +] + +[[package]] +name = "indexmap" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9c992b02b5b4c94ea26e32fe5bccb7aa7d9f390ab5c1221ff895bc7ea8b652" +dependencies = [ + "equivalent", + "hashbrown 0.15.2", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + +[[package]] +name = "ipnet" +version = "2.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" + +[[package]] +name = "itertools" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] + +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + +[[package]] +name = "itoa" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d75a2a4b1b190afb6f5425f10f6a8f959d2ea0b9c2b1d79553551850539e4674" + +[[package]] +name = "js-sys" +version = "0.3.77" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +dependencies = [ + "once_cell", + "wasm-bindgen", +] + +[[package]] +name = "keccak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" +dependencies = [ + "cpufeatures", +] + +[[package]] +name = "lazy_static" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" + +[[package]] +name = "libc" version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" @@ -907,6 +1486,24 @@ dependencies = [ "libsecp256k1-core", ] +[[package]] +name = "light-poseidon" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" +dependencies = [ + "ark-bn254", + "ark-ff", + "num-bigint 0.4.6", + "thiserror 1.0.69", +] + +[[package]] +name = "litemap" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ee93343901ab17bd981295f2cf0026d4ad018c7c31ba84549a4ddbb47a45104" + [[package]] name = "lock_api" version = "0.4.12" @@ -959,6 +1556,106 @@ dependencies = [ "zeroize", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "miniz_oxide" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8402cab7aefae129c6977bb0ff1b8fd9a04eb5b51efc50a70bea51cda0c7924" +dependencies = [ + "adler2", +] + +[[package]] +name = "mio" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +dependencies = [ + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", +] + +[[package]] +name = "mollusk-svm" +version = "0.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95e7c0b51a00d234774b61bf829aa75316eb3a5ebf30bd622010bd046daa287a" +dependencies = [ + "bincode", + "mollusk-svm-error", + "mollusk-svm-keys", + "solana-bpf-loader-program", + "solana-compute-budget", + "solana-log-collector", + "solana-logger", + "solana-program-runtime", + "solana-sdk", + "solana-system-program", + "solana-timings", +] + +[[package]] +name = "mollusk-svm-error" +version = "0.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92d7892725c98a376b55e03ccbea44a0d2111c8f7bab0432b42ea689f3f612e7" +dependencies = [ + "solana-sdk", + "thiserror 1.0.69", +] + +[[package]] +name = "mollusk-svm-keys" +version = "0.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd18816096707d148467889844ae57384ab4cbbe50ed24fd03139e6e34d61301" +dependencies = [ + "mollusk-svm-error", + "solana-sdk", +] + +[[package]] +name = "mollusk-svm-programs-token" +version = "0.0.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "acdaf9b1afcf8b45fbaa9d3e555ef7ef46b3594d3196ca484ca37fe85975ef45" +dependencies = [ + "mollusk-svm", + "solana-sdk", +] + +[[package]] +name = "num" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" +dependencies = [ + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + [[package]] name = "num-bigint" version = "0.4.6" @@ -969,6 +1666,16 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-complex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" +dependencies = [ + "autocfg", + "num-traits", +] + [[package]] name = "num-derive" version = "0.4.2" @@ -977,7 +1684,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -989,6 +1696,29 @@ dependencies = [ "num-traits", ] +[[package]] +name = "num-iter" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" +dependencies = [ + "autocfg", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-rational" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +dependencies = [ + "autocfg", + "num-bigint 0.2.6", + "num-integer", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -1016,7 +1746,16 @@ dependencies = [ "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", +] + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", ] [[package]] @@ -1033,11 +1772,11 @@ checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "openssl" -version = "0.10.68" +version = "0.10.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6174bc48f102d208783c2c84bf931bb75927a617866870de8a4ea85597f871f5" +checksum = "61cfb4e166a8bb8c9b55c500bc2308550148ece889be90f609377e58140f42c6" dependencies = [ - "bitflags", + "bitflags 2.8.0", "cfg-if", "foreign-types", "libc", @@ -1054,14 +1793,14 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "openssl-sys" -version = "0.9.104" +version = "0.9.105" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45abf306cbf99debc8195b66b7346498d7b10c210de50418b5ccd7ceba08c741" +checksum = "8b22d5b84be05a8d6947c7cb71f7c849aa0f112acd4bf51c2a7c1c988ac0a9dc" dependencies = [ "cc", "libc", @@ -1089,7 +1828,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -1113,6 +1852,27 @@ version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +[[package]] +name = "percentage" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2fd23b938276f14057220b707937bcb42fa76dda7560e57a2da30cb52d557937" +dependencies = [ + "num", +] + +[[package]] +name = "pin-project-lite" +version = "0.2.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" + [[package]] name = "pkg-config" version = "0.3.31" @@ -1210,68 +1970,192 @@ dependencies = [ ] [[package]] -name = "rand_chacha" -version = "0.2.2" +name = "rand_chacha" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" +dependencies = [ + "ppv-lite86", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.4", +] + +[[package]] +name = "rand_core" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +dependencies = [ + "getrandom 0.1.16", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom 0.2.15", +] + +[[package]] +name = "rand_hc" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +dependencies = [ + "rand_core 0.5.1", +] + +[[package]] +name = "redox_syscall" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +dependencies = [ + "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 = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "reqwest" +version = "0.11.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "async-compression", + "base64 0.21.7", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-rustls", + "ipnet", + "js-sys", + "log", + "mime", + "once_cell", + "percent-encoding", + "pin-project-lite", + "rustls", + "rustls-pemfile", + "serde", + "serde_json", + "serde_urlencoded", + "sync_wrapper", + "system-configuration", + "tokio", + "tokio-rustls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots", + "winreg", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "ring" +version = "0.17.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ - "getrandom 0.1.16", + "cc", + "cfg-if", + "getrandom 0.2.15", + "libc", + "spin", + "untrusted", + "windows-sys 0.52.0", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "rustc-demangle" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ - "getrandom 0.2.15", + "semver", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "rustls" +version = "0.21.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" dependencies = [ - "rand_core 0.5.1", + "log", + "ring", + "rustls-webpki", + "sct", ] [[package]] -name = "redox_syscall" -version = "0.5.8" +name = "rustls-pemfile" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03a862b389f93e68874fbf580b9de08dd02facb9a788ebadaf4a3fd33cf58834" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" dependencies = [ - "bitflags", + "base64 0.21.7", ] [[package]] -name = "rustc_version" -version = "0.4.1" +name = "rustls-webpki" +version = "0.101.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" dependencies = [ - "semver", + "ring", + "untrusted", ] [[package]] @@ -1282,9 +2166,9 @@ checksum = "f7c45b9784283f1b2e7fb61b42047c2fd678ef0960d4f6f1eba131594cc369d4" [[package]] name = "ryu" -version = "1.0.18" +version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" +checksum = "6ea1a2d0a644769cc99faa24c3ad26b379b786fe7c36fd3c546254801650e6dd" [[package]] name = "scopeguard" @@ -1292,6 +2176,22 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring", + "untrusted", +] + [[package]] name = "semver" version = "1.0.25" @@ -1324,14 +2224,14 @@ checksum = "5a9bf7cf98d04a2b28aead066b7496853d4779c9cc183c440dbac457641e19a0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "serde_json" -version = "1.0.137" +version = "1.0.138" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "930cfb6e6abf99298aaad7d29abbef7a9999a9a8806a40088f55f0dcec03146b" +checksum = "d434192e7da787e94a6ea7e9670b26a036d0ca41e0b7efb2676dd32bae872949" dependencies = [ "itoa", "memchr", @@ -1339,6 +2239,18 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_urlencoded" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" +dependencies = [ + "form_urlencoded", + "itoa", + "ryu", + "serde", +] + [[package]] name = "serde_with" version = "3.12.0" @@ -1359,7 +2271,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -1414,17 +2326,36 @@ version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +[[package]] +name = "slab" +version = "0.4.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" +dependencies = [ + "autocfg", +] + [[package]] name = "smallvec" version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" +[[package]] +name = "socket2" +version = "0.5.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c970269d99b64e60ec3bd6ad27270092a5394c4e309314b18ae3fe575695fbe8" +dependencies = [ + "libc", + "windows-sys 0.52.0", +] + [[package]] name = "solana-account" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8557558040a6bf34101ea0ded1647bafc21c2a9ea0913034fa6794a304ba6791" +checksum = "e2197f7b15bc6041fa833974025a6006a111977cd4fd35848b743757c1a409f5" dependencies = [ "bincode", "serde", @@ -1436,9 +2367,9 @@ dependencies = [ [[package]] name = "solana-account-info" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abeb32e8dbead1f920a919d8c781fe058cf657313aa237566fa812d2288f2aab" +checksum = "1a67b02d022266e0979a3033f58f83c6e4d45f7e7cc85e6beeaf90b32ef5ede8" dependencies = [ "bincode", "serde", @@ -1449,18 +2380,18 @@ dependencies = [ [[package]] name = "solana-atomic-u64" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ceb7242711300b8d67933a3cd1c9b2cd7c4e98de529356ecddf340c98c457d" +checksum = "2453e9e0f5e948d83d1ea5ceef6a0488b39cb57f21e19d73d5dc57f27464ec8d" dependencies = [ "parking_lot", ] [[package]] name = "solana-bincode" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e154567b6846f4721c713afdd14c56892800fb940793ef529a68d6db6cf1beef" +checksum = "b235339197024a4f5c80b2ab5961f616c3ee2aa4542af082a0cc9c84c82b3c09" dependencies = [ "bincode", "serde", @@ -1469,9 +2400,9 @@ dependencies = [ [[package]] name = "solana-bn254" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c42ad3282999ef7df859e7ed03a6e6a4187ff4931f9814ddcd0477dba2be15" +checksum = "6f1b3e79f6ad47ffeb75be02d69828c00926af536083dadc6db8282ef1f0774e" dependencies = [ "ark-bn254", "ark-ec", @@ -1484,19 +2415,46 @@ dependencies = [ [[package]] name = "solana-borsh" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b2428671e99134c97990d2b466c33779f785376b7934e6bddb635929c54208f" +checksum = "3950d83165c85ac9cb92be986a76c7a543c5c14c1e98982d6dfad3d98e6b2353" dependencies = [ "borsh 0.10.4", "borsh 1.5.5", ] +[[package]] +name = "solana-bpf-loader-program" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "107b32cf9b65a8f44000fb86a2232aaa5bb6f12d16bc5e77272d0c5168bc3857" +dependencies = [ + "bincode", + "byteorder", + "libsecp256k1", + "log", + "scopeguard", + "solana-bn254", + "solana-compute-budget", + "solana-curve25519", + "solana-feature-set", + "solana-log-collector", + "solana-measure", + "solana-poseidon", + "solana-program-memory", + "solana-program-runtime", + "solana-sdk", + "solana-timings", + "solana-type-overrides", + "solana_rbpf", + "thiserror 1.0.69", +] + [[package]] name = "solana-clock" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d639043cefcd061c31a342364adcb204406ebbd91ef86dfde88b74352b688cf" +checksum = "4bfdce9a9f46965ffb6e1e7cc0e52efeb834c89dc67d7399770a9d4447498fdb" dependencies = [ "serde", "serde_derive", @@ -1504,11 +2462,20 @@ dependencies = [ "solana-sysvar-id", ] +[[package]] +name = "solana-compute-budget" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6989b3fa34b7190243346bee5c4c208b7d24da189c6c3cbd329227d5ab0d6b8b" +dependencies = [ + "solana-sdk", +] + [[package]] name = "solana-cpi" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b87b387931f41422be3d82190e29c8414bbb4e8517dd94afb838012260d7a60" +checksum = "dd452db5b927c0abbbd47ccc9f233a480754ecc7d07a9c5826c4d1f09168b6e1" dependencies = [ "solana-account-info", "solana-define-syscall", @@ -1520,9 +2487,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71b91a6c7db7874ab0721ba2ad49c34614c6af5bfa1a02f18ee471d28416b1fc" +checksum = "af29b27893aa7bc5082f30ef653c9319b36ac2b2d0f5c44688a5e80c42fcd892" dependencies = [ "bytemuck", "bytemuck_derive", @@ -1533,24 +2500,24 @@ dependencies = [ [[package]] name = "solana-decode-error" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64b93163519c0b7419d3ac206207594d4b43e00267496996b898345ff3b31ed1" +checksum = "4a1d529c1056b4d461609224fa1bf2a6584eafddf435c6394697b0f5de8c812c" dependencies = [ "num-traits", ] [[package]] name = "solana-define-syscall" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d1b215d56d29f71782df6880d71b5a46cf9a4035046414488c7de6906899ba" +checksum = "3c012a5bdc1122a74880faf6684b32286a9fae0086ff0a3efb16d7f3681fca90" [[package]] name = "solana-derivation-path" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31edf5d285689b469471a1a0200f0c9196be7df155860bd83dfd735439172bd" +checksum = "0803b6ea9c3b9f3c3f540535d6a9d32e6fa6a2ae368a3a93eb4a61c3a216c65d" dependencies = [ "derivation-path", "qstring", @@ -1559,9 +2526,9 @@ dependencies = [ [[package]] name = "solana-epoch-schedule" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88aa6588f178c32258eb616ef1428f2c86beae370d6486843313f6320e055190" +checksum = "dc5bd1733a0099c803b5e63be64ef6be1041b52010481f12a7d81124615e030d" dependencies = [ "serde", "serde_derive", @@ -1571,9 +2538,9 @@ dependencies = [ [[package]] name = "solana-feature-set" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1736c5f6cb5d65e684a1daf425dd1479849e0793ffe877feedb602642ee5deb0" +checksum = "4d7034fc05eae9180a5ae63f87a2e9985f8e0ae3c1269973c523d1028a78ffe3" dependencies = [ "lazy_static", "solana-clock", @@ -1585,9 +2552,9 @@ dependencies = [ [[package]] name = "solana-fee-calculator" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2ef28a47c3fcfd4ef8b19468531e32a431f6589f359cdbb927fc5e7fb859413" +checksum = "6337eace41da19d476fe80c86a8a2f5cad76125c2aa672788ec7f2814a62478a" dependencies = [ "log", "serde", @@ -1596,9 +2563,9 @@ dependencies = [ [[package]] name = "solana-hash" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad865143587f6173d0bd15ec66b749fd2682c865467ffd2bb725705e33f0c8fa" +checksum = "36647a50db4d401721e55d6bc1d259a8cea7bc333ab41c6358d2f5b344a1ab4e" dependencies = [ "borsh 1.5.5", "bs58", @@ -1614,9 +2581,9 @@ dependencies = [ [[package]] name = "solana-inflation" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a205cb59db7fa1afc89ad5d960ac5afb997ba231cdc943451811746c84b7776d" +checksum = "4c2ea0e34ad32c6a1a026f284716c9c21cd1c3dc496a595640f76ef4bf364f1d" dependencies = [ "serde", "serde_derive", @@ -1624,9 +2591,9 @@ dependencies = [ [[package]] name = "solana-instruction" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af795f16bef3ae76e97978e35724ea88d2b9eba67a9e233adf48ccefeaa6e6b8" +checksum = "d7a99a1276782510f3f9d8dac058b9fccadfc62ff4fd5b7c6d462dbf46632181" dependencies = [ "bincode", "borsh 1.5.5", @@ -1642,9 +2609,9 @@ dependencies = [ [[package]] name = "solana-last-restart-slot" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88c8171167f1fd4ef1e5a083fd0e8f35ac60aacd1ffe163a1ef7053a28524be" +checksum = "55a1090667f03719f886b86f90a333b0741df8692fb7076529ae2ab066e2f4b4" dependencies = [ "serde", "serde_derive", @@ -1652,40 +2619,93 @@ dependencies = [ "solana-sysvar-id", ] +[[package]] +name = "solana-log-collector" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "606f71865c0889b7dbdccd2a75586ec028461d648901708f2bb5f5c6bee5693d" +dependencies = [ + "log", +] + +[[package]] +name = "solana-logger" +version = "2.1.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d0e607485a4b8b66f7d3592e4a79355073cb7e6a101c244e5fa0aa52bfdce506" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04cd58f210630986a5c3f0344da347bb75fc2a90f2fe287438a81cd2c6ffcc8b" + +[[package]] +name = "solana-metrics" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58eec7006fe02032aa28f0ff49f3b378d64f16597d725af2887febc0f4ba3e9c" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", + "thiserror 1.0.69", +] + [[package]] name = "solana-msg" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aefec09cb47fb67b8f8c448e03491d4148c1749f27dcb74d1cfae6337695f94" +checksum = "59b84934c69aa9799b661f87aa1c47f8d358c3912fe5843571a5d047a222a0e6" dependencies = [ "solana-define-syscall", ] [[package]] name = "solana-native-token" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81520eff9f776e62faa36a07250fcc467e54ca31ca9c87ab566a88b2f2691c05" +checksum = "1e628d59c4f2ca1e5765a99bf7a1f5fb87e6c834ad2992d84024141be32f21c8" [[package]] name = "solana-packet" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8c6e8a2cb0839ef49d8c6e34e89a5bc5ed97da855bf49528bae8c57eb39ed" +checksum = "cf27339d38ffc14b456e93f59a998cdd79079bec6776bef364a8aa1ee2ceed69" dependencies = [ "bincode", - "bitflags", + "bitflags 2.8.0", "cfg_eval", "serde", "serde_derive", "serde_with", ] +[[package]] +name = "solana-poseidon" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c61632e0273d31dc0b3237eb32f86201d89bfaff673eceeea3081e21bd027ff9" +dependencies = [ + "ark-bn254", + "light-poseidon", + "solana-define-syscall", + "thiserror 1.0.69", +] + [[package]] name = "solana-precompile-error" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83c01aefc15c451b4f573c1e4552f34ee8af53db285ee2f7ece17ef8b70d6c0a" +checksum = "c439844f1c18ec47ab13b5ed229cb0d9eacd75a7fafb8f150004b9a5ee11445e" dependencies = [ "num-traits", "solana-decode-error", @@ -1693,13 +2713,13 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d3a72c5eafd348bc5e5b731b40ad8dfde3023632e34e5ca9e52a655266ffae7" +checksum = "5b23f3bdb67fec4edc60ce12b5583c5425aab96dbb029636d400cd3f36242412" dependencies = [ "base64 0.22.1", "bincode", - "bitflags", + "bitflags 2.8.0", "blake3", "borsh 0.10.4", "borsh 1.5.5", @@ -1716,7 +2736,7 @@ dependencies = [ "lazy_static", "log", "memoffset", - "num-bigint", + "num-bigint 0.4.6", "num-derive", "num-traits", "parking_lot", @@ -1766,9 +2786,9 @@ dependencies = [ [[package]] name = "solana-program-entrypoint" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "269ccabf1f3aff504a97aca0f8b72e6d3e1b7fb621cc18a2d21a28b17d52e112" +checksum = "bc27bbb6ff7f346b93173cacd14a44873e24a1702a07ebbe4a9295bf53eed3cb" dependencies = [ "solana-account-info", "solana-msg", @@ -1778,9 +2798,9 @@ dependencies = [ [[package]] name = "solana-program-error" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f7a81eeb5c3d44b2953c46215af390ca2951a0b8069836ffbf3d368b012b35" +checksum = "f5f48931e21e648410a17a1a42b3ace669e1b6c55516357f40ac6b91d4f81ef1" dependencies = [ "borsh 1.5.5", "num-traits", @@ -1794,9 +2814,9 @@ dependencies = [ [[package]] name = "solana-program-memory" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1debcdd14cee4dbc2761c1e267e8888188fb469956df0e2144cd6e2962c2532a" +checksum = "783ed2a707f3e875480ab0beda89951e8807cb0f76e30c19f82dd305b9169ab3" dependencies = [ "num-traits", "solana-define-syscall", @@ -1804,24 +2824,54 @@ dependencies = [ [[package]] name = "solana-program-option" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78b49ce216cce72eb0607610d2040b1979d999fe204f73ae2a669c2f4480d3c0" +checksum = "af0be45a0148239936e931a0ae95052a66e0b8f257205c9304af39bf2211a8de" [[package]] name = "solana-program-pack" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ff47a5dd9881187e85a45641405d9d1c57e9ebdc813e2ff74a1aa1f1ec9042" +checksum = "02d992004feb5e4b8bec891470f38b029fa8a304ce762ca835ffcc67cc6bf385" dependencies = [ "solana-program-error", ] +[[package]] +name = "solana-program-runtime" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09ed4dedcffb93dcf823dd0db043bb142ecc839d354c15347e75a370585b7c71" +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-compute-budget", + "solana-feature-set", + "solana-log-collector", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana-timings", + "solana-type-overrides", + "solana-vote", + "solana_rbpf", + "thiserror 1.0.69", +] + [[package]] name = "solana-pubkey" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02016ff5f98314c886e219c023bffba188ad8d70dec007247bd7a9da50423ac0" +checksum = "2d4cb0f3b71f466fe8e11bef05dc562060b5c8f526e969ecd150ce5bedc6e3eb" dependencies = [ "borsh 0.10.4", "borsh 1.5.5", @@ -1846,9 +2896,9 @@ dependencies = [ [[package]] name = "solana-rent" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "544fab48aacd3b9c740ef5206f30e8a44ef8bfe5676a9d7b1eed385265ec1265" +checksum = "4cb62c792559733d5f5d2ee42383e8d3b336e5168472ebdaaf157fd6f1949973" dependencies = [ "serde", "serde_derive", @@ -1858,18 +2908,18 @@ dependencies = [ [[package]] name = "solana-sanitize" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9677531dd4098d078515c66d69a04bfa0389d364a5c768561c719030b368a9db" +checksum = "e956e49e563eb8a9aa09425d676180a0a0509038be4457f230bb6e1dfa036053" [[package]] name = "solana-sdk" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf93cfd5f5af23b59789eba96b6a6afd92a3a18a3fc6652259bfa1f32743caf4" +checksum = "a2625a64d46eccd46452df612f4266f24d266eb43ccac2a566ec41ee2ec76262" dependencies = [ "bincode", - "bitflags", + "bitflags 2.8.0", "borsh 1.5.5", "bs58", "bytemuck", @@ -1928,21 +2978,21 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bded40f70accbe97030e5f7163017605e51a2631425229ec2b0a4339bd1163a" +checksum = "6102303ef82f601e178970388256cd2841618d0789246c087c164760bd976b2f" dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] name = "solana-secp256k1-recover" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee25b962814dec3c141e8182474046bae231f0521ed62c9bfdfb6722999ddc18" +checksum = "a5658cf3a6792df8bc40da3c6cd8ff2d96ad494f3102a6c70ee41774647b0b0e" dependencies = [ "borsh 1.5.5", "libsecp256k1", @@ -1952,9 +3002,9 @@ dependencies = [ [[package]] name = "solana-secp256r1-program" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ec53eff8861ab398b9ca4da7ef8c8da5d4170f8ea26557fc1581638b56326c1" +checksum = "3f1acf1413825581b79339a3b8427466f0a3b677c85cafe5d0827a3a6f7a6680" dependencies = [ "bytemuck", "openssl", @@ -1972,18 +3022,18 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-serde-varint" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ff77c37cb995cc53ce1a4b78e5e9961957098677de6fdc6a4783ed37a8b0fcd" +checksum = "591ff7fba3f641998d613f6934bd89222cf45b0393225dc3c4af09b2b8f94d33" dependencies = [ "serde", ] [[package]] name = "solana-serialize-utils" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a10eb6e3177828145beaba85d352a4dbc47798fd95c5f86145e1a732684d6d" +checksum = "304f0afa82feddfdab31a97148717bf33a0e1cd67261aa1fce55835eff0a5a90" dependencies = [ "solana-instruction", "solana-pubkey", @@ -1992,9 +3042,9 @@ dependencies = [ [[package]] name = "solana-sha256-hasher" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c4229293979bf8bda7db2243ae75e13695341375577a4c44b07e4f0b7a5d9e" +checksum = "de0e647536438a92f1b02424d94c703534566aa9b1d8aae87f3b181d2dc5787c" dependencies = [ "sha2 0.10.8", "solana-define-syscall", @@ -2003,18 +3053,18 @@ dependencies = [ [[package]] name = "solana-short-vec" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a2a88d56e6771329970059bcab0fde9a719c8edae173fb26b2c08e427495a" +checksum = "8cfbe01016ac7c0ac992fae610f46607b7d8cadba5c526f2b8701123bc28e5ce" dependencies = [ "serde", ] [[package]] name = "solana-signature" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e8a078879d8430cdfbee8e3c1cdf17da74c19d304662580fc463dc91e17699" +checksum = "7a515db8b6bbce5a603e09cda69e459ec8d5964a8711e40689ae596da0d9907a" dependencies = [ "bs58", "ed25519-dalek", @@ -2027,9 +3077,9 @@ dependencies = [ [[package]] name = "solana-slot-hashes" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88fa2a6e60f2d7016cf95429e0f60cf4a04d4eed167abd1a5f8b08cbda695893" +checksum = "327614604f49be7b292e4fefeca60da6b16720ef2edf35458b1923f0a34b0e2e" dependencies = [ "serde", "serde_derive", @@ -2039,9 +3089,9 @@ dependencies = [ [[package]] name = "solana-slot-history" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fa66272c308c39a3ce1ca2a9c422de4bdedc28cfe706d6f2c68727bb626eb7" +checksum = "bfd9d02ec3cdf702027aaee2faac215aa0d8825f6b399b205236f349bd6c8e79" dependencies = [ "bv", "serde", @@ -2051,28 +3101,71 @@ dependencies = [ [[package]] name = "solana-stable-layout" -version = "2.1.10" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ee6374e06b1373c4d526e87f02a5ee165093d341c0c5ab548fc79f6ff18e331" +dependencies = [ + "solana-instruction", + "solana-pubkey", +] + +[[package]] +name = "solana-system-interface" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2243571ebf8c0c9915c7e71b17469e173c6755fa58af8eb529db3dda84e3e19a" +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.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61aa6965c2a143def2878fc576713fc39e4bce67461d3616eb46b5d1e56079de" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-log-collector", + "solana-program-runtime", + "solana-sdk", + "solana-type-overrides", ] [[package]] name = "solana-sysvar-id" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5822b63dd59f124e4920df8d87640a288bb40f4016fd275d028fee0b94a5a51e" +checksum = "d11cdbc013ed4f65a636762b9a62cb878dd530062804e6a6be0faa76f5902914" dependencies = [ "solana-pubkey", ] +[[package]] +name = "solana-timings" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "629d606363f36eed6c79a1a96083050380733e5785ba05e52321ff593e806efe" +dependencies = [ + "eager", + "enum-iterator", + "solana-sdk", +] + [[package]] name = "solana-transaction-error" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bd92caae17b4b828864b85cecf6dba6a87ad0ac433606b8bbd58334c74d0251" +checksum = "589ed4a290547a8ad581f4ede34cb9c164953203aa23b415c761cfb8b06cac89" dependencies = [ "serde", "serde_derive", @@ -2080,11 +3173,35 @@ dependencies = [ "solana-sanitize", ] +[[package]] +name = "solana-type-overrides" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "21ac99386eaec9b90c55a22dee445d88b04398e31023bd1749dd58dff150385e" +dependencies = [ + "lazy_static", + "rand 0.8.5", +] + +[[package]] +name = "solana-vote" +version = "2.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7917e3041555c37ba15028415ec424ff7833acc4f62941ce077ad5c6661198" +dependencies = [ + "itertools 0.12.1", + "log", + "serde", + "serde_derive", + "solana-sdk", + "thiserror 1.0.69", +] + [[package]] name = "solana-zk-sdk" -version = "2.1.10" +version = "2.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c19f36d9e5227b4d94e651501a1ab15d58480d93e03d8340cc8593758e50530" +checksum = "d07c66d2589fb44e2050be900519070a15dbe8e7793977f586952fe9d1248ae6" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -2113,30 +3230,28 @@ dependencies = [ ] [[package]] -name = "spl-associated-token-account" -version = "6.0.0" +name = "solana_rbpf" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" +checksum = "1c1941b5ef0c3ce8f2ac5dd984d0fb1a97423c4ff2a02eec81e3913f02e2ac2b" dependencies = [ - "borsh 1.5.5", - "num-derive", - "num-traits", - "solana-program", - "spl-associated-token-account-client", - "spl-token", - "spl-token-2022 6.0.0", + "byteorder", + "combine", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", "thiserror 1.0.69", + "winapi", ] [[package]] -name = "spl-associated-token-account-client" -version = "2.0.0" +name = "spin" +version = "0.9.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f8349dbcbe575f354f9a533a21f272f3eb3808a49e2fdc1c34393b88ba76cb" -dependencies = [ - "solana-instruction", - "solana-pubkey", -] +checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" [[package]] name = "spl-discriminator" @@ -2158,7 +3273,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2170,7 +3285,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.96", + "syn 2.0.98", "thiserror 1.0.69", ] @@ -2243,7 +3358,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2283,34 +3398,6 @@ dependencies = [ "thiserror 1.0.69", ] -[[package]] -name = "spl-token-2022" -version = "6.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive", - "num-traits", - "num_enum", - "solana-program", - "solana-security-txt", - "solana-zk-sdk", - "spl-elgamal-registry", - "spl-memo", - "spl-pod", - "spl-token", - "spl-token-confidential-transfer-ciphertext-arithmetic", - "spl-token-confidential-transfer-proof-extraction", - "spl-token-confidential-transfer-proof-generation 0.2.0", - "spl-token-group-interface", - "spl-token-metadata-interface", - "spl-transfer-hook-interface", - "spl-type-length-value", - "thiserror 1.0.69", -] - [[package]] name = "spl-token-2022" version = "7.0.0" @@ -2331,7 +3418,7 @@ dependencies = [ "spl-token", "spl-token-confidential-transfer-ciphertext-arithmetic", "spl-token-confidential-transfer-proof-extraction", - "spl-token-confidential-transfer-proof-generation 0.3.0", + "spl-token-confidential-transfer-proof-generation", "spl-token-group-interface", "spl-token-metadata-interface", "spl-transfer-hook-interface", @@ -2361,19 +3448,8 @@ dependencies = [ "solana-curve25519", "solana-program", "solana-zk-sdk", - "spl-pod", - "thiserror 2.0.11", -] - -[[package]] -name = "spl-token-confidential-transfer-proof-generation" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" -dependencies = [ - "curve25519-dalek 4.1.3", - "solana-zk-sdk", - "thiserror 1.0.69", + "spl-pod", + "thiserror 2.0.11", ] [[package]] @@ -2432,12 +3508,24 @@ name = "spl-token-wrap" version = "0.1.0" dependencies = [ "bytemuck", - "num_enum", + "mollusk-svm", + "mollusk-svm-programs-token", + "solana-account", + "solana-account-info", + "solana-cpi", + "solana-instruction", + "solana-msg", "solana-program", - "spl-associated-token-account", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-system-interface", + "spl-pod", "spl-token", - "spl-token-2022 7.0.0", - "thiserror 2.0.11", + "spl-token-2022", ] [[package]] @@ -2483,6 +3571,12 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + [[package]] name = "strsim" version = "0.11.1" @@ -2508,15 +3602,62 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.96" +version = "2.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5d0adab1ae378d7f53bdebc67a39f1f151407ef230f0ce2883572f5d8985c80" +checksum = "36147f1a48ae0ec2b5b3bc5b537d267457555a10dc06f3dbc8cb11ba3006d3b1" dependencies = [ "proc-macro2", "quote", "unicode-ident", ] +[[package]] +name = "sync_wrapper" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", +] + +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[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.69" @@ -2543,7 +3684,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", ] [[package]] @@ -2554,7 +3695,17 @@ checksum = "26afc1baea8a989337eeb52b6e72a039780ce45c3edfcc9c5b9d112feeb173c2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", +] + +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", ] [[package]] @@ -2572,6 +3723,44 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" +[[package]] +name = "tokio" +version = "1.43.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d61fa4ffa3de412bfea335c6ecff681de2b609ba3c77ef3e00e521813a9ed9e" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "pin-project-lite", + "socket2", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-rustls" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" +dependencies = [ + "rustls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7fcaa8d55a2bdd6b83ace262b016eca0d79ee02818c5c1bcdf0305114081078" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.5.11" @@ -2589,15 +3778,46 @@ checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" -version = "0.22.22" +version = "0.22.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ae48d6208a266e853d946088ed816055e556cc6028c5e8e2b84d9fa5dd7c7f5" +checksum = "02a8b472d1a3d7c18e2d61a489aee3453fd9031c33e4f55bd533f4a7adca1bee" dependencies = [ "indexmap", "toml_datetime", "winnow", ] +[[package]] +name = "tower-service" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" + +[[package]] +name = "tracing" +version = "0.1.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" +dependencies = [ + "pin-project-lite", + "tracing-core", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "typenum" version = "1.17.0" @@ -2606,9 +3826,9 @@ checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "unicode-ident" -version = "1.0.15" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11cd88e12b17c6494200a9c1b683a04fcac9573ed74cd1b62aeb2727c5592243" +checksum = "a210d160f08b701c8721ba1c726c11662f877ea6b7094007e1ca9a1041945034" [[package]] name = "universal-hash" @@ -2620,6 +3840,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "unreachable" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "382810877fe448991dfc7f0dd6e3ae5d58088fd0ea5e35189655f84e6814fa56" +dependencies = [ + "void", +] + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "uriparse" version = "0.6.4" @@ -2630,6 +3865,29 @@ dependencies = [ "lazy_static", ] +[[package]] +name = "url" +version = "2.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "32f8b686cadd1473f4bd0117a5d28d36b1ade384ea9b5069a1c40aefed7fda60" +dependencies = [ + "form_urlencoded", + "idna", + "percent-encoding", +] + +[[package]] +name = "utf16_iter" +version = "1.0.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c8232dd3cdaed5356e0f716d285e4b40b932ac434100fe9b7e0e8e935b9e6246" + +[[package]] +name = "utf8_iter" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" + [[package]] name = "vcpkg" version = "0.2.15" @@ -2642,6 +3900,21 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -2676,10 +3949,23 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.50" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" +dependencies = [ + "cfg-if", + "js-sys", + "once_cell", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.100" @@ -2698,7 +3984,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2722,34 +4008,131 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "webpki-roots" +version = "0.25.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" + +[[package]] +name = "winapi" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" +dependencies = [ + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", +] + +[[package]] +name = "winapi-i686-pc-windows-gnu" +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.59.0", +] + +[[package]] +name = "winapi-x86_64-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" + +[[package]] +name = "windows-sys" +version = "0.48.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" +dependencies = [ + "windows-targets 0.48.5", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" +dependencies = [ + "windows_aarch64_gnullvm 0.48.5", + "windows_aarch64_msvc 0.48.5", + "windows_i686_gnu 0.48.5", + "windows_i686_msvc 0.48.5", + "windows_x86_64_gnu 0.48.5", + "windows_x86_64_gnullvm 0.48.5", + "windows_x86_64_msvc 0.48.5", +] + [[package]] name = "windows-targets" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" + [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_i686_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" + [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -2762,24 +4145,48 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_x86_64_gnu" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_msvc" +version = "0.48.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -2788,13 +4195,59 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.6.24" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8d71a593cc5c42ad7876e2c1fda56f314f3754c084128833e64f1345ff8a03a" +checksum = "7e49d2d35d3fad69b39b94139037ecfb4f359f08958b9c11e7315ce770462419" dependencies = [ "memchr", ] +[[package]] +name = "winreg" +version = "0.50.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "write16" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1890f4022759daae28ed4fe62859b1236caebfc61ede2f63ed4e695f3f6d936" + +[[package]] +name = "writeable" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e9df38ee2d2c3c5948ea468a8406ff0db0b29ae1ffde1bcf20ef305bcc95c51" + +[[package]] +name = "yoke" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "120e6aef9aa629e3d4f52dc8cc43a015c7724194c97dfaf45180d2daf2b77f40" +dependencies = [ + "serde", + "stable_deref_trait", + "yoke-derive", + "zerofrom", +] + +[[package]] +name = "yoke-derive" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2380878cad4ac9aac1e2435f3eb4020e8374b5f13c296cb75b4620ff8e229154" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "synstructure", +] + [[package]] name = "zerocopy" version = "0.7.35" @@ -2813,7 +4266,28 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", +] + +[[package]] +name = "zerofrom" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cff3ee08c995dee1859d998dea82f7374f2826091dd9cd47def953cae446cd2e" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "595eed982f7d355beb85837f651fa22e90b3c044842dc7f2c2842c086f295808" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", + "synstructure", ] [[package]] @@ -2833,5 +4307,27 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.96", + "syn 2.0.98", +] + +[[package]] +name = "zerovec" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa2b893d79df23bfb12d5461018d408ea19dfafe76c2c7ef6d4eba614f8ff079" +dependencies = [ + "yoke", + "zerofrom", + "zerovec-derive", +] + +[[package]] +name = "zerovec-derive" +version = "0.10.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6eafa6dfb17584ea3e2bd6e76e0cc15ad7af12b09abdd1ca55961bed9b1063c6" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.98", ] diff --git a/program/Cargo.toml b/program/Cargo.toml index 3d559b1..52b5cd1 100644 --- a/program/Cargo.toml +++ b/program/Cargo.toml @@ -13,12 +13,28 @@ test-sbf = [] [dependencies] bytemuck = { version = "1.21.0", features = ["derive"] } -num_enum = "0.7" -solana-program = "2.1.0" -spl-associated-token-account = { version = "6.0.0", features = ["no-entrypoint"] } -spl-token = { version = "7.0", features = ["no-entrypoint"] } +solana-account-info = "2.1.13" +solana-cpi = "2.1.13" +solana-instruction = "2.1.13" +solana-msg = "2.1.13" +solana-program-entrypoint = "2.1.13" +solana-program-error = "2.1.13" +solana-program-option = "2.1.13" +solana-program-pack = "2.1.13" +solana-pubkey = "2.1.13" +solana-rent = "2.1.13" +solana-system-interface = { version = "1.0.0", features = ["bincode"] } +spl-pod = "0.5.0" +spl-token = { version = "7.0.0", features = ["no-entrypoint"] } spl-token-2022 = { version = "7.0.0", features = ["no-entrypoint"] } -thiserror = "2.0" + +# Only needed until solana-sysvar is bumped to 2.1 +solana-program = "2.1.13" + +[dev-dependencies] +mollusk-svm = "0.0.15" +mollusk-svm-programs-token = "0.0.15" +solana-account = "2.1.13" [lib] crate-type = ["cdylib", "lib"] diff --git a/program/src/entrypoint.rs b/program/src/entrypoint.rs index 62a02f2..cc9e27e 100644 --- a/program/src/entrypoint.rs +++ b/program/src/entrypoint.rs @@ -2,9 +2,12 @@ #![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))] -use solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}; +use { + solana_account_info::AccountInfo, solana_program_error::ProgramResult, solana_pubkey::Pubkey, +}; + +solana_program_entrypoint::entrypoint!(process_instruction); -solana_program::entrypoint!(process_instruction); fn process_instruction( program_id: &Pubkey, accounts: &[AccountInfo], diff --git a/program/src/instruction.rs b/program/src/instruction.rs index 32ad7f0..be18e97 100644 --- a/program/src/instruction.rs +++ b/program/src/instruction.rs @@ -1,30 +1,37 @@ //! Program instructions -use num_enum::{IntoPrimitive, TryFromPrimitive}; +use { + solana_instruction::{AccountMeta, Instruction}, + solana_program_error::ProgramError, + solana_pubkey::Pubkey, + std::convert::TryInto, +}; /// Instructions supported by the Token Wrap program -#[derive(Clone, Debug, PartialEq, TryFromPrimitive, IntoPrimitive)] +#[derive(Clone, Debug, PartialEq)] #[repr(u8)] pub enum TokenWrapInstruction { - /// Create a wrapped token mint + /// Create a wrapped token mint. Assumes caller has pre-funded wrapped mint + /// and backpointer account. Supports both directions: + /// - spl-token to token-2022 + /// - token-2022 to spl-token + /// - token-2022 to token-2022 w/ new extensions /// /// Accounts expected by this instruction: /// - /// 0. `[writeable,signer]` Funding account for mint and backpointer (must - /// be a system account) - /// 1. `[writeable]` Unallocated wrapped mint account to create, address - /// must be: `get_wrapped_mint_address(unwrapped_mint_address, + /// 0. `[writeable]` Unallocated wrapped mint account to create (PDA), + /// address must be: `get_wrapped_mint_address(unwrapped_mint_address, /// wrapped_token_program_id)` - /// 2. `[writeable]` Unallocated wrapped backpointer account to create + /// 1. `[writeable]` Unallocated wrapped backpointer account to create (PDA) /// `get_wrapped_mint_backpointer_address(wrapped_mint_address)` - /// 3. `[]` Existing unwrapped mint - /// 4. `[]` System program - /// 5. `[]` SPL Token program for wrapped mint - /// - /// Data expected by this instruction: - /// * `bool`: If true, idempotent creation. If false, fail if the mint - /// already exists. - CreateMint, + /// 2. `[]` Existing unwrapped mint + /// 3. `[]` System program + /// 4. `[]` SPL Token program for wrapped mint + CreateMint { + /// If true, idempotent creation. If false, fail if the mint already + /// exists. + idempotent: bool, + }, /// Wrap tokens /// @@ -41,17 +48,15 @@ pub enum TokenWrapInstruction { /// `get_wrapped_mint_address(unwrapped_mint_address, /// wrapped_token_program_id)` /// 4. `[writeable]` Recipient wrapped token account - /// 5. `[]` Escrow mint authority, address must be: - /// `get_wrapped_mint_authority(wrapped_mint)` - /// 6. `[]` SPL Token program for unwrapped mint - /// 7. `[]` SPL Token program for wrapped mint - /// 8. `[signer]` Transfer authority on unwrapped token account - /// 9. `..8+M` `[signer]` (Optional) M multisig signers on unwrapped token + /// 5. `[]` SPL Token program for unwrapped mint + /// 6. `[]` SPL Token program for wrapped mint + /// 7. `[signer]` Transfer authority on unwrapped token account + /// 8. `..8+M` `[signer]` (Optional) M multisig signers on unwrapped token /// account - /// - /// Data expected by this instruction: - /// * little-endian `u64` representing the amount to wrap - Wrap, + Wrap { + /// little-endian `u64` representing the amount to wrap + amount: u64, + }, /// Unwrap tokens /// @@ -68,15 +73,153 @@ pub enum TokenWrapInstruction { /// `get_wrapped_mint_authority(wrapped_mint_address)` /// 3. `[writeable]` Recipient unwrapped tokens /// 4. `[]` Unwrapped token mint - /// 5. `[]` Escrow unwrapped token authority - /// `get_wrapped_mint_authority(wrapped_mint)` - /// 6. `[]` SPL Token program for wrapped mint - /// 7. `[]` SPL Token program for unwrapped mint - /// 8. `[signer]` Transfer authority on wrapped token account - /// 9. `..8+M` `[signer]` (Optional) M multisig signers on wrapped token + /// 5. `[]` SPL Token program for wrapped mint + /// 6. `[]` SPL Token program for unwrapped mint + /// 7. `[signer]` Transfer authority on wrapped token account + /// 8. `..8+M` `[signer]` (Optional) M multisig signers on wrapped token /// account - /// - /// Data expected by this instruction: - /// * little-endian `u64` representing the amount to unwrap - Unwrap, + Unwrap { + /// little-endian `u64` representing the amount to unwrap + amount: u64, + }, +} + +impl TokenWrapInstruction { + /// Packs a [`TokenWrapInstruction`](enum.TokenWrapInstruction.html) into a + /// byte array. + pub fn pack(&self) -> Vec { + let mut buf = Vec::new(); + match self { + TokenWrapInstruction::CreateMint { idempotent } => { + buf.push(0); + buf.push(if *idempotent { 1 } else { 0 }); + } + + TokenWrapInstruction::Wrap { amount } => { + buf.push(1); + buf.extend_from_slice(&amount.to_le_bytes()); + } + TokenWrapInstruction::Unwrap { amount } => { + buf.push(2); + buf.extend_from_slice(&amount.to_le_bytes()); + } + } + buf + } + + /// Unpacks a byte array into a + /// [`TokenWrapInstruction`](enum.TokenWrapInstruction.html). + pub fn unpack(input: &[u8]) -> Result { + match input.split_first() { + Some((&0, rest)) if rest.len() == 1 => { + let idempotent = match rest[0] { + 0 => false, + 1 => true, + _ => return Err(ProgramError::InvalidInstructionData), + }; + Ok(TokenWrapInstruction::CreateMint { idempotent }) + } + Some((&1, rest)) if rest.len() == 8 => { + let amount = u64::from_le_bytes(rest.try_into().unwrap()); + Ok(TokenWrapInstruction::Wrap { amount }) + } + Some((&2, rest)) if rest.len() == 8 => { + let amount = u64::from_le_bytes(rest.try_into().unwrap()); + Ok(TokenWrapInstruction::Unwrap { amount }) + } + _ => Err(ProgramError::InvalidInstructionData), + } + } +} + +/// Creates `CreateMint` instruction. +pub fn create_mint( + program_id: &Pubkey, + wrapped_mint_address: &Pubkey, + wrapped_backpointer_address: &Pubkey, + unwrapped_mint_address: &Pubkey, + wrapped_token_program_id: &Pubkey, + idempotent: bool, +) -> Instruction { + let accounts = vec![ + AccountMeta::new(*wrapped_mint_address, false), + AccountMeta::new(*wrapped_backpointer_address, false), + AccountMeta::new_readonly(*unwrapped_mint_address, false), + AccountMeta::new_readonly(solana_system_interface::program::id(), false), + AccountMeta::new_readonly(*wrapped_token_program_id, false), + ]; + let data = TokenWrapInstruction::CreateMint { idempotent }.pack(); + Instruction::new_with_bytes(*program_id, &data, accounts) +} + +/// Creates `Wrap` instruction. +#[allow(clippy::too_many_arguments)] +pub fn wrap( + program_id: &Pubkey, + unwrapped_token_account_address: &Pubkey, + unwrapped_escrow_address: &Pubkey, + unwrapped_mint_address: &Pubkey, + wrapped_mint_address: &Pubkey, + recipient_wrapped_token_account_address: &Pubkey, + unwrapped_token_program_id: &Pubkey, + wrapped_token_program_id: &Pubkey, + transfer_authority_address: &Pubkey, + multisig_signer_pubkeys: &[&Pubkey], + amount: u64, +) -> Instruction { + let mut accounts = vec![ + AccountMeta::new(*unwrapped_token_account_address, false), + AccountMeta::new(*unwrapped_escrow_address, false), + AccountMeta::new_readonly(*unwrapped_mint_address, false), + AccountMeta::new(*wrapped_mint_address, false), + AccountMeta::new(*recipient_wrapped_token_account_address, false), + AccountMeta::new_readonly(*unwrapped_token_program_id, false), + AccountMeta::new_readonly(*wrapped_token_program_id, false), + AccountMeta::new_readonly( + *transfer_authority_address, + multisig_signer_pubkeys.is_empty(), + ), + ]; + for signer_pubkey in multisig_signer_pubkeys.iter() { + accounts.push(AccountMeta::new_readonly(**signer_pubkey, true)); + } + + let data = TokenWrapInstruction::Wrap { amount }.pack(); + Instruction::new_with_bytes(*program_id, &data, accounts) +} + +/// Creates `Unwrap` instruction. +#[allow(clippy::too_many_arguments)] +pub fn unwrap( + program_id: &Pubkey, + wrapped_token_account_address: &Pubkey, + wrapped_mint_address: &Pubkey, + unwrapped_escrow_address: &Pubkey, + recipient_unwrapped_token_account_address: &Pubkey, + unwrapped_mint_address: &Pubkey, + wrapped_token_program_id: &Pubkey, + unwrapped_token_program_id: &Pubkey, + transfer_authority_address: &Pubkey, + multisig_signer_pubkeys: &[&Pubkey], + amount: u64, +) -> Instruction { + let mut accounts = vec![ + AccountMeta::new(*wrapped_token_account_address, false), + AccountMeta::new(*wrapped_mint_address, false), + AccountMeta::new(*unwrapped_escrow_address, false), + AccountMeta::new(*recipient_unwrapped_token_account_address, false), + AccountMeta::new_readonly(*unwrapped_mint_address, false), + AccountMeta::new_readonly(*wrapped_token_program_id, false), + AccountMeta::new_readonly(*unwrapped_token_program_id, false), + AccountMeta::new_readonly( + *transfer_authority_address, + multisig_signer_pubkeys.is_empty(), + ), + ]; + for signer_pubkey in multisig_signer_pubkeys.iter() { + accounts.push(AccountMeta::new_readonly(**signer_pubkey, true)); + } + + let data = TokenWrapInstruction::Unwrap { amount }.pack(); + Instruction::new_with_bytes(*program_id, &data, accounts) } diff --git a/program/src/lib.rs b/program/src/lib.rs index 79fda08..5e2cd16 100644 --- a/program/src/lib.rs +++ b/program/src/lib.rs @@ -7,12 +7,9 @@ pub mod instruction; pub mod processor; pub mod state; -// Export current SDK types for downstream users building with a different SDK -// version -pub use solana_program; -use solana_program::pubkey::Pubkey; +use solana_pubkey::Pubkey; -solana_program::declare_id!("TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR"); +solana_pubkey::declare_id!("TwRapQCDhWkZRrDaHfZGuHxkZ91gHDRkyuzNqeU5MgR"); const WRAPPED_MINT_SEED: &[u8] = br"mint"; @@ -37,7 +34,7 @@ pub(crate) fn get_wrapped_mint_seeds<'a>( ] } -pub(crate) fn _get_wrapped_mint_signer_seeds<'a>( +pub(crate) fn get_wrapped_mint_signer_seeds<'a>( unwrapped_mint: &'a Pubkey, wrapped_token_program_id: &'a Pubkey, bump_seed: &'a [u8], @@ -90,7 +87,7 @@ pub(crate) fn get_wrapped_mint_backpointer_address_seeds(wrapped_mint: &Pubkey) [WRAPPED_MINT_BACKPOINTER_SEED, wrapped_mint.as_ref()] } -pub(crate) fn _get_wrapped_mint_backpointer_address_signer_seeds<'a>( +pub(crate) fn get_wrapped_mint_backpointer_address_signer_seeds<'a>( wrapped_mint: &'a Pubkey, bump_seed: &'a [u8], ) -> [&'a [u8]; 3] { diff --git a/program/src/processor.rs b/program/src/processor.rs index bb0cf1a..9ad58f9 100644 --- a/program/src/processor.rs +++ b/program/src/processor.rs @@ -1,25 +1,186 @@ //! Program state processor use { - crate::instruction::TokenWrapInstruction, - solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, pubkey::Pubkey}, - spl_token_2022::instruction::decode_instruction_type, + crate::{ + get_wrapped_mint_address_with_seed, get_wrapped_mint_authority, + get_wrapped_mint_backpointer_address_signer_seeds, + get_wrapped_mint_backpointer_address_with_seed, get_wrapped_mint_signer_seeds, + instruction::TokenWrapInstruction, state::Backpointer, + }, + solana_account_info::{next_account_info, AccountInfo}, + solana_cpi::{invoke, invoke_signed}, + solana_msg::msg, + solana_program::sysvar::Sysvar, + solana_program_error::{ProgramError, ProgramResult}, + solana_program_pack::Pack, + solana_pubkey::Pubkey, + solana_rent::Rent, + solana_system_interface::instruction::{allocate, assign}, + spl_token_2022::{ + extension::PodStateWithExtensions, instruction::initialize_mint2, pod::PodMint, + }, }; +/// Processes [`CreateMint`](enum.TokenWrapInstruction.html) instruction. +pub fn process_create_mint( + program_id: &Pubkey, + accounts: &[AccountInfo], + idempotent: bool, +) -> ProgramResult { + let account_info_iter = &mut accounts.iter(); + + let wrapped_mint_account = next_account_info(account_info_iter)?; + let wrapped_backpointer_account = next_account_info(account_info_iter)?; + let unwrapped_mint_account = next_account_info(account_info_iter)?; + let _system_program_account = next_account_info(account_info_iter)?; + let wrapped_token_program_account = next_account_info(account_info_iter)?; + + let (wrapped_mint_address, mint_bump) = get_wrapped_mint_address_with_seed( + unwrapped_mint_account.key, + wrapped_token_program_account.key, + ); + + let (wrapped_backpointer_address, backpointer_bump) = + get_wrapped_mint_backpointer_address_with_seed(wrapped_mint_account.key); + + // PDA derivation validation + + if *wrapped_mint_account.key != wrapped_mint_address { + msg!("Wrapped mint account address does not match expected PDA"); + return Err(ProgramError::InvalidAccountData); + } + + if *wrapped_backpointer_account.key != wrapped_backpointer_address { + msg!("Error: wrapped_backpointer_account address is not as expected"); + return Err(ProgramError::InvalidSeeds); + } + + // Idempotency checks + + if wrapped_mint_account.data_len() > 0 || wrapped_backpointer_account.data_len() > 0 { + msg!("Wrapped mint or backpointer account already initialized"); + if !idempotent { + return Err(ProgramError::AccountAlreadyInitialized); + } + if wrapped_mint_account.owner != wrapped_token_program_account.key { + msg!("Wrapped mint account owner is not the expected token program"); + return Err(ProgramError::InvalidAccountOwner); + } + if wrapped_backpointer_account.owner != program_id { + msg!("Wrapped backpointer account owner is not the expected token wrap program"); + return Err(ProgramError::InvalidAccountOwner); + } + return Ok(()); + } + + // Initialize wrapped mint PDA + + let bump_seed = [mint_bump]; + let signer_seeds = get_wrapped_mint_signer_seeds( + unwrapped_mint_account.key, + wrapped_token_program_account.key, + &bump_seed, + ); + let space = spl_token_2022::state::Mint::get_packed_len(); + + let rent = Rent::get()?; + let mint_rent_required = rent.minimum_balance(space); + if wrapped_mint_account.lamports() < mint_rent_required { + msg!( + "Error: wrapped_mint_account requires pre-funding of {} lamports", + mint_rent_required + ); + return Err(ProgramError::AccountNotRentExempt); + } + + // Initialize the wrapped mint + + invoke_signed( + &allocate(&wrapped_mint_address, space as u64), + &[wrapped_mint_account.clone()], + &[&signer_seeds], + )?; + invoke_signed( + &assign(&wrapped_mint_address, wrapped_token_program_account.key), + &[wrapped_mint_account.clone()], + &[&signer_seeds], + )?; + + // New wrapped mint matches decimals & freeze authority of unwrapped mint + let unwrapped_mint_data = unwrapped_mint_account.try_borrow_data()?; + let unpacked_unwrapped_mint = + PodStateWithExtensions::::unpack(&unwrapped_mint_data)?.base; + let decimals = unpacked_unwrapped_mint.decimals; + let freeze_authority = unpacked_unwrapped_mint + .freeze_authority + .ok_or(ProgramError::InvalidArgument) + .ok(); + + let wrapped_mint_authority = get_wrapped_mint_authority(wrapped_mint_account.key); + + invoke( + &initialize_mint2( + wrapped_token_program_account.key, + wrapped_mint_account.key, + &wrapped_mint_authority, + freeze_authority.as_ref(), + decimals, + )?, + &[wrapped_mint_account.clone()], + )?; + + // Initialize backpointer PDA + + let backpointer_space = std::mem::size_of::(); + let backpointer_rent_required = rent.minimum_balance(space); + if wrapped_backpointer_account.lamports() < rent.minimum_balance(backpointer_space) { + msg!( + "Error: wrapped_backpointer_account requires pre-funding of {} lamports", + backpointer_rent_required + ); + return Err(ProgramError::InsufficientFunds); + } + + let bump_seed = [backpointer_bump]; + let backpointer_signer_seeds = + get_wrapped_mint_backpointer_address_signer_seeds(wrapped_mint_account.key, &bump_seed); + invoke_signed( + &allocate(&wrapped_backpointer_address, backpointer_space as u64), + &[wrapped_backpointer_account.clone()], + &[&backpointer_signer_seeds], + )?; + invoke_signed( + &assign(&wrapped_backpointer_address, program_id), + &[wrapped_backpointer_account.clone()], + &[&backpointer_signer_seeds], + )?; + + // Set data within backpointer PDA + + let mut backpointer_account_data = wrapped_backpointer_account.try_borrow_mut_data()?; + let backpointer = bytemuck::from_bytes_mut::(&mut backpointer_account_data[..]); + backpointer.unwrapped_mint = *unwrapped_mint_account.key; + + Ok(()) +} + /// Instruction processor pub fn process_instruction( - _program_id: &Pubkey, - _accounts: &[AccountInfo], + program_id: &Pubkey, + accounts: &[AccountInfo], input: &[u8], ) -> ProgramResult { - match decode_instruction_type(input)? { - TokenWrapInstruction::CreateMint => { - unimplemented!(); + match TokenWrapInstruction::unpack(input)? { + TokenWrapInstruction::CreateMint { idempotent } => { + msg!("Instruction: CreateMint"); + process_create_mint(program_id, accounts, idempotent) } - TokenWrapInstruction::Wrap => { + TokenWrapInstruction::Wrap { .. } => { + msg!("Instruction: Wrap"); unimplemented!(); } - TokenWrapInstruction::Unwrap => { + TokenWrapInstruction::Unwrap { .. } => { + msg!("Instruction: Unwrap"); unimplemented!(); } } diff --git a/program/src/state.rs b/program/src/state.rs index 977c34d..1533502 100644 --- a/program/src/state.rs +++ b/program/src/state.rs @@ -2,7 +2,7 @@ use { bytemuck::{Pod, Zeroable}, - solana_program::pubkey::Pubkey, + solana_pubkey::Pubkey, }; /// Backpointer diff --git a/program/tests/test_create_mint.rs b/program/tests/test_create_mint.rs new file mode 100644 index 0000000..cc5afb6 --- /dev/null +++ b/program/tests/test_create_mint.rs @@ -0,0 +1,696 @@ +use { + mollusk_svm::{result::Check, Mollusk}, + solana_account::Account, + solana_program_error::ProgramError, + solana_program_option::COption, + solana_program_pack::Pack, + solana_pubkey::Pubkey, + solana_rent::Rent, + spl_pod::{ + optional_keys::OptionalNonZeroPubkey, + primitives::{PodBool, PodU64}, + }, + spl_token_2022::{ + extension::{ + mint_close_authority::MintCloseAuthority, BaseStateWithExtensionsMut, ExtensionType, + PodStateWithExtensions, PodStateWithExtensionsMut, + }, + pod::{PodCOption, PodMint}, + state::Mint, + }, + spl_token_wrap::{ + get_wrapped_mint_address, get_wrapped_mint_authority, get_wrapped_mint_backpointer_address, + instruction::create_mint, state::Backpointer, + }, + std::convert::TryFrom, +}; + +const MINT_DECIMALS: u8 = 12; +const MINT_SUPPLY: u64 = 500_000_000; +const FREEZE_AUTHORITY: Pubkey = + Pubkey::from_str_const("11111115q4EpJaTXAZWpCg3J2zppWGSZ46KXozzo9"); + +fn setup_mint(owner: Pubkey, rent: &Rent) -> Account { + let state = spl_token::state::Mint { + decimals: MINT_DECIMALS, + is_initialized: true, + supply: MINT_SUPPLY, + freeze_authority: COption::Some(FREEZE_AUTHORITY), + ..Default::default() + }; + let mut data = vec![0u8; spl_token::state::Mint::LEN]; + state.pack_into_slice(&mut data); + + let lamports = rent.minimum_balance(data.len()); + + Account { + lamports, + data, + owner, + ..Default::default() + } +} + +#[test] +fn test_idempotency_false_with_existing_account() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + // Simulating existing data on mint or backpointer + let account_with_data = Account { + data: vec![1; 10], + ..Account::default() + }; + + // idempotent: false causes these to fail + let accounts = &[ + (wrapped_mint_address, account_with_data.clone()), // mint already exists + (wrapped_backpointer_address, Account::default()), + (unwrapped_mint_address, Account::default()), + (solana_system_interface::program::id(), Account::default()), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::AccountAlreadyInitialized)], + ); + + let accounts = &[ + (wrapped_mint_address, Account::default()), + (wrapped_backpointer_address, account_with_data), // backpointer already exists + (unwrapped_mint_address, Account::default()), + (solana_system_interface::program::id(), Account::default()), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::AccountAlreadyInitialized)], + ); +} + +#[test] +fn test_idempotency_true_with_existing_valid_account() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + true, + ); + + // Simulating existing data on mint or backpointer + let mint_account_with_data = Account { + data: vec![1; 10], + owner: wrapped_token_program_id, + ..Account::default() + }; + let backpointer_account_with_data = Account { + owner: program_id, + ..Account::default() + }; + + // idempotent: true causes these to return successfully + let accounts = &[ + (wrapped_mint_address, mint_account_with_data.clone()), // mint already exists + (wrapped_backpointer_address, backpointer_account_with_data), // backpointer already exists + (unwrapped_mint_address, Account::default()), + (solana_system_interface::program::id(), Account::default()), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction(&instruction, accounts, &[Check::success()]); +} + +#[test] +fn test_idempotency_true_with_existing_invalid_accounts() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + // Incorrectly wrapped mint account owner + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + true, + ); + + let mint_account_with_data = Account { + data: vec![1; 10], + owner: Pubkey::new_unique(), // Wrong owner + ..Account::default() + }; + let backpointer_account_with_data = Account { + owner: program_id, + ..Account::default() + }; + + let accounts = &[ + (wrapped_mint_address, mint_account_with_data.clone()), + (wrapped_backpointer_address, backpointer_account_with_data), + (unwrapped_mint_address, Account::default()), + (solana_system_interface::program::id(), Account::default()), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::InvalidAccountOwner)], + ); + + // Incorrect owner on wrapped backpointer account + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + true, + ); + + let mint_account_with_data = Account { + data: vec![1; 10], + owner: wrapped_token_program_id, + ..Account::default() + }; + let backpointer_account_with_data = Account { + owner: Pubkey::new_unique(), // Wrong owner + ..Account::default() + }; + + let accounts = &[ + (wrapped_mint_address, mint_account_with_data.clone()), + (wrapped_backpointer_address, backpointer_account_with_data), + (unwrapped_mint_address, Account::default()), + (solana_system_interface::program::id(), Account::default()), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::InvalidAccountOwner)], + ); +} + +#[test] +fn test_create_mint_insufficient_funds() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + // Calculate minimum rent for Mint account + let rent = Rent::default(); // Using default rent for test + let space = Mint::get_packed_len(); + let mint_rent_required = rent.minimum_balance(space); + + // Create wrapped_mint_account with insufficient lamports + let insufficient_lamports = mint_rent_required - 1; // Less than required rent + let wrapped_mint_account_insufficent_funds = Account { + lamports: insufficient_lamports, + ..Account::default() + }; + + let accounts = &[ + (wrapped_mint_address, wrapped_mint_account_insufficent_funds), + (wrapped_backpointer_address, Account::default()), + (unwrapped_mint_address, Account::default()), + (solana_system_interface::program::id(), Account::default()), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::AccountNotRentExempt)], + ); +} + +#[test] +fn test_create_mint_backpointer_insufficient_funds() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + // Calculate minimum rent for Backpointer account + let rent = Rent::default(); // Using default rent for test + let backpointer_space = std::mem::size_of::(); + let backpointer_rent_required = rent.minimum_balance(backpointer_space); + + // Create wrapped_backpointer_account with insufficient lamports + let insufficient_lamports = backpointer_rent_required - 1; // Less than required rent + let wrapped_backpointer_account_insufficent_funds = Account { + lamports: insufficient_lamports, + ..Account::default() + }; + + let rent = &mollusk.sysvars.rent; + let accounts = &[ + ( + wrapped_mint_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + ( + wrapped_backpointer_address, + wrapped_backpointer_account_insufficent_funds, + ), + (unwrapped_mint_address, setup_mint(spl_token::id(), rent)), + ( + solana_system_interface::program::id(), + Account { + executable: true, + ..Default::default() + }, + ), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::InsufficientFunds)], + ); +} + +#[test] +fn test_improperly_derived_addresses_fail() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let rent = &mollusk.sysvars.rent; + let unwrapped_mint_account = setup_mint(spl_token::id(), rent); + + // Incorrectly derived wrapped mint address + + let incorrect_wrapped_mint_addr = Pubkey::new_unique(); + let instruction = create_mint( + &program_id, + &incorrect_wrapped_mint_addr, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + let accounts = &[ + ( + incorrect_wrapped_mint_addr, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + ( + wrapped_backpointer_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + (unwrapped_mint_address, unwrapped_mint_account.clone()), + ( + solana_system_interface::program::id(), + Account { + executable: true, + ..Default::default() + }, + ), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::InvalidAccountData)], + ); + + // Incorrectly derived backpointer address + + let incorrect_backpointer = Pubkey::new_unique(); + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &incorrect_backpointer, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + let accounts = &[ + ( + wrapped_mint_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + ( + incorrect_backpointer, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + (unwrapped_mint_address, unwrapped_mint_account.clone()), + ( + solana_system_interface::program::id(), + Account { + executable: true, + ..Default::default() + }, + ), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::InvalidSeeds)], + ); + + // Incorrect token program address passed + + let incorrect_token_program = Pubkey::new_unique(); + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &incorrect_token_program, + false, + ); + + let accounts = &[ + ( + wrapped_mint_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + ( + wrapped_backpointer_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + (unwrapped_mint_address, unwrapped_mint_account.clone()), + ( + solana_system_interface::program::id(), + Account { + executable: true, + ..Default::default() + }, + ), + (incorrect_token_program, Account::default()), + ]; + mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[Check::err(ProgramError::InvalidAccountData)], + ); +} + +#[test] +fn test_successful_spl_token_to_token_2022() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token2022::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token_2022::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + let rent = &mollusk.sysvars.rent; + let unwrapped_mint_account = setup_mint(spl_token::id(), rent); + + let accounts = &[ + ( + wrapped_mint_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + ( + wrapped_backpointer_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + (unwrapped_mint_address, unwrapped_mint_account.clone()), + ( + solana_system_interface::program::id(), + Account { + executable: true, + ..Default::default() + }, + ), + mollusk_svm_programs_token::token2022::keyed_account(), + ]; + let result = mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[ + Check::success(), + // Ensure unwrapped_mint_account remains unchanged + Check::account(&unwrapped_mint_address) + .data(&unwrapped_mint_account.data) + .build(), + ], + ); + + // Assert state of resulting wrapped mint account + + let resulting_wrapped_mint_account = &result.resulting_accounts[0].1; + assert_eq!(resulting_wrapped_mint_account.owner, spl_token_2022::id()); + + let wrapped_mint_data = Mint::unpack(&resulting_wrapped_mint_account.data).unwrap(); + assert_eq!(wrapped_mint_data.decimals, MINT_DECIMALS); + let expected_mint_authority = get_wrapped_mint_authority(&wrapped_mint_address); + assert_eq!( + wrapped_mint_data.mint_authority.unwrap(), + expected_mint_authority, + ); + assert_eq!(wrapped_mint_data.supply, 0); + assert!(wrapped_mint_data.is_initialized); + assert_eq!( + wrapped_mint_data.freeze_authority.unwrap(), + FREEZE_AUTHORITY + ); + + // Assert state of resulting backpointer account + + let resulting_backpointer_account = &result.resulting_accounts[1].1; + assert_eq!(resulting_backpointer_account.owner, program_id); + + let backpointer = bytemuck::from_bytes::(&resulting_backpointer_account.data[..]); + assert_eq!(backpointer.unwrapped_mint, unwrapped_mint_address); +} + +#[test] +fn test_successful_token_2022_to_spl_token() { + let program_id = spl_token_wrap::id(); + let mut mollusk = Mollusk::new(&program_id, "spl_token_wrap"); + mollusk_svm_programs_token::token::add_program(&mut mollusk); + + let unwrapped_mint_address = Pubkey::new_unique(); + let wrapped_token_program_id = spl_token::id(); + let wrapped_mint_address = + get_wrapped_mint_address(&unwrapped_mint_address, &wrapped_token_program_id); + let wrapped_backpointer_address = get_wrapped_mint_backpointer_address(&wrapped_mint_address); + + let instruction = create_mint( + &program_id, + &wrapped_mint_address, + &wrapped_backpointer_address, + &unwrapped_mint_address, + &wrapped_token_program_id, + false, + ); + + let rent = &mollusk.sysvars.rent; + + // Add extension to spl_token_2022 + + let mint_size = + ExtensionType::try_calculate_account_len::(&[ExtensionType::MintCloseAuthority]) + .unwrap(); + let mut buffer = vec![0; mint_size]; + let mut state = + PodStateWithExtensionsMut::::unpack_uninitialized(&mut buffer).unwrap(); + state.base.decimals = MINT_DECIMALS; + state.base.is_initialized = PodBool::from_bool(true); + state.base.supply = PodU64::from(MINT_SUPPLY); + state.base.freeze_authority = PodCOption::from(COption::Some(FREEZE_AUTHORITY)); + state.init_account_type().unwrap(); + + let extension = state.init_extension::(true).unwrap(); + let close_authority = + OptionalNonZeroPubkey::try_from(Some(Pubkey::new_from_array([1; 32]))).unwrap(); + extension.close_authority = close_authority; + + let mut unwrapped_mint_account = setup_mint(spl_token_2022::id(), rent); + unwrapped_mint_account.data = buffer; + + let accounts = &[ + ( + wrapped_mint_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + ( + wrapped_backpointer_address, + Account { + lamports: 100_000_000, + ..Default::default() + }, + ), + (unwrapped_mint_address, unwrapped_mint_account.clone()), + ( + solana_system_interface::program::id(), + Account { + executable: true, + ..Default::default() + }, + ), + mollusk_svm_programs_token::token::keyed_account(), + ]; + let result = mollusk.process_and_validate_instruction( + &instruction, + accounts, + &[ + Check::success(), + // Ensure unwrapped_mint_account remains unchanged + Check::account(&unwrapped_mint_address) + .data(&unwrapped_mint_account.data) + .build(), + ], + ); + + // Assert state of resulting wrapped mint account + + let resulting_wrapped_mint_account = &result.resulting_accounts[0].1; + assert_eq!(resulting_wrapped_mint_account.owner, spl_token::id()); + + let wrapped_mint_data = + PodStateWithExtensions::::unpack(&resulting_wrapped_mint_account.data) + .unwrap() + .base; + + assert_eq!(wrapped_mint_data.decimals, MINT_DECIMALS); + let expected_mint_authority = get_wrapped_mint_authority(&wrapped_mint_address); + assert_eq!( + wrapped_mint_data + .mint_authority + .ok_or(ProgramError::InvalidAccountData) + .unwrap(), + expected_mint_authority, + ); + assert_eq!(wrapped_mint_data.supply, PodU64::from(0)); + assert_eq!(wrapped_mint_data.is_initialized, PodBool::from_bool(true)); + assert_eq!( + wrapped_mint_data + .freeze_authority + .ok_or(ProgramError::InvalidAccountData) + .unwrap(), + FREEZE_AUTHORITY + ); + + // Assert state of resulting backpointer account + + let resulting_backpointer_account = &result.resulting_accounts[1].1; + assert_eq!(resulting_backpointer_account.owner, program_id); + + let backpointer = bytemuck::from_bytes::(&resulting_backpointer_account.data[..]); + assert_eq!(backpointer.unwrapped_mint, unwrapped_mint_address); +} diff --git a/program/tests/test_instruction.rs b/program/tests/test_instruction.rs new file mode 100644 index 0000000..59b8144 --- /dev/null +++ b/program/tests/test_instruction.rs @@ -0,0 +1,49 @@ +use spl_token_wrap::instruction::TokenWrapInstruction; + +#[test] +fn test_pack_unpack_create_mint() { + let instruction = TokenWrapInstruction::CreateMint { idempotent: true }; + let packed = instruction.pack(); + assert_eq!(packed, vec![0, 1]); + + let unpacked = TokenWrapInstruction::unpack(&packed).unwrap(); + assert_eq!(unpacked, instruction); + + let instruction = TokenWrapInstruction::CreateMint { idempotent: false }; + let packed = instruction.pack(); + assert_eq!(packed, vec![0, 0]); + + let unpacked = TokenWrapInstruction::unpack(&packed).unwrap(); + assert_eq!(unpacked, instruction); +} + +#[test] +fn test_pack_unpack_wrap() { + let instruction = TokenWrapInstruction::Wrap { amount: 42 }; + let packed = instruction.pack(); + assert_eq!(packed, vec![1, 42, 0, 0, 0, 0, 0, 0, 0]); + + let unpacked = TokenWrapInstruction::unpack(&packed).unwrap(); + assert_eq!(unpacked, instruction); +} + +#[test] +fn test_pack_unpack_unwrap() { + let instruction = TokenWrapInstruction::Unwrap { amount: 100 }; + let packed = instruction.pack(); + assert_eq!(packed, vec![2, 100, 0, 0, 0, 0, 0, 0, 0]); + + let unpacked = TokenWrapInstruction::unpack(&packed).unwrap(); + assert_eq!(unpacked, instruction); +} + +#[test] +fn test_unpack_invalid_data() { + assert!(TokenWrapInstruction::unpack(&[]).is_err()); + assert!(TokenWrapInstruction::unpack(&[3]).is_err()); + assert!(TokenWrapInstruction::unpack(&[0]).is_err()); + assert!(TokenWrapInstruction::unpack(&[1, 0, 0, 0]).is_err()); + assert!(TokenWrapInstruction::unpack(&[2, 0, 0, 0]).is_err()); + assert!(TokenWrapInstruction::unpack(&[0]).is_err()); + assert!(TokenWrapInstruction::unpack(&[0, 1, 0]).is_err()); +} diff --git a/rustfmt.toml b/rustfmt.toml index 36789f4..b81d5e8 100644 --- a/rustfmt.toml +++ b/rustfmt.toml @@ -3,8 +3,11 @@ reorder_imports = true reorder_modules = true # == Nightly only. == -# imports_indent = "Block" -# imports_layout = "Mixed" -# imports_granularity = "Crate" -# group_imports = "Preserve" -# reorder_impl_items = false +comment_width = 80 +format_strings = true +group_imports = "One" +imports_indent = "Block" +imports_layout = "Mixed" +imports_granularity = "One" +reorder_impl_items = false +wrap_comments = true