diff --git a/solana/Cargo.lock b/solana/Cargo.lock index e45ef521..37246838 100644 --- a/solana/Cargo.lock +++ b/solana/Cargo.lock @@ -2,6 +2,31 @@ # It is not intended for manual editing. version = 3 +[[package]] +name = "Inflector" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe438c63458706e03479442743baae6c88256498e6431708f6dfc520a26515d3" +dependencies = [ + "lazy_static", + "regex", +] + +[[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.4.3" @@ -56,6 +81,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", + "getrandom 0.2.11", "once_cell", "version_check", "zerocopy", @@ -70,6 +96,27 @@ dependencies = [ "memchr", ] +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + +[[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 = "anchor-attribute-access-control" version = "0.30.1" @@ -139,7 +186,7 @@ dependencies = [ "anchor-syn", "anyhow", "bs58 0.5.0", - "heck", + "heck 0.3.3", "proc-macro2", "quote", "serde_json", @@ -215,7 +262,7 @@ checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" dependencies = [ "anchor-lang-idl-spec", "anyhow", - "heck", + "heck 0.3.3", "regex", "serde", "serde_json", @@ -239,12 +286,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" dependencies = [ "anchor-lang", - "spl-associated-token-account", - "spl-pod", + "spl-associated-token-account 3.0.2", + "spl-pod 0.2.2", "spl-token", - "spl-token-2022", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-2022 3.0.2", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", ] [[package]] @@ -256,7 +303,7 @@ dependencies = [ "anyhow", "bs58 0.5.0", "cargo_toml", - "heck", + "heck 0.3.3", "proc-macro2", "quote", "serde", @@ -266,11 +313,49 @@ dependencies = [ "thiserror", ] +[[package]] +name = "android-tzdata" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" + +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + +[[package]] +name = "ansi_term" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" +dependencies = [ + "winapi", +] + [[package]] name = "anyhow" -version = "1.0.79" +version = "1.0.97" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" + +[[package]] +name = "aquamarine" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "080e9890a082662b09c1ad45f567faeeb47f22b5fb23895fbe1e651e718e25ca" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "ark-bn254" @@ -313,7 +398,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint", + "num-bigint 0.4.4", "num-traits", "paste", "rustc_version", @@ -336,7 +421,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint", + "num-bigint 0.4.4", "num-traits", "proc-macro2", "quote", @@ -365,7 +450,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint", + "num-bigint 0.4.4", ] [[package]] @@ -401,19 +486,109 @@ version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +[[package]] +name = "ascii" +version = "0.9.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eab1c04a571841102f5345a8fc0f6bb3d31c315dec879b5c6e42e40ce7ffa34e" + +[[package]] +name = "asn1-rs" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f6fd5ddaf0351dff5b8da21b2fb4ff8e08ddd02857f0bf69c47639106c0fff0" +dependencies = [ + "asn1-rs-derive", + "asn1-rs-impl", + "displaydoc", + "nom", + "num-traits", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "asn1-rs-derive" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "726535892e8eae7e70657b4c8ea93d26b8553afb1ce617caee529ef96d7dee6c" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", + "synstructure 0.12.6", +] + +[[package]] +name = "asn1-rs-impl" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2777730b2039ac0f95f093556e61b6d26cebed5393ca6f152717777cec3a42ed" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "assert_matches" version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" +[[package]] +name = "async-channel" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "81953c529336010edd6d8e358f886d9581267795c61b19475b71314bffa46d35" +dependencies = [ + "concurrent-queue", + "event-listener", + "futures-core", +] + +[[package]] +name = "async-compression" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59a194f9d963d8099596278594b3107448656ba73831c9d8c783e613ce86da64" +dependencies = [ + "brotli", + "flate2", + "futures-core", + "memchr", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "async-mutex" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "479db852db25d9dbf6204e6cb6253698f175c15726470f78af0d918e99d6156e" +dependencies = [ + "event-listener", +] + +[[package]] +name = "async-trait" +version = "0.1.88" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "atty" version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -424,18 +599,51 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +[[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.13.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" + [[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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" + +[[package]] +name = "base64ct" +version = "1.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "89e25b6adfb930f02d1981565a6e5d9c547ac15a96606256d3b59040e5cd4ca3" + [[package]] name = "bincode" version = "1.3.3" @@ -445,6 +653,22 @@ dependencies = [ "serde", ] +[[package]] +name = "bitcoin-io" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b47c4ab7a93edb0c7198c5535ed9b52b63095f4e9b45279c6736cec4b856baf" + +[[package]] +name = "bitcoin_hashes" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb18c03d0db0247e147a21a6faafd5a7eb851c743db062de72018b6b7e8e4d16" +dependencies = [ + "bitcoin-io", + "hex-conservative", +] + [[package]] name = "bitflags" version = "1.3.2" @@ -574,7 +798,7 @@ dependencies = [ "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", "syn_derive", ] @@ -622,6 +846,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.4.0" @@ -670,7 +915,7 @@ checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", ] [[package]] @@ -679,6 +924,42 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" +[[package]] +name = "bytes" +version = "1.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.13+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225bff33b2141874fe80d71e07d6eec4f85c5c216453dd96388240f96e1acc14" +dependencies = [ + "cc", + "pkg-config", +] + +[[package]] +name = "caps" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190baaad529bcfbde9e1a19022c42781bdb6ff9de25721abdb8fd98c0807730b" +dependencies = [ + "libc", + "thiserror", +] + [[package]] name = "cargo_toml" version = "0.19.2" @@ -691,12 +972,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.83" +version = "1.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" dependencies = [ "jobserver", "libc", + "shlex", ] [[package]] @@ -717,7 +999,22 @@ version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ + "android-tzdata", + "iana-time-zone", + "js-sys", "num-traits", + "serde", + "wasm-bindgen", + "windows-targets 0.48.5", +] + +[[package]] +name = "chrono-humanize" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" +dependencies = [ + "chrono", ] [[package]] @@ -729,6 +1026,81 @@ dependencies = [ "generic-array", ] +[[package]] +name = "clap" +version = "2.34.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" +dependencies = [ + "ansi_term", + "atty", + "bitflags 1.3.2", + "strsim 0.8.0", + "textwrap 0.11.0", + "unicode-width 0.1.14", + "vec_map", +] + +[[package]] +name = "clap" +version = "3.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea181bf566f71cb9a5d17a59e1871af638180a18fb0035c92ae62b705207123" +dependencies = [ + "atty", + "bitflags 1.3.2", + "clap_lex", + "indexmap 1.9.3", + "once_cell", + "strsim 0.10.0", + "termcolor", + "textwrap 0.16.2", +] + +[[package]] +name = "clap_lex" +version = "0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2850f2f5a82cbf437dd5af4d49848fbdfc27c157c3d010345776f952765261c5" +dependencies = [ + "os_str_bytes", +] + +[[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 = "concurrent-queue" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ca0197aee26d1ae37445ee532fefce43251d24cc7c166799f4d46817f1d3973" +dependencies = [ + "crossbeam-utils", +] + +[[package]] +name = "console" +version = "0.15.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" +dependencies = [ + "encode_unicode", + "libc", + "once_cell", + "unicode-width 0.2.0", + "windows-sys 0.59.0", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -749,12 +1121,34 @@ dependencies = [ "web-sys", ] +[[package]] +name = "const-oid" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" + [[package]] name = "constant_time_eq" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[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.12" @@ -764,6 +1158,24 @@ 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-deque" version = "0.8.5" @@ -858,8 +1270,8 @@ dependencies = [ "ident_case", "proc-macro2", "quote", - "strsim", - "syn 2.0.48", + "strsim 0.10.0", + "syn 2.0.100", ] [[package]] @@ -870,18 +1282,70 @@ checksum = "836a9bbc7ad63342d6d6e7b815ccab164bc77a2d95d84bc3117a8c0d5c98e2d5" dependencies = [ "darling_core", "quote", - "syn 2.0.48", + "syn 2.0.100", ] [[package]] -name = "derivation-path" -version = "0.2.0" +name = "dashmap" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" - -[[package]] -name = "derivative" -version = "2.2.0" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" +dependencies = [ + "cfg-if", + "hashbrown 0.14.3", + "lock_api", + "once_cell", + "parking_lot_core", + "rayon", +] + +[[package]] +name = "data-encoding" +version = "2.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "575f75dfd25738df5b91b8e43e14d44bda14637a58fae779fd2b064f8bf3e010" + +[[package]] +name = "der" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6919815d73839e7ad218de758883aae3a257ba6759ce7a9992501efbb53d705c" +dependencies = [ + "const-oid", +] + +[[package]] +name = "der-parser" +version = "8.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dbd676fbbab537128ef0278adb5576cf363cff6aa22a7b24effe97347cfab61e" +dependencies = [ + "asn1-rs", + "displaydoc", + "nom", + "num-bigint 0.4.4", + "num-traits", + "rusticata-macros", +] + +[[package]] +name = "deranged" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28cfac68e08048ae1883171632c2aef3ebc555621ae56fbccce1cbf22dd7f058" +dependencies = [ + "powerfmt", +] + +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + +[[package]] +name = "derivative" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ @@ -890,6 +1354,24 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "dialoguer" +version = "0.10.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59c6f2989294b9a498d3ad5491a79c6deb604617378e1cdc4bfc1c1361fe2f87" +dependencies = [ + "console", + "shell-words", + "tempfile", + "zeroize", +] + +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.9.0" @@ -910,6 +1392,82 @@ dependencies = [ "subtle", ] +[[package]] +name = "dir-diff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +dependencies = [ + "walkdir", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" +dependencies = [ + "libc", + "redox_users", + "winapi", +] + +[[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.100", +] + +[[package]] +name = "dlopen2" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09b4f5f101177ff01b8ec4ecc81eead416a8aa42819a2869311b3420fa114ffa" +dependencies = [ + "dlopen2_derive", + "libc", + "once_cell", + "winapi", +] + +[[package]] +name = "dlopen2_derive" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + +[[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" @@ -945,12 +1503,72 @@ dependencies = [ "sha2 0.10.8", ] +[[package]] +name = "educe" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0f0042ff8246a363dbe77d2ceedb073339e85a804b9a47636c6e016a9a32c05f" +dependencies = [ + "enum-ordinalize", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "either" version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a26ae43d7bcc3b814de94796a5e736d4029efb0ee900c12e2d54c993ad1a1e07" +[[package]] +name = "encode_unicode" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" + +[[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.100", +] + +[[package]] +name = "enum-ordinalize" +version = "3.1.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" +dependencies = [ + "num-bigint 0.4.4", + "num-traits", + "proc-macro2", + "quote", + "syn 2.0.100", +] + [[package]] name = "env_logger" version = "0.9.3" @@ -971,1449 +1589,4346 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] -name = "feature-probe" -version = "0.1.1" +name = "errno" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" +checksum = "33d852cb9b869c2a9b3df2f71a3074817f01e1844f839a144f5fcef059a4eb5d" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] [[package]] -name = "fnv" -version = "1.0.7" +name = "event-listener" +version = "2.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] -name = "generic-array" -version = "0.14.7" +name = "fastrand" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", -] +checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] -name = "getrandom" -version = "0.1.16" +name = "feature-probe" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] +checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" [[package]] -name = "getrandom" -version = "0.2.11" +name = "filetime" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", - "js-sys", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", + "libredox", + "windows-sys 0.59.0", ] [[package]] -name = "hashbrown" -version = "0.11.2" +name = "flate2" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "11faaf5a5236997af9848be0bef4db95824b1d534ebc64d0f0c6cf3e67bd38dc" dependencies = [ - "ahash 0.7.8", + "crc32fast", + "miniz_oxide", ] [[package]] -name = "hashbrown" -version = "0.13.2" +name = "float-cmp" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ - "ahash 0.8.11", + "num-traits", ] [[package]] -name = "hashbrown" -version = "0.14.3" +name = "fnv" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" +checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "heck" -version = "0.3.3" +name = "form_urlencoded" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" +checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" dependencies = [ - "unicode-segmentation", + "percent-encoding", ] [[package]] -name = "hermit-abi" -version = "0.1.19" +name = "fragile" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" +checksum = "28dd6caf6059519a65843af8fe2a3ae298b14b80179855aeb4adc2c1934ee619" + +[[package]] +name = "futures" +version = "0.3.31" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" dependencies = [ - "libc", + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", ] [[package]] -name = "hex" -version = "0.4.3" +name = "futures-channel" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" +dependencies = [ + "futures-core", + "futures-sink", +] [[package]] -name = "hex-literal" -version = "0.4.1" +name = "futures-core" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" +checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" [[package]] -name = "hmac" -version = "0.8.1" +name = "futures-executor" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" +checksum = "1e28d1d997f585e54aebc3f97d39e72338912123a67330d723fdbb564d646c9f" dependencies = [ - "crypto-mac", - "digest 0.9.0", + "futures-core", + "futures-task", + "futures-util", ] [[package]] -name = "hmac" -version = "0.12.1" +name = "futures-io" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] +checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" [[package]] -name = "hmac-drbg" -version = "0.3.0" +name = "futures-macro" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" +checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] -name = "humantime" -version = "2.1.0" +name = "futures-sink" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" [[package]] -name = "ident_case" -version = "1.0.1" +name = "futures-task" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" +checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" [[package]] -name = "im" -version = "15.1.0" +name = "futures-util" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" +checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" +dependencies = [ + "futures-channel", + "futures-core", + "futures-io", + "futures-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", +] + +[[package]] +name = "generic-array" +version = "0.14.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", "serde", - "sized-chunks", "typenum", "version_check", ] [[package]] -name = "indexmap" -version = "2.1.0" +name = "gethostname" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d530e1a18b1cb4c484e6e34556a0d948706958449fca0cab753d649f2bce3d1f" +checksum = "c1ebd34e35c46e00bb73e81363248d627782724609fe1b6396f553f68fe3862e" dependencies = [ - "equivalent", - "hashbrown 0.14.3", + "libc", + "winapi", ] [[package]] -name = "itertools" -version = "0.10.5" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "either", + "cfg-if", + "js-sys", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] -name = "itoa" -version = "1.0.10" +name = "getrandom" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" +checksum = "fe9006bed769170c11f845cf00c7c1e9092aeb3f268e007c3e760ac68008070f" +dependencies = [ + "cfg-if", + "js-sys", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "wasm-bindgen", +] [[package]] -name = "jobserver" -version = "0.1.27" +name = "getrandom" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c37f63953c4c63420ed5fd3d6d398c719489b9f872b9fa683262f8edd363c7d" +checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" dependencies = [ + "cfg-if", "libc", + "r-efi", + "wasi 0.14.2+wasi-0.2.4", ] [[package]] -name = "js-sys" -version = "0.3.68" +name = "gimli" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" -dependencies = [ - "wasm-bindgen", -] +checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" [[package]] -name = "keccak" -version = "0.1.4" +name = "goblin" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" +checksum = "a7666983ed0dd8d21a6f6576ee00053ca0926fb281a5522577a4dbd0f1b54143" dependencies = [ - "cpufeatures", + "log", + "plain", + "scroll", ] [[package]] -name = "lazy_static" -version = "1.4.0" +name = "h2" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.8.0", + "slab", + "tokio", + "tokio-util 0.7.14", + "tracing", +] [[package]] -name = "libc" -version = "0.2.152" +name = "hash32" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13e3bf6590cbc649f4d1a3eefc9d5d6eb746f5200ffb04e5e142700b8faa56e7" +checksum = "b0c35f58762feb77d74ebe43bdbc3210f09be9fe6742234d573bacc26ed92b67" +dependencies = [ + "byteorder", +] [[package]] -name = "libsecp256k1" -version = "0.6.0" +name = "hashbrown" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" +checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", + "ahash 0.7.8", ] [[package]] -name = "libsecp256k1-core" -version = "0.2.2" +name = "hashbrown" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", + "ahash 0.7.8", ] [[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" +name = "hashbrown" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" +checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "libsecp256k1-core", + "ahash 0.8.11", ] [[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" +name = "hashbrown" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core", -] +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" [[package]] -name = "light-poseidon" -version = "0.2.0" +name = "hashbrown" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" -dependencies = [ - "ark-bn254", - "ark-ff", - "num-bigint", - "thiserror", -] +checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" [[package]] -name = "liquidity-layer-common-solana" -version = "0.0.0" +name = "heck" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" dependencies = [ - "anchor-lang", - "cfg-if", - "liquidity-layer-messages", - "solana-program", - "wormhole-cctp-solana", - "wormhole-solana-consts", + "unicode-segmentation", ] [[package]] -name = "liquidity-layer-messages" -version = "0.0.0" -dependencies = [ - "wormhole-io", - "wormhole-raw-vaas", -] +name = "heck" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" [[package]] -name = "lock_api" -version = "0.4.11" +name = "hermit-abi" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" +checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" dependencies = [ - "autocfg", - "scopeguard", + "libc", ] [[package]] -name = "log" -version = "0.4.20" +name = "hermit-abi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" [[package]] -name = "matching-engine" -version = "0.0.0" +name = "hex" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hex-conservative" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5313b072ce3c597065a808dbf612c4c8e8590bdbf8b579508bf7a762c5eae6cd" dependencies = [ - "anchor-lang", - "anchor-spl", - "cfg-if", - "hex", - "hex-literal", - "liquidity-layer-common-solana", - "ruint", - "solana-program", - "wormhole-solana-utils", + "arrayvec", ] [[package]] -name = "memchr" -version = "2.7.1" +name = "hex-literal" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" +checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" [[package]] -name = "memmap2" -version = "0.5.10" +name = "histogram" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] +checksum = "12cb882ccb290b8646e554b157ab0b71e64e8d5bef775cd66b6531e52d302669" [[package]] -name = "memoffset" -version = "0.9.0" +name = "hmac" +version = "0.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" dependencies = [ - "autocfg", + "crypto-mac", + "digest 0.9.0", ] [[package]] -name = "merlin" -version = "3.0.0" +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" dependencies = [ - "byteorder", - "keccak", - "rand_core 0.6.4", - "zeroize", + "digest 0.10.7", ] [[package]] -name = "num-bigint" -version = "0.4.4" +name = "hmac-drbg" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ - "autocfg", - "num-integer", - "num-traits", + "digest 0.9.0", + "generic-array", + "hmac 0.8.1", ] [[package]] -name = "num-derive" -version = "0.3.3" +name = "http" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", + "bytes", + "fnv", + "itoa", ] [[package]] -name = "num-derive" -version = "0.4.2" +name = "http-body" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", + "bytes", + "http", + "pin-project-lite", ] [[package]] -name = "num-integer" -version = "0.1.45" +name = "httparse" +version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" -dependencies = [ - "autocfg", - "num-traits", -] +checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] -name = "num-traits" -version = "0.2.17" +name = "httpdate" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" -dependencies = [ - "autocfg", -] +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] -name = "num_enum" -version = "0.6.1" +name = "humantime" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" + +[[package]] +name = "hyper" +version = "0.14.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41dfc780fdec9373c01bae43289ea34c972e40ee3c9f6b3c8801a35f35586ce7" dependencies = [ - "num_enum_derive 0.6.1", + "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 = "num_enum" -version = "0.7.2" +name = "hyper-rustls" +version = "0.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" dependencies = [ - "num_enum_derive 0.7.2", + "futures-util", + "http", + "hyper", + "rustls", + "tokio", + "tokio-rustls", ] [[package]] -name = "num_enum_derive" -version = "0.6.1" +name = "iana-time-zone" +version = "0.1.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "b2fd658b06e56721792c5df4475705b6cda790e9298d19d2f8af083457bcd127" dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 2.0.48", + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "log", + "wasm-bindgen", + "windows-core", ] [[package]] -name = "num_enum_derive" -version = "0.7.2" +name = "iana-time-zone-haiku" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.48", + "cc", ] [[package]] -name = "once_cell" -version = "1.19.0" +name = "icu_collections" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" +checksum = "db2fa452206ebee18c4b5c2274dbf1de17008e874b4dc4f0aea9d01ca79e4526" +dependencies = [ + "displaydoc", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "opaque-debug" -version = "0.3.0" +name = "icu_locid" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "13acbb8371917fc971be86fc8057c41a64b521c184808a698c02acc242dbf637" +dependencies = [ + "displaydoc", + "litemap", + "tinystr", + "writeable", + "zerovec", +] [[package]] -name = "parking_lot" -version = "0.12.1" +name = "icu_locid_transform" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "01d11ac35de8e40fdeda00d9e1e9d92525f3f9d887cdd7aa81d727596788b54e" dependencies = [ - "lock_api", - "parking_lot_core", + "displaydoc", + "icu_locid", + "icu_locid_transform_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "parking_lot_core" -version = "0.9.9" +name = "icu_locid_transform_data" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +checksum = "7515e6d781098bf9f7205ab3fc7e9709d34554ae0b21ddbcb5febfa4bc7df11d" + +[[package]] +name = "icu_normalizer" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "19ce3e0da2ec68599d193c93d088142efd7f9c5d6fc9b803774855747dc6a84f" dependencies = [ - "cfg-if", - "libc", - "redox_syscall", + "displaydoc", + "icu_collections", + "icu_normalizer_data", + "icu_properties", + "icu_provider", "smallvec", - "windows-targets", + "utf16_iter", + "utf8_iter", + "write16", + "zerovec", ] [[package]] -name = "paste" -version = "1.0.14" +name = "icu_normalizer_data" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "c5e8338228bdc8ab83303f16b797e177953730f601a96c25d10cb3ab0daa0cb7" [[package]] -name = "pbkdf2" -version = "0.4.0" +name = "icu_properties" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +checksum = "93d6020766cfc6302c15dbbc9c8778c37e62c14427cb7f6e601d849e092aeef5" dependencies = [ - "crypto-mac", + "displaydoc", + "icu_collections", + "icu_locid_transform", + "icu_properties_data", + "icu_provider", + "tinystr", + "zerovec", ] [[package]] -name = "pbkdf2" -version = "0.11.0" +name = "icu_properties_data" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] +checksum = "85fb8799753b75aee8d2a21d7c14d9f38921b54b3dbda10f5a3c7a7b82dba5e2" [[package]] -name = "percent-encoding" -version = "2.3.1" +name = "icu_provider" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "6ed421c8a8ef78d3e2dbc98a973be2f3770cb42b606e3ab18d6237c4dfde68d9" +dependencies = [ + "displaydoc", + "icu_locid", + "icu_provider_macros", + "stable_deref_trait", + "tinystr", + "writeable", + "yoke", + "zerofrom", + "zerovec", +] [[package]] -name = "polyval" -version = "0.5.3" +name = "icu_provider_macros" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +checksum = "1ec89e9337638ecdc08744df490b221a7399bf8d164eb52a665454e60e075ad6" dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] -name = "ppv-lite86" -version = "0.2.17" +name = "ident_case" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] -name = "proc-macro-crate" -version = "0.1.5" +name = "idna" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +checksum = "686f825264d630750a544639377bae737628043f20d38bbc029e8f29ea968a7e" dependencies = [ - "toml 0.5.11", + "idna_adapter", + "smallvec", + "utf8_iter", ] [[package]] -name = "proc-macro-crate" -version = "1.3.1" +name = "idna_adapter" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +checksum = "daca1df1c957320b2cf139ac61e7bd64fed304c5040df000a745aa1de3b4ef71" dependencies = [ - "once_cell", - "toml_edit 0.19.15", + "icu_normalizer", + "icu_properties", ] [[package]] -name = "proc-macro-crate" -version = "3.1.0" +name = "im" +version = "15.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" dependencies = [ - "toml_edit 0.21.1", + "bitmaps", + "rand_core 0.6.4", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", ] [[package]] -name = "proc-macro-error" -version = "1.0.4" +name = "include_dir" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", + "include_dir_macros", ] [[package]] -name = "proc-macro-error-attr" -version = "1.0.4" +name = "include_dir_macros" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", - "version_check", ] [[package]] -name = "proc-macro2" -version = "1.0.78" +name = "index_list" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] +checksum = "fa38453685e5fe724fd23ff6c1a158c1e2ca21ce0c2718fa11e96e70e99fd4de" [[package]] -name = "qstring" -version = "0.7.2" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "percent-encoding", + "autocfg", + "hashbrown 0.12.3", ] [[package]] -name = "qualifier_attr" -version = "0.2.2" +name = "indexmap" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" +checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", + "equivalent", + "hashbrown 0.15.2", ] [[package]] -name = "quote" -version = "1.0.35" +name = "indicatif" +version = "0.17.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "183b3088984b400f4cfac3620d5e076c84da5364016b4f49473de574b2586235" dependencies = [ - "proc-macro2", + "console", + "number_prefix", + "portable-atomic", + "unicode-width 0.2.0", + "web-time", ] [[package]] -name = "rand" -version = "0.7.3" +name = "ipnet" +version = "2.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] +checksum = "469fb0b9cefa57e3ef31275ee7cacb78f2fdca44e4765491884a2b119d4eb130" [[package]] -name = "rand" -version = "0.8.5" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", + "either", ] [[package]] -name = "rand_chacha" -version = "0.2.2" +name = "itoa" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] +checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" [[package]] -name = "rand_chacha" -version = "0.3.1" +name = "jobserver" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", + "libc", ] [[package]] -name = "rand_core" -version = "0.5.1" +name = "js-sys" +version = "0.3.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" +checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" dependencies = [ - "getrandom 0.1.16", + "wasm-bindgen", ] [[package]] -name = "rand_core" -version = "0.6.4" +name = "jsonrpc-core" +version = "18.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +checksum = "14f7f76aef2d054868398427f6c54943cf3d1caa9a7ec7d0c38d69df97a965eb" dependencies = [ - "getrandom 0.2.11", + "futures", + "futures-executor", + "futures-util", + "log", + "serde", + "serde_derive", + "serde_json", ] [[package]] -name = "rand_hc" -version = "0.2.0" +name = "keccak" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" +checksum = "8f6d5ed8676d904364de097082f4e7d240b571b67989ced0240f08b7f966f940" dependencies = [ - "rand_core 0.5.1", + "cpufeatures", ] [[package]] -name = "rand_xoshiro" -version = "0.6.0" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] -name = "rayon" -version = "1.8.0" +name = "libc" +version = "0.2.171" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c27db03db7734835b3f53954b534c91069375ce6ccaa2e065441e07d9b6cdb1" -dependencies = [ - "either", - "rayon-core", -] +checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" [[package]] -name = "rayon-core" -version = "1.12.0" +name = "libredox" +version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ce3fb6ad83f861aac485e76e1985cd109d9a3713802152be56c3b1f0e0658ed" +checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "crossbeam-deque", - "crossbeam-utils", + "bitflags 2.4.2", + "libc", + "redox_syscall 0.5.10", ] [[package]] -name = "redox_syscall" -version = "0.4.1" +name = "libsecp256k1" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" dependencies = [ - "bitflags 1.3.2", + "arrayref", + "base64 0.12.3", + "digest 0.9.0", + "hmac-drbg", + "libsecp256k1-core", + "libsecp256k1-gen-ecmult", + "libsecp256k1-gen-genmult", + "rand 0.7.3", + "serde", + "sha2 0.9.9", + "typenum", ] [[package]] -name = "regex" -version = "1.10.2" +name = "libsecp256k1-core" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "380b951a9c5e80ddfd6136919eef32310721aa4aacd4889a8d39124b026ab343" +checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", + "crunchy", + "digest 0.9.0", + "subtle", ] [[package]] -name = "regex-automata" -version = "0.4.3" +name = "libsecp256k1-gen-ecmult" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f804c7828047e88b2d32e2d7fe5a105da8ee3264f01902f796c8e067dc2483f" +checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", + "libsecp256k1-core", ] [[package]] -name = "regex-syntax" -version = "0.8.2" +name = "libsecp256k1-gen-genmult" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" +checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" +dependencies = [ + "libsecp256k1-core", +] [[package]] -name = "ruint" -version = "1.9.0" +name = "light-poseidon" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77e1574d439643c8962edf612a888e7cc5581bcdf36cb64e6bc88466b03b2daa" +checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ - "ruint-macro", + "ark-bn254", + "ark-ff", + "num-bigint 0.4.4", "thiserror", ] [[package]] -name = "ruint-macro" -version = "1.1.0" +name = "linux-raw-sys" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" +checksum = "fe7db12097d22ec582439daf8618b8fdd1a7bef6270e9af3b1ebcd30893cf413" [[package]] -name = "rustc-hash" -version = "1.1.0" +name = "liquidity-layer-common-solana" +version = "0.0.0" +dependencies = [ + "anchor-lang", + "cfg-if", + "liquidity-layer-messages", + "solana-program", + "wormhole-cctp-solana", + "wormhole-solana-consts", +] + +[[package]] +name = "liquidity-layer-messages" +version = "0.0.0" +dependencies = [ + "wormhole-io", + "wormhole-raw-vaas", +] + +[[package]] +name = "litemap" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" +checksum = "23fb14cb19457329c82206317a5663005a4d404783dc74f4252769b0d5f42856" [[package]] -name = "rustc_version" -version = "0.4.0" +name = "lock_api" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" dependencies = [ - "semver", + "autocfg", + "scopeguard", ] [[package]] -name = "rustversion" -version = "1.0.14" +name = "log" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] -name = "ryu" -version = "1.0.16" +name = "lru" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] [[package]] -name = "scopeguard" -version = "1.2.0" +name = "lz4" +version = "1.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" +checksum = "a20b523e860d03443e98350ceaac5e71c6ba89aea7d960769ec3ce37f4de5af4" +dependencies = [ + "lz4-sys", +] [[package]] -name = "semver" -version = "1.0.21" +name = "lz4-sys" +version = "1.11.1+lz4-1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" +checksum = "6bd8c0d6c6ed0cd30b3652886bb8711dc4bb01d637a68105a3d5158039b418e6" +dependencies = [ + "cc", + "libc", +] [[package]] -name = "serde" -version = "1.0.195" +name = "matchers" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63261df402c67811e9ac6def069e4786148c4563f4b50fd4bf30aa370d626b02" +checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" dependencies = [ - "serde_derive", + "regex-automata 0.1.10", ] [[package]] -name = "serde_bytes" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +name = "matching-engine" +version = "0.0.0" dependencies = [ + "anchor-lang", + "anchor-spl", + "anyhow", + "base64 0.22.1", + "bincode", + "bs58 0.5.0", + "bytemuck", + "cfg-if", + "hex", + "hex-literal", + "lazy_static", + "liquidity-layer-common-solana", + "num-traits", + "once_cell", + "ruint", + "secp256k1", "serde", + "serde_json", + "solana-cli-output", + "solana-program", + "solana-program-test", + "solana-sdk", + "tracing", + "tracing-log", + "tracing-subscriber", + "wormhole-io", + "wormhole-solana-utils", + "wormhole-svm-definitions", + "wormhole-svm-shim", ] [[package]] -name = "serde_derive" -version = "1.0.195" +name = "memchr" +version = "2.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" + +[[package]] +name = "memmap2" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46fe8f8603d81ba86327b23a2e9cdf49e1255fb94a4c5f297f6ee0547178ea2c" +checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.48", + "libc", ] [[package]] -name = "serde_json" -version = "1.0.111" +name = "memoffset" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "176e46fa42316f18edd598015a5166857fc835ec732f5215eac6b7bdbf0a84f4" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" dependencies = [ - "itoa", - "ryu", - "serde", + "autocfg", ] [[package]] -name = "serde_spanned" -version = "0.6.5" +name = "memoffset" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" dependencies = [ - "serde", + "autocfg", ] [[package]] -name = "serde_with" -version = "2.3.3" +name = "merlin" +version = "3.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" dependencies = [ - "serde", - "serde_with_macros", + "byteorder", + "keccak", + "rand_core 0.6.4", + "zeroize", ] [[package]] -name = "serde_with_macros" -version = "2.3.3" +name = "mime" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + +[[package]] +name = "minimal-lexical" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" + +[[package]] +name = "miniz_oxide" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e3e04debbb59698c15bacbb6d93584a8c0ca9cc3213cb423d31f760d8843ce5" dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.48", + "adler2", ] [[package]] -name = "sha2" -version = "0.9.9" +name = "mio" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", + "libc", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.52.0", ] [[package]] -name = "sha2" -version = "0.10.8" +name = "mockall" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ "cfg-if", - "cpufeatures", - "digest 0.10.7", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", ] [[package]] -name = "sha3" -version = "0.9.1" +name = "mockall_derive" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "sha3" -version = "0.10.8" +name = "modular-bitfield" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" dependencies = [ - "digest 0.10.7", - "keccak", + "modular-bitfield-impl", + "static_assertions", ] [[package]] -name = "signature" -version = "1.6.4" +name = "modular-bitfield-impl" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] -name = "siphasher" -version = "0.3.11" +name = "nix" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", + "cfg-if", + "libc", + "memoffset 0.7.1", + "pin-utils", +] [[package]] -name = "sized-chunks" -version = "0.6.5" +name = "nom" +version = "7.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" dependencies = [ - "bitmaps", - "typenum", + "memchr", + "minimal-lexical", ] [[package]] -name = "smallvec" -version = "1.11.2" +name = "normalize-line-endings" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dccd0940a2dcdf68d092b8cbab7dc0ad8fa938bf95787e1b916b0e3d0e8e970" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] -name = "solana-frozen-abi" -version = "1.18.15" +name = "nu-ansi-term" +version = "0.46.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c00a6aca244dfa904e2c4a26406ba7b0987344ceaec932f3cda0b35eff0babc" +checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" dependencies = [ - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "either", - "generic-array", - "im", - "lazy_static", - "log", - "memmap2", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror", + "overload", + "winapi", ] [[package]] -name = "solana-frozen-abi-macro" -version = "1.18.15" +name = "num" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bed58b27b9b8877893f69bc5cfd1c62e984315e0229d83cf8a32ad0933c0d6c9" +checksum = "b8536030f9fea7127f841b45bb6243b27255787fb4eb83958aa1ef9d2fdc0c36" dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.48", + "num-bigint 0.2.6", + "num-complex", + "num-integer", + "num-iter", + "num-rational", + "num-traits", ] [[package]] -name = "solana-logger" -version = "1.18.15" +name = "num-bigint" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee2daf61ae582edf9634adf8e5021faf002df0d3f69078ecbcd6c7b41bdf833" +checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "env_logger", - "lazy_static", - "log", + "autocfg", + "num-integer", + "num-traits", ] [[package]] -name = "solana-program" -version = "1.18.15" +name = "num-bigint" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f4908f360900d0a1aa81c7bad7937c78f0825c3f08ff0b22f1de0e43e5946f2" +checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "base64 0.21.7", + "autocfg", + "num-integer", + "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-conv" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" + +[[package]] +name = "num-derive" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "num-derive" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + +[[package]] +name = "num-iter" +version = "0.1.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +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.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39e3200413f237f41ab11ad6d161bc7239c84dcb631773ccd7de3dfe4b5c267c" +dependencies = [ + "autocfg", +] + +[[package]] +name = "num_cpus" +version = "1.16.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" +dependencies = [ + "hermit-abi 0.3.9", + "libc", +] + +[[package]] +name = "num_enum" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7a015b430d3c108a207fd776d2e2196aaf8b1cf8cf93253e3a097ff3085076a1" +dependencies = [ + "num_enum_derive 0.6.1", +] + +[[package]] +name = "num_enum" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +dependencies = [ + "num_enum_derive 0.7.2", +] + +[[package]] +name = "num_enum_derive" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +dependencies = [ + "proc-macro-crate 1.3.1", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "num_enum_derive" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +dependencies = [ + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "number_prefix" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" + +[[package]] +name = "object" +version = "0.36.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" +dependencies = [ + "memchr", +] + +[[package]] +name = "oid-registry" +version = "0.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bedf36ffb6ba96c2eb7144ef6270557b52e54b20c0a8e1eb2ff99a6c6959bff" +dependencies = [ + "asn1-rs", +] + +[[package]] +name = "once_cell" +version = "1.19.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" + +[[package]] +name = "openssl-probe" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" + +[[package]] +name = "opentelemetry" +version = "0.17.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6105e89802af13fdf48c49d7646d3b533a70e536d818aae7e78ba0433d01acb8" +dependencies = [ + "async-trait", + "crossbeam-channel", + "futures-channel", + "futures-executor", + "futures-util", + "js-sys", + "lazy_static", + "percent-encoding", + "pin-project", + "rand 0.8.5", + "thiserror", +] + +[[package]] +name = "os_str_bytes" +version = "6.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" + +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "overload" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" + +[[package]] +name = "parking_lot" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +dependencies = [ + "lock_api", + "parking_lot_core", +] + +[[package]] +name = "parking_lot_core" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "smallvec", + "windows-targets 0.48.5", +] + +[[package]] +name = "paste" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" + +[[package]] +name = "pbkdf2" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" +dependencies = [ + "crypto-mac", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest 0.10.7", +] + +[[package]] +name = "pem" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8835c273a76a90455d7344889b0964598e3316e2a79ede8e36f16bdcf2228b8" +dependencies = [ + "base64 0.13.1", +] + +[[package]] +name = "percent-encoding" +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" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" +dependencies = [ + "pin-project-internal", +] + +[[package]] +name = "pin-project-internal" +version = "1.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[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 = "pkcs8" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cabda3fb821068a9a4fab19a683eac3af12edf0f34b94a8be53c4972b8149d0" +dependencies = [ + "der", + "spki", + "zeroize", +] + +[[package]] +name = "pkg-config" +version = "0.3.32" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" + +[[package]] +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "polyval" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" +dependencies = [ + "cfg-if", + "cpufeatures", + "opaque-debug", + "universal-hash", +] + +[[package]] +name = "portable-atomic" +version = "1.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e" + +[[package]] +name = "powerfmt" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "727e462b119fe9c93fd0eb1429a5f7647394014cf3c04ab2c0350eeb09095ffa" + +[[package]] +name = "predicates-tree" +version = "1.0.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72dd2d6d381dfb73a193c7fca536518d7caee39fc8503f74e7dc0be0531b425c" +dependencies = [ + "predicates-core", + "termtree", +] + +[[package]] +name = "pretty-hex" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c6fa0831dd7cc608c38a5e323422a0077678fa5744aa2be4ad91c4ece8eec8d5" + +[[package]] +name = "proc-macro-crate" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" +dependencies = [ + "toml 0.5.11", +] + +[[package]] +name = "proc-macro-crate" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" +dependencies = [ + "once_cell", + "toml_edit 0.19.15", +] + +[[package]] +name = "proc-macro-crate" +version = "3.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +dependencies = [ + "toml_edit 0.21.1", +] + +[[package]] +name = "proc-macro-error" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" +dependencies = [ + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn 1.0.109", + "version_check", +] + +[[package]] +name = "proc-macro-error-attr" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" +dependencies = [ + "proc-macro2", + "quote", + "version_check", +] + +[[package]] +name = "proc-macro2" +version = "1.0.94" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +dependencies = [ + "unicode-ident", +] + +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + +[[package]] +name = "qualifier_attr" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "quinn" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cc2c5017e4b43d5995dcea317bc46c1e09404c0a9664d2908f7f02dfe943d75" +dependencies = [ + "bytes", + "pin-project-lite", + "quinn-proto", + "quinn-udp", + "rustc-hash", + "rustls", + "thiserror", + "tokio", + "tracing", +] + +[[package]] +name = "quinn-proto" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" +dependencies = [ + "bytes", + "rand 0.8.5", + "ring 0.16.20", + "rustc-hash", + "rustls", + "rustls-native-certs", + "slab", + "thiserror", + "tinyvec", + "tracing", +] + +[[package]] +name = "quinn-udp" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "055b4e778e8feb9f93c4e439f71dc2156ef13360b432b799e179a8c4cdf0b1d7" +dependencies = [ + "bytes", + "libc", + "socket2", + "tracing", + "windows-sys 0.48.0", +] + +[[package]] +name = "quote" +version = "1.0.35" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +dependencies = [ + "proc-macro2", +] + +[[package]] +name = "r-efi" +version = "5.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" + +[[package]] +name = "rand" +version = "0.7.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc", +] + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha 0.3.1", + "rand_core 0.6.4", +] + +[[package]] +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.11", +] + +[[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 = "rand_xoshiro" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" +dependencies = [ + "rand_core 0.6.4", +] + +[[package]] +name = "rayon" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" +dependencies = [ + "crossbeam-deque", + "crossbeam-utils", +] + +[[package]] +name = "rcgen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffbe84efe2f38dea12e9bfc1f65377fdf03e53a18cb3b995faedf7934c7e785b" +dependencies = [ + "pem", + "ring 0.16.20", + "time", + "yasna", +] + +[[package]] +name = "redox_syscall" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" +dependencies = [ + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +dependencies = [ + "bitflags 2.4.2", +] + +[[package]] +name = "redox_users" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" +dependencies = [ + "getrandom 0.2.11", + "libredox", + "thiserror", +] + +[[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 0.4.9", + "regex-syntax 0.8.5", +] + +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +dependencies = [ + "regex-syntax 0.6.29", +] + +[[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 0.8.5", +] + +[[package]] +name = "regex-syntax" +version = "0.6.29" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" + +[[package]] +name = "regex-syntax" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" + +[[package]] +name = "reqwest" +version = "0.11.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" +dependencies = [ + "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 0.7.14", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", + "webpki-roots 0.25.4", + "winreg", +] + +[[package]] +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" +dependencies = [ + "cc", + "libc", + "once_cell", + "spin", + "untrusted 0.7.1", + "web-sys", + "winapi", +] + +[[package]] +name = "ring" +version = "0.17.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" +dependencies = [ + "cc", + "cfg-if", + "getrandom 0.2.11", + "libc", + "untrusted 0.9.0", + "windows-sys 0.52.0", +] + +[[package]] +name = "rpassword" +version = "7.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80472be3c897911d0137b2d2b9055faf6eeac5b14e324073d83bc17b191d7e3f" +dependencies = [ + "libc", + "rtoolbox", + "windows-sys 0.48.0", +] + +[[package]] +name = "rtoolbox" +version = "0.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c247d24e63230cdb56463ae328478bd5eac8b8faa8c69461a77e8e323afac90e" +dependencies = [ + "libc", + "windows-sys 0.48.0", +] + +[[package]] +name = "ruint" +version = "1.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e1574d439643c8962edf612a888e7cc5581bcdf36cb64e6bc88466b03b2daa" +dependencies = [ + "ruint-macro", + "thiserror", +] + +[[package]] +name = "ruint-macro" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e666a5496a0b2186dbcd0ff6106e29e093c15591bde62c20d3842007c6978a09" + +[[package]] +name = "rustc-demangle" +version = "0.1.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" + +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + +[[package]] +name = "rustc_version" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +dependencies = [ + "semver", +] + +[[package]] +name = "rusticata-macros" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "faf0c4a6ece9950b9abdb62b1cfcf2a68b3b67a10ba445b3bb85be2a293d0632" +dependencies = [ + "nom", +] + +[[package]] +name = "rustix" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e56a18552996ac8d29ecc3b190b4fdbb2d91ca4ec396de7bbffaf43f3d637e96" +dependencies = [ + "bitflags 2.4.2", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.59.0", +] + +[[package]] +name = "rustls" +version = "0.21.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f56a14d1f48b391359b22f731fd4bd7e43c97f3c50eee276f3aa09c94784d3e" +dependencies = [ + "log", + "ring 0.17.14", + "rustls-webpki", + "sct", +] + +[[package]] +name = "rustls-native-certs" +version = "0.6.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" +dependencies = [ + "openssl-probe", + "rustls-pemfile", + "schannel", + "security-framework", +] + +[[package]] +name = "rustls-pemfile" +version = "1.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" +dependencies = [ + "base64 0.21.7", +] + +[[package]] +name = "rustls-webpki" +version = "0.101.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "rustversion" +version = "1.0.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" + +[[package]] +name = "ryu" +version = "1.0.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f98d2aa92eebf49b69786be48e4477826b256916e84a57ff2a4f21923b48eb4c" + +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + +[[package]] +name = "schannel" +version = "0.1.27" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" +dependencies = [ + "windows-sys 0.59.0", +] + +[[package]] +name = "scopeguard" +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" +dependencies = [ + "scroll_derive", +] + +[[package]] +name = "scroll_derive" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "sct" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" +dependencies = [ + "ring 0.17.14", + "untrusted 0.9.0", +] + +[[package]] +name = "secp256k1" +version = "0.30.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b50c5943d326858130af85e049f2661ba3c78b26589b8ab98e65e80ae44a1252" +dependencies = [ + "bitcoin_hashes", + "rand 0.8.5", + "secp256k1-sys", +] + +[[package]] +name = "secp256k1-sys" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d4387882333d3aa8cb20530a17c69a3752e97837832f34f6dccc760e715001d9" +dependencies = [ + "cc", +] + +[[package]] +name = "security-framework" +version = "2.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-foundation-sys", + "libc", + "security-framework-sys", +] + +[[package]] +name = "security-framework-sys" +version = "2.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" +dependencies = [ + "core-foundation-sys", + "libc", +] + +[[package]] +name = "semver" +version = "1.0.21" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b97ed7a9823b74f99c7742f5336af7be5ecd3eeafcb1507d1fa93347b1d589b0" + +[[package]] +name = "seqlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5c67b6f14ecc5b86c66fa63d76b5092352678545a8a3cdae80aef5128371910" +dependencies = [ + "parking_lot", +] + +[[package]] +name = "serde" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" +dependencies = [ + "serde_derive", +] + +[[package]] +name = "serde_bytes" +version = "0.11.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +dependencies = [ + "serde", +] + +[[package]] +name = "serde_derive" +version = "1.0.219" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "serde_json" +version = "1.0.140" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +dependencies = [ + "itoa", + "memchr", + "ryu", + "serde", +] + +[[package]] +name = "serde_spanned" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb3622f419d1296904700073ea6cc23ad690adbd66f13ea683df73298736f0c1" +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 = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +dependencies = [ + "serde", + "serde_with_macros", +] + +[[package]] +name = "serde_with_macros" +version = "2.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +dependencies = [ + "darling", + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "serde_yaml" +version = "0.9.34+deprecated" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" +dependencies = [ + "indexmap 2.8.0", + "itoa", + "ryu", + "serde", + "unsafe-libyaml", +] + +[[package]] +name = "sha1" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2" +version = "0.9.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" +dependencies = [ + "block-buffer 0.9.0", + "cfg-if", + "cpufeatures", + "digest 0.9.0", + "opaque-debug", +] + +[[package]] +name = "sha2" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.7", +] + +[[package]] +name = "sha2-const-stable" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f179d4e11094a893b82fff208f74d448a7512f99f5a0acbd5c679b705f83ed9" + +[[package]] +name = "sha3" +version = "0.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" +dependencies = [ + "block-buffer 0.9.0", + "digest 0.9.0", + "keccak", + "opaque-debug", +] + +[[package]] +name = "sha3" +version = "0.10.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" +dependencies = [ + "digest 0.10.7", + "keccak", +] + +[[package]] +name = "sharded-slab" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" +dependencies = [ + "lazy_static", +] + +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + +[[package]] +name = "signal-hook-registry" +version = "1.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +dependencies = [ + "libc", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[package]] +name = "siphasher" +version = "0.3.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" + +[[package]] +name = "sized-chunks" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" +dependencies = [ + "bitmaps", + "typenum", +] + +[[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.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" + +[[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-decoder" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b109fd3a106e079005167e5b0e6f6d2c88bbedec32530837b584791a8b5abf36" +dependencies = [ + "Inflector", + "base64 0.21.7", + "bincode", + "bs58 0.4.0", + "bv", + "lazy_static", + "serde", + "serde_derive", + "serde_json", + "solana-config-program", + "solana-sdk", + "spl-token", + "spl-token-2022 1.0.0", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-accounts-db" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec9829d10d521f3ed5e50c12d2b62784e2901aa484a92c2aa3924151da046139" +dependencies = [ + "arrayref", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lz4", + "memmap2", + "modular-bitfield", + "num-derive 0.4.2", + "num-traits", + "num_cpus", + "num_enum 0.7.2", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "seqlock", + "serde", + "serde_derive", + "smallvec", + "solana-bucket-map", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-nohash-hasher", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", + "static_assertions", + "strum", + "strum_macros", + "tar", + "tempfile", + "thiserror", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3527a26138b5deb126f13c27743f3d95ac533abee5979e4113f6d59ef919cc6" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.4.2", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-banks-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e58fa66e1e240097665e7f87b267aa8e976ea3fcbd86918c8fd218c875395ada" +dependencies = [ + "borsh 1.5.0", + "futures", + "solana-banks-interface", + "solana-program", + "solana-sdk", + "tarpc", + "thiserror", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-banks-interface" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f54d0a4334c153eadaa0326296a47a92d110c1cc975075fd6e1a7b67067f9812" +dependencies = [ + "serde", + "solana-sdk", + "tarpc", +] + +[[package]] +name = "solana-banks-server" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8cbe287a0f859362de9b155fabd44e479eba26d5d80e07a7d021297b7b06ecba" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-accounts-db", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + +[[package]] +name = "solana-bpf-loader-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8cc27ceda9a22804d73902f5d718ff1331aa53990c2665c90535f6b182db259" +dependencies = [ + "bincode", + "byteorder", + "libsecp256k1", + "log", + "scopeguard", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-bucket-map" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca55ec9b8d01d2e3bba9fad77b27c9a8fd51fe12475549b93a853d921b653139" +dependencies = [ + "bv", + "bytemuck", + "log", + "memmap2", + "modular-bitfield", + "num_enum 0.7.2", + "rand 0.8.5", + "solana-measure", + "solana-sdk", + "tempfile", +] + +[[package]] +name = "solana-clap-utils" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "074ef478856a45d5627270fbc6b331f91de9aae7128242d9e423931013fb8a2a" +dependencies = [ + "chrono", + "clap 2.34.0", + "rpassword", + "solana-remote-wallet", + "solana-sdk", + "thiserror", + "tiny-bip39", + "uriparse", + "url", +] + +[[package]] +name = "solana-cli-config" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb5ded97f71d1ff4de9b256fc33acab9f9def864d5aa16762c8f91b67c66466c" +dependencies = [ + "dirs-next", + "lazy_static", + "serde", + "serde_derive", + "serde_yaml", + "solana-clap-utils", + "solana-sdk", + "url", +] + +[[package]] +name = "solana-cli-output" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5da6b601aa9f9764afc60ba310c42ff8576923fcf3dd5da30fd0cdf9c44caf98" +dependencies = [ + "Inflector", + "base64 0.21.7", + "chrono", + "clap 2.34.0", + "console", + "humantime", + "indicatif", + "pretty-hex", + "semver", + "serde", + "serde_json", + "solana-account-decoder", + "solana-clap-utils", + "solana-cli-config", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-vote-program", + "spl-memo", +] + +[[package]] +name = "solana-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24a9f32c42402c4b9484d5868ac74b7e0a746e3905d8bfd756e1203e50cbb87e" +dependencies = [ + "async-trait", + "bincode", + "dashmap", + "futures", + "futures-util", + "indexmap 2.8.0", + "indicatif", + "log", + "quinn", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-quic-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-rpc-client-nonce-utils", + "solana-sdk", + "solana-streamer", + "solana-thin-client", + "solana-tpu-client", + "solana-udp-client", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-compute-budget-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6af050a6e0b402e322aa21f5441c7e27cdd52624a2d659f455b68afd7cda218c" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-config-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d75b803860c0098e021a26f0624129007c15badd5b0bc2fbd9f0e1a73060d3b" +dependencies = [ + "bincode", + "chrono", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-connection-cache" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b9306ede13e8ceeab8a096bcf5fa7126731e44c201ca1721ea3c38d89bcd4111" +dependencies = [ + "async-trait", + "bincode", + "crossbeam-channel", + "futures-util", + "indexmap 2.8.0", + "log", + "rand 0.8.5", + "rayon", + "rcgen", + "solana-measure", + "solana-metrics", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-cost-model" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c852790063f7646a1c5199234cc82e1304b55a3b3fb8055a0b5c8b0393565c1c" +dependencies = [ + "lazy_static", + "log", + "rustc_version", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", +] + +[[package]] +name = "solana-frozen-abi" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "03ab2c30c15311b511c0d1151e4ab6bc9a3e080a37e7c6e7c2d96f5784cf9434" +dependencies = [ + "block-buffer 0.10.4", + "bs58 0.4.0", + "bv", + "either", + "generic-array", + "im", + "lazy_static", + "log", + "memmap2", + "rustc_version", + "serde", + "serde_bytes", + "serde_derive", + "sha2 0.10.8", + "solana-frozen-abi-macro", + "subtle", + "thiserror", +] + +[[package]] +name = "solana-frozen-abi-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c142f779c3633ac83c84d04ff06c70e1f558c876f13358bed77ba629c7417932" +dependencies = [ + "proc-macro2", + "quote", + "rustc_version", + "syn 2.0.100", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b58f70f5883b0f26a6011ed23f76c493a3f22df63aec46cfe8e1b9bf82b5cc" +dependencies = [ + "log", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", +] + +[[package]] +name = "solana-logger" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "121d36ffb3c6b958763312cbc697fbccba46ee837d3a0aa4fc0e90fcb3b884f3" +dependencies = [ + "env_logger", + "lazy_static", + "log", +] + +[[package]] +name = "solana-measure" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c01a7f9cdc9d9d37a3d5651b2fe7ec9d433c2a3470b9f35897e373b421f0737" +dependencies = [ + "log", + "solana-sdk", +] + +[[package]] +name = "solana-metrics" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "71e36052aff6be1536bdf6f737c6e69aca9dbb6a2f3f582e14ecb0ddc0cd66ce" +dependencies = [ + "crossbeam-channel", + "gethostname", + "lazy_static", + "log", + "reqwest", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-net-utils" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2a1f5c6be9c5b272866673741e1ebc64b2ea2118e5c6301babbce526fdfb15f4" +dependencies = [ + "bincode", + "clap 3.2.25", + "crossbeam-channel", + "log", + "nix", + "rand 0.8.5", + "serde", + "serde_derive", + "socket2", + "solana-logger", + "solana-sdk", + "solana-version", + "tokio", + "url", +] + +[[package]] +name = "solana-nohash-hasher" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" + +[[package]] +name = "solana-perf" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28acaf22477566a0fbddd67249ea5d859b39bacdb624aff3fadd3c5745e2643c" +dependencies = [ + "ahash 0.8.11", + "bincode", + "bv", + "caps", + "curve25519-dalek", + "dlopen2", + "fnv", + "lazy_static", + "libc", + "log", + "nix", + "rand 0.8.5", + "rayon", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-metrics", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c10f4588cefd716b24a1a40dd32c278e43a560ab8ce4de6b5805c9d113afdfa1" +dependencies = [ + "ark-bn254", + "ark-ec", + "ark-ff", + "ark-serialize", + "base64 0.21.7", + "bincode", + "bitflags 2.4.2", + "blake3", + "borsh 0.10.3", + "borsh 0.9.3", + "borsh 1.5.0", + "bs58 0.4.0", + "bv", + "bytemuck", + "cc", + "console_error_panic_hook", + "console_log", + "curve25519-dalek", + "getrandom 0.2.11", + "itertools", + "js-sys", + "lazy_static", + "libc", + "libsecp256k1", + "light-poseidon", + "log", + "memoffset 0.9.0", + "num-bigint 0.4.4", + "num-derive 0.4.2", + "num-traits", + "parking_lot", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.8", + "sha3 0.10.8", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-program-runtime" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf0c3eab2a80f514289af1f422c121defb030937643c43b117959d6f1932fb5" +dependencies = [ + "base64 0.21.7", + "bincode", + "eager", + "enum-iterator", + "itertools", + "libc", + "log", + "num-derive 0.4.2", + "num-traits", + "percentage", + "rand 0.8.5", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-sdk", + "solana_rbpf", + "thiserror", +] + +[[package]] +name = "solana-program-test" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1382a5768ff738e283770ee331d0a4fa04aa1aceed8eb820a97094c93d53b72" +dependencies = [ + "assert_matches", + "async-trait", + "base64 0.21.7", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-accounts-db", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "solana_rbpf", + "test-case", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-pubsub-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b064e76909d33821b80fdd826e6757251934a52958220c92639f634bea90366d" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", + "tokio-stream", + "tokio-tungstenite", + "tungstenite", + "url", +] + +[[package]] +name = "solana-quic-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a90e40ee593f6e9ddd722d296df56743514ae804975a76d47e7afed4e3da244" +dependencies = [ + "async-mutex", + "async-trait", + "futures", + "itertools", + "lazy_static", + "log", + "quinn", + "quinn-proto", + "rcgen", + "rustls", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-net-utils", + "solana-rpc-client-api", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-rayon-threadlimit" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "66468f9c014992167de10cc68aad6ac8919a8c8ff428dc88c0d2b4da8c02b8b7" +dependencies = [ + "lazy_static", + "num_cpus", +] + +[[package]] +name = "solana-remote-wallet" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c191019f4d4f84281a6d0dd9a43181146b33019627fc394e42e08ade8976b431" +dependencies = [ + "console", + "dialoguer", + "log", + "num-derive 0.4.2", + "num-traits", + "parking_lot", + "qstring", + "semver", + "solana-sdk", + "thiserror", + "uriparse", +] + +[[package]] +name = "solana-rpc-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36ed4628e338077c195ddbf790693d410123d17dec0a319b5accb4aaee3fb15c" +dependencies = [ + "async-trait", + "base64 0.21.7", + "bincode", + "bs58 0.4.0", + "indicatif", + "log", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-rpc-client-api", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "solana-vote-program", + "tokio", +] + +[[package]] +name = "solana-rpc-client-api" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83c913551faa4a1ae4bbfef6af19f3a5cf847285c05b4409e37c8993b3444229" +dependencies = [ + "base64 0.21.7", + "bs58 0.4.0", + "jsonrpc-core", + "reqwest", + "semver", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "solana-transaction-status", + "solana-version", + "spl-token-2022 1.0.0", + "thiserror", +] + +[[package]] +name = "solana-rpc-client-nonce-utils" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a47b6bb1834e6141a799db62bbdcf80d17a7d58d7bc1684c614e01a7293d7cf" +dependencies = [ + "clap 2.34.0", + "solana-clap-utils", + "solana-rpc-client", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-runtime" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73a12e1270121e1ca6a4e86d6d0f5c339f0811a8435161d9eee54cbb0a083859" +dependencies = [ + "aquamarine", + "arrayref", + "base64 0.21.7", "bincode", - "bitflags 2.4.2", "blake3", - "borsh 0.10.3", - "borsh 0.9.3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2", + "mockall", + "modular-bitfield", + "num-derive 0.4.2", + "num-traits", + "num_cpus", + "num_enum 0.7.2", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "serde_json", + "solana-accounts-db", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-bucket-map", + "solana-compute-budget-program", + "solana-config-program", + "solana-cost-model", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-version", + "solana-vote", + "solana-vote-program", + "solana-zk-token-proof-program", + "solana-zk-token-sdk", + "static_assertions", + "strum", + "strum_macros", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + +[[package]] +name = "solana-sdk" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "580ad66c2f7a4c3cb3244fe21440546bd500f5ecb955ad9826e92a78dded8009" +dependencies = [ + "assert_matches", + "base64 0.21.7", + "bincode", + "bitflags 2.4.2", "borsh 1.5.0", "bs58 0.4.0", - "bv", "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.11", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.7", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive 0.4.2", + "num-traits", + "num_enum 0.7.2", + "pbkdf2 0.11.0", + "qstring", + "qualifier_attr", + "rand 0.7.3", + "rand 0.8.5", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "serde_with", + "sha2 0.10.8", + "sha3 0.10.8", + "siphasher", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-logger", + "solana-program", + "solana-sdk-macro", + "thiserror", + "uriparse", + "wasm-bindgen", +] + +[[package]] +name = "solana-sdk-macro" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1b75d0f193a27719257af19144fdaebec0415d1c9e9226ae4bd29b791be5e9bd" +dependencies = [ + "bs58 0.4.0", + "proc-macro2", + "quote", + "rustversion", + "syn 2.0.100", +] + +[[package]] +name = "solana-security-txt" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" + +[[package]] +name = "solana-send-transaction-service" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3218f670f582126a3859c4fd152e922b93b3748a636bb143f970391925723577" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eeb3e0d2dc7080b9fa61b34699b176911684f5e04e8df4b565b2b6c962bb4321" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + +[[package]] +name = "solana-streamer" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f8476e41ad94fe492e8c06697ee35912cf3080aae0c9e9ac6430835256ccf056" +dependencies = [ + "async-channel", + "bytes", + "crossbeam-channel", + "futures-util", + "histogram", + "indexmap 2.8.0", + "itertools", + "libc", + "log", + "nix", + "pem", + "percentage", + "pkcs8", + "quinn", + "quinn-proto", + "rand 0.8.5", + "rcgen", + "rustls", + "smallvec", + "solana-metrics", + "solana-perf", + "solana-sdk", + "thiserror", + "tokio", + "x509-parser", +] + +[[package]] +name = "solana-system-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "26f31e04f5baad7cbc2281fea312c4e48277da42a93a0ba050b74edc5a74d63c" +dependencies = [ + "bincode", + "log", + "serde", + "serde_derive", + "solana-program-runtime", + "solana-sdk", +] + +[[package]] +name = "solana-thin-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d8c02245d0d232430e79dc0d624aa42d50006097c3aec99ac82ac299eaa3a73f" +dependencies = [ + "bincode", + "log", + "rayon", + "solana-connection-cache", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", +] + +[[package]] +name = "solana-tpu-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "67251506ed03de15f1347b46636b45c47da6be75015b4a13f0620b21beb00566" +dependencies = [ + "async-trait", + "bincode", + "futures-util", + "indexmap 2.8.0", + "indicatif", + "log", + "rayon", + "solana-connection-cache", + "solana-measure", + "solana-metrics", + "solana-pubsub-client", + "solana-rpc-client", + "solana-rpc-client-api", + "solana-sdk", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-transaction-status" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2d3d36db1b2ab2801afd5482aad9fb15ed7959f774c81a77299fdd0ddcf839d4" +dependencies = [ + "Inflector", + "base64 0.21.7", + "bincode", + "borsh 0.10.3", + "bs58 0.4.0", + "lazy_static", + "log", + "serde", + "serde_derive", + "serde_json", + "solana-account-decoder", + "solana-sdk", + "spl-associated-token-account 2.3.0", + "spl-memo", + "spl-token", + "spl-token-2022 1.0.0", + "thiserror", +] + +[[package]] +name = "solana-udp-client" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a754a3c2265eb02e0c35aeaca96643951f03cee6b376afe12e0cf8860ffccd1" +dependencies = [ + "async-trait", + "solana-connection-cache", + "solana-net-utils", + "solana-sdk", + "solana-streamer", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-version" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f44776bd685cc02e67ba264384acc12ef2931d01d1a9f851cb8cdbd3ce455b9e" +dependencies = [ + "log", + "rustc_version", + "semver", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", +] + +[[package]] +name = "solana-vote" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5983370c95b615dc5f5d0e85414c499f05380393c578749bcd14c114c77c9bc" +dependencies = [ + "crossbeam-channel", "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", - "light-poseidon", "log", - "memoffset", - "num-bigint", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", + "solana-vote-program", + "thiserror", +] + +[[package]] +name = "solana-vote-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "25810970c91feb579bd3f67dca215fce971522e42bfd59696af89c5dfebd997c" +dependencies = [ + "bincode", + "log", "num-derive 0.4.2", "num-traits", - "parking_lot", - "rand 0.8.5", "rustc_version", - "rustversion", "serde", - "serde_bytes", "serde_derive", - "serde_json", - "sha2 0.10.8", - "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", - "solana-sdk-macro", + "solana-metrics", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + +[[package]] +name = "solana-zk-token-proof-program" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1be1c15d4aace575e2de73ebeb9b37bac455e89bee9a8c3531f47ac5066b33e1" +dependencies = [ + "bytemuck", + "num-derive 0.4.2", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + +[[package]] +name = "solana-zk-token-sdk" +version = "1.18.26" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cbdf4249b6dfcbba7d84e2b53313698043f60f8e22ce48286e6fbe8a17c8d16" +dependencies = [ + "aes-gcm-siv", + "base64 0.21.7", + "bincode", + "bytemuck", + "byteorder", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive 0.4.2", + "num-traits", + "rand 0.7.3", + "serde", + "serde_json", + "sha3 0.9.1", + "solana-program", + "solana-sdk", + "subtle", "thiserror", - "tiny-bip39", - "wasm-bindgen", "zeroize", ] [[package]] -name = "solana-sdk" -version = "1.18.15" +name = "solana_rbpf" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" +dependencies = [ + "byteorder", + "combine", + "goblin", + "hash32", + "libc", + "log", + "rand 0.8.5", + "rustc-demangle", + "scroll", + "thiserror", + "winapi", +] + +[[package]] +name = "spin" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" + +[[package]] +name = "spki" +version = "0.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44d01ac02a6ccf3e07db148d2be087da624fea0221a16152ed01f0496a6b0a27" +dependencies = [ + "base64ct", + "der", +] + +[[package]] +name = "spl-associated-token-account" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "992d9c64c2564cc8f63a4b508bf3ebcdf2254b0429b13cd1d31adb6162432a5f" +dependencies = [ + "assert_matches", + "borsh 0.10.3", + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022 1.0.0", + "thiserror", +] + +[[package]] +name = "spl-associated-token-account" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2e688554bac5838217ffd1fab7845c573ff106b6336bf7d290db7c98d5a8efd" +dependencies = [ + "assert_matches", + "borsh 1.5.0", + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022 3.0.2", + "thiserror", +] + +[[package]] +name = "spl-discriminator" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive 0.1.2", +] + +[[package]] +name = "spl-discriminator" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34d1814406e98b08c5cd02c1126f83fd407ad084adce0b05fda5730677822eac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive 0.2.0", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" +dependencies = [ + "quote", + "spl-discriminator-syn 0.1.2", + "syn 2.0.100", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +dependencies = [ + "quote", + "spl-discriminator-syn 0.2.0", + "syn 2.0.100", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "18fea7be851bd98d10721782ea958097c03a0c2a07d8d4997041d0ece6319a63" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.100", + "thiserror", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.100", + "thiserror", +] + +[[package]] +name = "spl-memo" +version = "4.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +dependencies = [ + "solana-program", +] + +[[package]] +name = "spl-pod" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" +dependencies = [ + "borsh 0.10.3", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.3.0", +] + +[[package]] +name = "spl-pod" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046ce669f48cf2eca1ec518916d8725596bfb655beb1c74374cf71dc6cb773c9" +dependencies = [ + "borsh 1.5.0", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.4.1", +] + +[[package]] +name = "spl-program-error" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +dependencies = [ + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-program-error-derive 0.3.2", + "thiserror", +] + +[[package]] +name = "spl-program-error" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49065093ea91f57b9b2bd81493ff705e2ad4e64507a07dbc02b085778e02770e" +dependencies = [ + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-program-error-derive 0.4.1", + "thiserror", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1845dfe71fd68f70382232742e758557afe973ae19e6c06807b2c30f5d5cb474" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.100", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.100", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c50ec330850953d4971b052ff98c74a8e67e7618b4aed9f4971b8d3b68fcd1cd" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ - "assert_matches", - "base64 0.21.7", - "bincode", - "bitflags 2.4.2", - "borsh 1.5.0", - "bs58 0.4.0", "bytemuck", - "byteorder", - "chrono", - "derivation-path", - "digest 0.10.7", - "ed25519-dalek", - "ed25519-dalek-bip32", - "generic-array", - "hmac 0.12.1", - "itertools", - "js-sys", - "lazy_static", - "libsecp256k1", - "log", - "memmap2", - "num-derive 0.4.2", - "num-traits", - "num_enum 0.7.2", - "pbkdf2 0.11.0", - "qstring", - "qualifier_attr", - "rand 0.7.3", - "rand 0.8.5", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "serde_with", - "sha2 0.10.8", - "sha3 0.10.8", - "siphasher", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", "solana-program", - "solana-sdk-macro", - "thiserror", - "uriparse", - "wasm-bindgen", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", + "spl-type-length-value 0.3.0", ] [[package]] -name = "solana-sdk-macro" -version = "1.18.15" +name = "spl-tlv-account-resolution" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ef2ea49002d1bf52a4a8509570b2c3b88e7b6d0a131b11bbd637ca1e1df0ff" +checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8" dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.48", + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-type-length-value 0.4.3", ] [[package]] -name = "solana-security-txt" -version = "1.1.1" +name = "spl-token" +version = "4.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" +checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.3.3", + "num-traits", + "num_enum 0.6.1", + "solana-program", + "thiserror", +] [[package]] -name = "solana-zk-token-sdk" -version = "1.18.15" +name = "spl-token-2022" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cafb3df56516086f65e2a08a8cd03f504236f3b5348299abd45415d1d18ba32" +checksum = "d697fac19fd74ff472dfcc13f0b442dd71403178ce1de7b5d16f83a33561c059" dependencies = [ - "aes-gcm-siv", - "base64 0.21.7", - "bincode", + "arrayref", "bytemuck", - "byteorder", - "curve25519-dalek", - "getrandom 0.1.16", - "itertools", - "lazy_static", - "merlin", "num-derive 0.4.2", "num-traits", - "rand 0.7.3", - "serde", - "serde_json", - "sha3 0.9.1", + "num_enum 0.7.2", "solana-program", - "solana-sdk", - "subtle", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod 0.1.0", + "spl-token", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", + "spl-transfer-hook-interface 0.4.1", + "spl-type-length-value 0.3.0", "thiserror", - "zeroize", ] [[package]] -name = "spl-associated-token-account" +name = "spl-token-2022" version = "3.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2e688554bac5838217ffd1fab7845c573ff106b6336bf7d290db7c98d5a8efd" +checksum = "e5412f99ae7ee6e0afde00defaa354e6228e47e30c0e3adf553e2e01e6abb584" dependencies = [ - "assert_matches", - "borsh 1.5.0", + "arrayref", + "bytemuck", "num-derive 0.4.2", "num-traits", + "num_enum 0.7.2", "solana-program", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod 0.2.2", "spl-token", - "spl-token-2022", + "spl-token-group-interface 0.2.3", + "spl-token-metadata-interface 0.3.3", + "spl-transfer-hook-interface 0.6.3", + "spl-type-length-value 0.4.3", "thiserror", ] [[package]] -name = "spl-discriminator" -version = "0.2.2" +name = "spl-token-group-interface" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34d1814406e98b08c5cd02c1126f83fd407ad084adce0b05fda5730677822eac" +checksum = "b889509d49fa74a4a033ca5dae6c2307e9e918122d97e58562f5c4ffa795c75d" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator-derive", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", ] [[package]] -name = "spl-discriminator-derive" -version = "0.2.0" +name = "spl-token-group-interface" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +checksum = "d419b5cfa3ee8e0f2386fd7e02a33b3ec8a7db4a9c7064a2ea24849dc4a273b6" dependencies = [ - "quote", - "spl-discriminator-syn", - "syn 2.0.48", + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", ] [[package]] -name = "spl-discriminator-syn" +name = "spl-token-metadata-interface" version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" dependencies = [ - "proc-macro2", - "quote", - "sha2 0.10.8", - "syn 2.0.48", - "thiserror", + "borsh 0.10.3", + "solana-program", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", + "spl-type-length-value 0.3.0", ] [[package]] -name = "spl-memo" -version = "4.0.0" +name = "spl-token-metadata-interface" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0f180b03318c3dbab3ef4e1e4d46d5211ae3c780940dd0a28695aba4b59a75a" +checksum = "30179c47e93625680dabb620c6e7931bd12d62af390f447bc7beb4a3a9b5feee" dependencies = [ + "borsh 1.5.0", "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-type-length-value 0.4.3", ] [[package]] -name = "spl-pod" -version = "0.2.2" +name = "spl-transfer-hook-interface" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046ce669f48cf2eca1ec518916d8725596bfb655beb1c74374cf71dc6cb773c9" +checksum = "7aabdb7c471566f6ddcee724beb8618449ea24b399e58d464d6b5bc7db550259" dependencies = [ - "borsh 1.5.0", + "arrayref", "bytemuck", "solana-program", - "solana-zk-token-sdk", - "spl-program-error", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", + "spl-tlv-account-resolution 0.5.1", + "spl-type-length-value 0.3.0", ] [[package]] -name = "spl-program-error" -version = "0.4.1" +name = "spl-transfer-hook-interface" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49065093ea91f57b9b2bd81493ff705e2ad4e64507a07dbc02b085778e02770e" +checksum = "66a98359769cd988f7b35c02558daa56d496a7e3bd8626e61f90a7c757eedb9b" dependencies = [ - "num-derive 0.4.2", - "num-traits", + "arrayref", + "bytemuck", "solana-program", - "spl-program-error-derive", - "thiserror", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", + "spl-tlv-account-resolution 0.6.3", + "spl-type-length-value 0.4.3", +] + +[[package]] +name = "spl-type-length-value" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", +] + +[[package]] +name = "spl-type-length-value" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "422ce13429dbd41d2cee8a73931c05fda0b0c8ca156a8b0c19445642550bb61a" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.2", + "spl-pod 0.2.2", + "spl-program-error 0.4.1", +] + +[[package]] +name = "stable_deref_trait" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" + +[[package]] +name = "static_assertions" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" + +[[package]] +name = "strsim" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" + +[[package]] +name = "strsim" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + +[[package]] +name = "syn" +version = "1.0.109" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "2.0.100" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn_derive" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +dependencies = [ + "proc-macro-error", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] -name = "spl-program-error-derive" -version = "0.4.1" +name = "sync_wrapper" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", - "sha2 0.10.8", - "syn 2.0.48", + "syn 1.0.109", + "unicode-xid", ] [[package]] -name = "spl-tlv-account-resolution" -version = "0.6.3" +name = "synstructure" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cace91ba08984a41556efe49cbf2edca4db2f577b649da7827d3621161784bf8" +checksum = "c8af7666ab7b6390ab78131fb5b0fce11d6b7a6951602017c35fa82800708971" dependencies = [ - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "proc-macro2", + "quote", + "syn 2.0.100", ] [[package]] -name = "spl-token" -version = "4.0.0" +name = "system-configuration" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08459ba1b8f7c1020b4582c4edf0f5c7511a5e099a7a97570c9698d4f2337060" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "num_enum 0.6.1", - "solana-program", - "thiserror", + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", ] [[package]] -name = "spl-token-2022" -version = "3.0.2" +name = "system-configuration-sys" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5412f99ae7ee6e0afde00defaa354e6228e47e30c0e3adf553e2e01e6abb584" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.4.2", - "num-traits", - "num_enum 0.7.2", - "solana-program", - "solana-security-txt", - "solana-zk-token-sdk", - "spl-memo", - "spl-pod", - "spl-token", - "spl-token-group-interface", - "spl-token-metadata-interface", - "spl-transfer-hook-interface", - "spl-type-length-value", - "thiserror", + "core-foundation-sys", + "libc", ] [[package]] -name = "spl-token-group-interface" -version = "0.2.3" +name = "tar" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d419b5cfa3ee8e0f2386fd7e02a33b3ec8a7db4a9c7064a2ea24849dc4a273b6" +checksum = "1d863878d212c87a19c1a610eb53bb01fe12951c0501cf5a0d65f724914a667a" dependencies = [ - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "filetime", + "libc", + "xattr", ] [[package]] -name = "spl-token-metadata-interface" -version = "0.3.3" +name = "tarpc" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30179c47e93625680dabb620c6e7931bd12d62af390f447bc7beb4a3a9b5feee" +checksum = "1c38a012bed6fb9681d3bf71ffaa4f88f3b4b9ed3198cda6e4c8462d24d4bb80" dependencies = [ - "borsh 1.5.0", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "anyhow", + "fnv", + "futures", + "humantime", + "opentelemetry", + "pin-project", + "rand 0.8.5", + "serde", + "static_assertions", + "tarpc-plugins", + "thiserror", + "tokio", + "tokio-serde", + "tokio-util 0.6.10", + "tracing", + "tracing-opentelemetry", ] [[package]] -name = "spl-transfer-hook-interface" -version = "0.6.3" +name = "tarpc-plugins" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66a98359769cd988f7b35c02558daa56d496a7e3bd8626e61f90a7c757eedb9b" +checksum = "0ee42b4e559f17bce0385ebf511a7beb67d5cc33c12c96b7f4e9789919d9c10f" dependencies = [ - "arrayref", - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution", - "spl-type-length-value", + "proc-macro2", + "quote", + "syn 1.0.109", ] [[package]] -name = "spl-type-length-value" -version = "0.4.3" +name = "tempfile" +version = "3.19.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "422ce13429dbd41d2cee8a73931c05fda0b0c8ca156a8b0c19445642550bb61a" +checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" dependencies = [ - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "fastrand", + "getrandom 0.3.2", + "once_cell", + "rustix", + "windows-sys 0.59.0", ] [[package]] -name = "strsim" -version = "0.10.0" +name = "termcolor" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +dependencies = [ + "winapi-util", +] [[package]] -name = "subtle" -version = "2.4.1" +name = "termtree" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +checksum = "8f50febec83f5ee1df3015341d8bd429f2d1cc62bcba7ea2076759d315084683" [[package]] -name = "syn" -version = "1.0.109" +name = "test-case" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" +checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", + "test-case-macros", ] [[package]] -name = "syn" -version = "2.0.48" +name = "test-case-core" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" dependencies = [ + "cfg-if", "proc-macro2", "quote", - "unicode-ident", + "syn 2.0.100", ] [[package]] -name = "syn_derive" -version = "0.1.8" +name = "test-case-macros" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", + "test-case-core", ] [[package]] -name = "termcolor" -version = "1.4.0" +name = "textwrap" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff1bc3d3f05aff0403e8ac0d92ced918ec05b666a43f83297ccef5bea8a3d449" +checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" dependencies = [ - "winapi-util", + "unicode-width 0.1.14", ] +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" + [[package]] name = "thiserror" version = "1.0.56" @@ -2431,7 +5946,48 @@ checksum = "fa0faa943b50f3db30a20aa7e265dbc66076993efed8463e8de414e5d06d3471" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", +] + +[[package]] +name = "thread_local" +version = "1.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +dependencies = [ + "cfg-if", + "once_cell", +] + +[[package]] +name = "time" +version = "0.3.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a7619e19bc266e0f9c5e6686659d394bc57973859340060a69221e57dbc0c40" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9e9a38711f559d9e3ce1cdb06dd7c5b8ea546bc90052da6d06bb76da74bb07c" + +[[package]] +name = "time-macros" +version = "0.2.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3526739392ec93fd8b359c8e98514cb3e8e021beb4e5f597b00a0221f8ed8a49" +dependencies = [ + "num-conv", + "time-core", ] [[package]] @@ -2453,6 +6009,16 @@ dependencies = [ "zeroize", ] +[[package]] +name = "tinystr" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9117f5d4db391c1cf6927e7bea3db74b9a1c1add8f7eda9ffd5364f40f57b82f" +dependencies = [ + "displaydoc", + "zerovec", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2493,6 +6059,115 @@ dependencies = [ "wormhole-io", ] +[[package]] +name = "tokio" +version = "1.44.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f382da615b842244d4b8738c82ed1275e6c5dd90c459a30941cd07080b06c91a" +dependencies = [ + "backtrace", + "bytes", + "libc", + "mio", + "parking_lot", + "pin-project-lite", + "signal-hook-registry", + "socket2", + "tokio-macros", + "windows-sys 0.52.0", +] + +[[package]] +name = "tokio-macros" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[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-serde" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "911a61637386b789af998ee23f50aa30d5fd7edcec8d6d3dedae5e5815205466" +dependencies = [ + "bincode", + "bytes", + "educe", + "futures-core", + "futures-sink", + "pin-project", + "serde", + "serde_json", +] + +[[package]] +name = "tokio-stream" +version = "0.1.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" +dependencies = [ + "futures-core", + "pin-project-lite", + "tokio", +] + +[[package]] +name = "tokio-tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "212d5dcb2a1ce06d81107c3d0ffa3121fe974b73f068c8282cb1c32328113b6c" +dependencies = [ + "futures-util", + "log", + "rustls", + "tokio", + "tokio-rustls", + "tungstenite", + "webpki-roots 0.25.4", +] + +[[package]] +name = "tokio-util" +version = "0.6.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "log", + "pin-project-lite", + "slab", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", +] + [[package]] name = "toml" version = "0.5.11" @@ -2529,7 +6204,7 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap", + "indexmap 2.8.0", "toml_datetime", "winnow 0.5.33", ] @@ -2540,7 +6215,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ - "indexmap", + "indexmap 2.8.0", "toml_datetime", "winnow 0.5.33", ] @@ -2551,13 +6226,121 @@ version = "0.22.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" dependencies = [ - "indexmap", + "indexmap 2.8.0", "serde", "serde_spanned", "toml_datetime", "winnow 0.6.7", ] +[[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 = [ + "log", + "pin-project-lite", + "tracing-attributes", + "tracing-core", +] + +[[package]] +name = "tracing-attributes" +version = "0.1.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", +] + +[[package]] +name = "tracing-core" +version = "0.1.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +dependencies = [ + "once_cell", + "valuable", +] + +[[package]] +name = "tracing-log" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" +dependencies = [ + "log", + "once_cell", + "tracing-core", +] + +[[package]] +name = "tracing-opentelemetry" +version = "0.17.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbbe89715c1dbbb790059e2565353978564924ee85017b5fff365c872ff6721f" +dependencies = [ + "once_cell", + "opentelemetry", + "tracing", + "tracing-core", + "tracing-subscriber", +] + +[[package]] +name = "tracing-subscriber" +version = "0.3.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +dependencies = [ + "matchers", + "nu-ansi-term", + "once_cell", + "regex", + "sharded-slab", + "smallvec", + "thread_local", + "tracing", + "tracing-core", + "tracing-log", +] + +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + +[[package]] +name = "tungstenite" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e3dac10fd62eaf6617d3a904ae222845979aec67c615d1c842b4002c7666fb9" +dependencies = [ + "byteorder", + "bytes", + "data-encoding", + "http", + "httparse", + "log", + "rand 0.8.5", + "rustls", + "sha1", + "thiserror", + "url", + "utf-8", + "webpki-roots 0.24.0", +] + [[package]] name = "typenum" version = "1.17.0" @@ -2585,6 +6368,24 @@ version = "1.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1dd624098567895118886609431a7c3b8f516e41d30e0643f03d94592a147e36" +[[package]] +name = "unicode-width" +version = "0.1.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" + +[[package]] +name = "unicode-width" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" + +[[package]] +name = "unicode-xid" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + [[package]] name = "universal-hash" version = "0.4.1" @@ -2595,6 +6396,33 @@ 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 = "unsafe-libyaml" +version = "0.2.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861" + +[[package]] +name = "untrusted" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" + +[[package]] +name = "untrusted" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" + [[package]] name = "upgrade-manager" version = "0.0.0" @@ -2620,12 +6448,78 @@ 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 = "utf-8" +version = "0.7.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09cc8ee72d2a9becf2f2febe0205bbed8fc6615b7cb429ad062dc7b7ddd036a9" + +[[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 = "valuable" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" + +[[package]] +name = "vec_map" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" + [[package]] name = "version_check" version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "void" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" + +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + +[[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" @@ -2638,6 +6532,15 @@ version = "0.11.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +[[package]] +name = "wasi" +version = "0.14.2+wasi-0.2.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +dependencies = [ + "wit-bindgen-rt", +] + [[package]] name = "wasm-bindgen" version = "0.2.91" @@ -2659,10 +6562,22 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "877b9c3f61ceea0e56331985743b13f3d25c406a7098d45180fb5f09bc19ed97" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.91" @@ -2681,7 +6596,7 @@ checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2702,6 +6617,31 @@ dependencies = [ "wasm-bindgen", ] +[[package]] +name = "web-time" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "webpki-roots" +version = "0.24.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b291546d5d9d1eab74f069c77749f2cb8504a12caa20f0f2de93ddbf6f411888" +dependencies = [ + "rustls-webpki", +] + +[[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" @@ -2733,19 +6673,71 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-core" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" +dependencies = [ + "windows-targets 0.52.6", +] + +[[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", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "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 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm", + "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]] @@ -2754,42 +6746,90 @@ 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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" + +[[package]] +name = "windows_i686_gnullvm" +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" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + [[package]] name = "winnow" version = "0.5.33" @@ -2808,6 +6848,25 @@ 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 = "wit-bindgen-rt" +version = "0.39.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +dependencies = [ + "bitflags 2.4.2", +] + [[package]] name = "wormhole-cctp-solana" version = "0.3.0-alpha.0" @@ -2871,6 +6930,99 @@ dependencies = [ "wormhole-solana-consts", ] +[[package]] +name = "wormhole-svm-definitions" +version = "0.1.0" +source = "git+https://github.com/wormholelabs-xyz/wormhole.git?rev=32cb65dd9ae11547f0e57d106b6974dc8ed5f52d#32cb65dd9ae11547f0e57d106b6974dc8ed5f52d" +dependencies = [ + "borsh 1.5.0", + "cfg-if", + "sha2-const-stable", + "solana-program", +] + +[[package]] +name = "wormhole-svm-shim" +version = "0.1.0" +source = "git+https://github.com/wormholelabs-xyz/wormhole.git?rev=32cb65dd9ae11547f0e57d106b6974dc8ed5f52d#32cb65dd9ae11547f0e57d106b6974dc8ed5f52d" +dependencies = [ + "solana-program", + "wormhole-svm-definitions", +] + +[[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 = "x509-parser" +version = "0.14.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0ecbeb7b67ce215e40e3cc7f2ff902f94a223acf44995934763467e7b1febc8" +dependencies = [ + "asn1-rs", + "base64 0.13.1", + "data-encoding", + "der-parser", + "lazy_static", + "nom", + "oid-registry", + "rusticata-macros", + "thiserror", + "time", +] + +[[package]] +name = "xattr" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0d65cbf2f12c15564212d48f4e3dfb87923d25d611f2aed18f4cb23f0413d89e" +dependencies = [ + "libc", + "rustix", +] + +[[package]] +name = "yasna" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e17bb3549cc1321ae1296b9cdc2698e2b6cb1992adfa19a8c72e5b7a738f44cd" +dependencies = [ + "time", +] + +[[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.100", + "synstructure 0.13.1", +] + [[package]] name = "zerocopy" version = "0.7.32" @@ -2888,7 +7040,28 @@ checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", +] + +[[package]] +name = "zerofrom" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50cc42e0333e05660c3587f3bf9d0478688e15d870fab3346451ce7f8c9fbea5" +dependencies = [ + "zerofrom-derive", +] + +[[package]] +name = "zerofrom-derive" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71e5d6e06ab090c67b5e44993ec16b72dcbaabc526db883a360057678b48502" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.100", + "synstructure 0.13.1", ] [[package]] @@ -2908,5 +7081,56 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.100", +] + +[[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.100", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.15+zstd.1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb81183ddd97d0c74cedf1d50d85c8d08c1b8b68ee863bdee9e706eedba1a237" +dependencies = [ + "cc", + "pkg-config", ] diff --git a/solana/Cargo.toml b/solana/Cargo.toml index 7bc5ba4d..ca1a82bd 100644 --- a/solana/Cargo.toml +++ b/solana/Cargo.toml @@ -47,6 +47,12 @@ hex = "0.4.3" ruint = "1.9.0" cfg-if = "1.0" hex-literal = "0.4.1" +bytemuck = "1.13.0" + +wormhole-svm-shim = { git = "https://github.com/wormholelabs-xyz/wormhole.git", rev = "32cb65dd9ae11547f0e57d106b6974dc8ed5f52d" } +wormhole-svm-definitions = { git = "https://github.com/wormholelabs-xyz/wormhole.git", rev = "32cb65dd9ae11547f0e57d106b6974dc8ed5f52d", features = ["borsh"] } + + [profile.release] overflow-checks = true diff --git a/solana/programs/matching-engine/Cargo.toml b/solana/programs/matching-engine/Cargo.toml index 0704b587..d8ad9960 100644 --- a/solana/programs/matching-engine/Cargo.toml +++ b/solana/programs/matching-engine/Cargo.toml @@ -37,11 +37,33 @@ anchor-spl.workspace = true solana-program.workspace = true hex.workspace = true +bytemuck.workspace = true ruint.workspace = true cfg-if.workspace = true +wormhole-svm-definitions.workspace = true +wormhole-svm-shim.workspace = true +wormhole-io.workspace = true [dev-dependencies] hex-literal.workspace = true +solana-program-test = "1.18.15" +solana-sdk = "1.18.15" +serde_json = "1.0.138" +bincode = "1.3.3" +solana-cli-output = "1.18.15" +base64 = "0.22.1" +lazy_static = "1.4.0" +bs58 = "0.5.0" +serde = { version = "1.0.212", features = ["derive"] } +secp256k1 = {version = "0.30.0", features = ["rand", "hashes", "std", "global-context", "recovery"] } +num-traits = "0.2.16" +tracing = "0.1" +tracing-subscriber = { version = "0.3", features = ["env-filter"] } +tracing-log = "0.2.0" +once_cell = "1.8" +anyhow = "1.0.97" +wormhole-svm-shim.workspace = true +wormhole-svm-definitions.workspace = true [lints] -workspace = true \ No newline at end of file +workspace = true diff --git a/solana/programs/matching-engine/src/error.rs b/solana/programs/matching-engine/src/error.rs index b67e4023..4b54bc9f 100644 --- a/solana/programs/matching-engine/src/error.rs +++ b/solana/programs/matching-engine/src/error.rs @@ -87,6 +87,22 @@ pub enum MatchingEngineError { CannotCloseAuctionYet = 0x500, AuctionHistoryNotFull = 0x502, AuctionHistoryFull = 0x504, + + InvalidVerifyVaaShimProgram = 0x600, + + // Fallback matching engine errors + AccountAlreadyInitialized = 0x700, + AccountNotWritable = 0x702, + BorshDeserializationError = 0x704, + InvalidPda = 0x706, + AccountDataTooSmall = 0x708, + InvalidProgram = 0x70a, + TokenTransferFailed = 0x70c, + InvalidMint = 0x70e, + + #[msg("From and to router endpoints are the same")] + SameEndpoints = 0x800, + InvalidCctpMessage = 0x802, } #[cfg(test)] diff --git a/solana/programs/matching-engine/src/fallback/mod.rs b/solana/programs/matching-engine/src/fallback/mod.rs new file mode 100644 index 00000000..d52b9b26 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/mod.rs @@ -0,0 +1,2 @@ +mod processor; +pub use processor::*; diff --git a/solana/programs/matching-engine/src/fallback/processor/burn_and_post.rs b/solana/programs/matching-engine/src/fallback/processor/burn_and_post.rs new file mode 100644 index 00000000..dac2e64e --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/burn_and_post.rs @@ -0,0 +1,100 @@ +use crate::state::Custodian; +use anchor_lang::prelude::*; +use common::wormhole_cctp_solana::{ + cctp::token_messenger_minter_program::cpi::{ + deposit_for_burn_with_caller, DepositForBurnWithCaller, DepositForBurnWithCallerParams, + }, + cpi::BurnAndPublishArgs, +}; +use solana_program::program::invoke_signed_unchecked; +use wormhole_svm_definitions::solana::{ + CORE_BRIDGE_CONFIG, CORE_BRIDGE_FEE_COLLECTOR, CORE_BRIDGE_PROGRAM_ID, + POST_MESSAGE_SHIM_EVENT_AUTHORITY, POST_MESSAGE_SHIM_PROGRAM_ID, +}; +use wormhole_svm_definitions::{ + find_emitter_sequence_address, find_shim_message_address, solana::Finality, +}; +use wormhole_svm_shim::post_message; + +// This is a helper struct to make it easier to pass in the accounts for the post_message instruction. +pub struct PostMessageAccounts { + pub emitter: Pubkey, + pub payer: Pubkey, + derived: PostMessageDerivedAccounts, +} + +impl PostMessageAccounts { + pub fn new(emitter: Pubkey, payer: Pubkey) -> Self { + Self { + emitter, + payer, + derived: Self::get_derived_accounts(&emitter), + } + } + fn get_derived_accounts(emitter: &Pubkey) -> PostMessageDerivedAccounts { + PostMessageDerivedAccounts { + message: find_shim_message_address(emitter, &POST_MESSAGE_SHIM_PROGRAM_ID).0, + sequence: find_emitter_sequence_address(emitter, &CORE_BRIDGE_PROGRAM_ID).0, + } + } +} + +pub struct PostMessageDerivedAccounts { + pub message: Pubkey, + pub sequence: Pubkey, +} + +pub fn burn_and_post<'info>( + cctp_ctx: CpiContext<'_, '_, '_, 'info, DepositForBurnWithCaller<'info>>, + burn_and_publish_args: BurnAndPublishArgs, + post_message_accounts: PostMessageAccounts, + account_infos: &[AccountInfo], +) -> Result<()> { + let BurnAndPublishArgs { + burn_source: _, + destination_caller, + destination_cctp_domain, + amount, + mint_recipient, + wormhole_message_nonce, + payload, + } = burn_and_publish_args; + + // Post message to the shim program + let post_message_ix = post_message::PostMessage { + program_id: &POST_MESSAGE_SHIM_PROGRAM_ID, + accounts: post_message::PostMessageAccounts { + emitter: &post_message_accounts.emitter, + payer: &post_message_accounts.payer, + wormhole_program_id: &CORE_BRIDGE_PROGRAM_ID, + derived: post_message::PostMessageDerivedAccounts { + message: Some(&post_message_accounts.derived.message), + sequence: Some(&post_message_accounts.derived.sequence), + core_bridge_config: Some(&CORE_BRIDGE_CONFIG), + fee_collector: Some(&CORE_BRIDGE_FEE_COLLECTOR), + event_authority: Some(&POST_MESSAGE_SHIM_EVENT_AUTHORITY), + }, + }, + data: post_message::PostMessageData::new( + wormhole_message_nonce, + Finality::Finalized, + &payload, + ) + .unwrap(), + } + .instruction(); + + invoke_signed_unchecked(&post_message_ix, account_infos, &[Custodian::SIGNER_SEEDS])?; + + // Deposit for burn + deposit_for_burn_with_caller( + cctp_ctx, + DepositForBurnWithCallerParams { + amount, + destination_domain: destination_cctp_domain, + mint_recipient, + destination_caller, + }, + )?; + Ok(()) +} diff --git a/solana/programs/matching-engine/src/fallback/processor/close_fast_market_order.rs b/solana/programs/matching-engine/src/fallback/processor/close_fast_market_order.rs new file mode 100644 index 00000000..220b80e4 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/close_fast_market_order.rs @@ -0,0 +1,82 @@ +use crate::state::FastMarketOrder; +use anchor_lang::prelude::*; +use solana_program::instruction::Instruction; +use solana_program::program_error::ProgramError; + +use super::helpers::check_account_length; +use super::FallbackMatchingEngineInstruction; + +pub struct CloseFastMarketOrderAccounts<'ix> { + /// The fast market order account created from the initialise fast market order instruction + pub fast_market_order: &'ix Pubkey, + /// The account that will receive the refund. CHECK: Must be a signer. + /// CHECK: Must match the close account refund recipient in the fast market order account + pub close_account_refund_recipient: &'ix Pubkey, +} + +impl<'ix> CloseFastMarketOrderAccounts<'ix> { + pub fn to_account_metas(&self) -> Vec { + vec![ + AccountMeta::new(*self.fast_market_order, false), + AccountMeta::new(*self.close_account_refund_recipient, true), + ] + } +} + +pub struct CloseFastMarketOrder<'ix> { + pub program_id: &'ix Pubkey, + pub accounts: CloseFastMarketOrderAccounts<'ix>, +} + +impl CloseFastMarketOrder<'_> { + pub fn instruction(&self) -> Instruction { + Instruction { + program_id: *self.program_id, + accounts: self.accounts.to_account_metas(), + data: FallbackMatchingEngineInstruction::CloseFastMarketOrder.to_vec(), + } + } +} + +/// Closes the fast market order and transfers the lamports from the fast market order to the close account refund recipient +/// +/// # Arguments +/// +/// * `accounts` - The accounts of the fast market order and the close account refund recipient +/// +/// # Returns +/// +/// Result<()> +pub fn close_fast_market_order(accounts: &[AccountInfo]) -> Result<()> { + check_account_length(accounts, 2)?; + + let fast_market_order = &accounts[0]; + let close_account_refund_recipient = &accounts[1]; + + if !close_account_refund_recipient.is_signer { + msg!("Refund recipient (account #2) is not a signer"); + return Err(ProgramError::InvalidAccountData.into()); + } + + let fast_market_order_data = + FastMarketOrder::try_deserialize(&mut &fast_market_order.data.borrow()[..])?; + if fast_market_order_data.close_account_refund_recipient + != close_account_refund_recipient.key().as_ref() + { + return Err(ProgramError::InvalidAccountData.into()).map_err(|e: Error| { + e.with_pubkeys(( + Pubkey::from(fast_market_order_data.close_account_refund_recipient), + close_account_refund_recipient.key(), + )) + }); + } + + // Transfer the lamports from the fast market order to the close account refund recipient + let mut fast_market_order_lamports = fast_market_order.lamports.borrow_mut(); + **close_account_refund_recipient.lamports.borrow_mut() = + (**close_account_refund_recipient.lamports.borrow()) + .saturating_add(**fast_market_order_lamports); + **fast_market_order_lamports = 0; + + Ok(()) +} diff --git a/solana/programs/matching-engine/src/fallback/processor/execute_order.rs b/solana/programs/matching-engine/src/fallback/processor/execute_order.rs new file mode 100644 index 00000000..57eb9bb4 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/execute_order.rs @@ -0,0 +1,718 @@ +use super::helpers::check_account_length; +use crate::state::{ + Auction, AuctionConfig, AuctionStatus, Custodian, FastMarketOrder as FastMarketOrderState, + MessageProtocol, RouterEndpoint, +}; +use crate::utils; +use crate::utils::auction::DepositPenalty; +use anchor_lang::prelude::*; +use anchor_spl::token::{spl_token, TokenAccount}; +use common::messages::Fill; +use common::wormhole_io::TypePrefixedPayload; +use solana_program::instruction::Instruction; +use solana_program::program::invoke_signed_unchecked; + +use super::burn_and_post::{burn_and_post, PostMessageAccounts}; +use super::FallbackMatchingEngineInstruction; +use crate::error::MatchingEngineError; + +#[derive(Debug, Clone, PartialEq, Eq, Copy)] +pub struct ExecuteOrderShimAccounts<'ix> { + /// The signer account + pub signer: &'ix Pubkey, // 0 + /// The cctp message account. CHECK: Seeds must be \["cctp-msg", auction_address.as_ref()\]. + pub cctp_message: &'ix Pubkey, // 1 + /// The custodian account of the auction (holds the best offer amount) + pub custodian: &'ix Pubkey, // 2 + /// The fast market order account created from the place initial offer instruction + /// CHECK: Seeds must be \["fast_market_order", auction_address.as_ref()\]. + pub fast_market_order: &'ix Pubkey, // 3 + /// The auction account created from the place initial offer instruction + pub active_auction: &'ix Pubkey, // 4 + /// The associated token address of the auction's custody token + pub active_auction_custody_token: &'ix Pubkey, // 5 + /// The auction config account created from the place initial offer instruction + pub active_auction_config: &'ix Pubkey, // 6 + /// The token account of the auction's best offer + pub active_auction_best_offer_token: &'ix Pubkey, // 7 + /// ??? + pub executor_token: &'ix Pubkey, // 8 + /// The token account of the auction's initial offer + pub initial_offer_token: &'ix Pubkey, // 9 + /// The account that signed the creation of the auction when placing the initial offer. + pub initial_participant: &'ix Pubkey, // 10 + /// The router endpoint account of the auction's target chain + pub to_router_endpoint: &'ix Pubkey, // 11 + /// The program id of the post message shim program + pub post_message_shim_program: &'ix Pubkey, // 12 + /// The sequence account of the post message shim program (can be derived) + pub post_message_sequence: &'ix Pubkey, // 13 + /// The message account of the post message shim program (can be derived) + pub post_message_message: &'ix Pubkey, // 14 + /// The mint account of the CCTP token to be burned + pub cctp_deposit_for_burn_mint: &'ix Pubkey, // 15 + /// The token messenger minter sender authority account of the CCTP token to be burned + pub cctp_deposit_for_burn_token_messenger_minter_sender_authority: &'ix Pubkey, // 16 + /// The message transmitter config account of the CCTP token to be burned + pub cctp_deposit_for_burn_message_transmitter_config: &'ix Pubkey, // 17 + /// The token messenger account of the CCTP token to be burned + pub cctp_deposit_for_burn_token_messenger: &'ix Pubkey, // 18 + /// The remote token messenger account of the CCTP token to be burned + pub cctp_deposit_for_burn_remote_token_messenger: &'ix Pubkey, // 19 + /// The token minter account of the CCTP token to be burned + pub cctp_deposit_for_burn_token_minter: &'ix Pubkey, // 20 + /// The local token account of the CCTP token to be burned + pub cctp_deposit_for_burn_local_token: &'ix Pubkey, // 21 + /// The token messenger minter event authority account of the CCTP token to be burned + pub cctp_deposit_for_burn_token_messenger_minter_event_authority: &'ix Pubkey, // 22 + /// The token messenger minter program account of the CCTP token to be burned + pub cctp_deposit_for_burn_token_messenger_minter_program: &'ix Pubkey, // 23 + /// The message transmitter program account of the CCTP token to be burned + pub cctp_deposit_for_burn_message_transmitter_program: &'ix Pubkey, // 24 + /// The program id of the core bridge program + pub core_bridge_program: &'ix Pubkey, // 25 + /// The config account of the core bridge program + pub core_bridge_config: &'ix Pubkey, // 26 + /// The fee collector account of the core bridge program + pub core_bridge_fee_collector: &'ix Pubkey, // 27 + /// The event authority account of the post message shim program + pub post_message_shim_event_authority: &'ix Pubkey, // 28 + /// The program id of the system program + pub system_program: &'ix Pubkey, // 29 + /// The program id of the token program + pub token_program: &'ix Pubkey, // 30 + /// The clock account + pub clock: &'ix Pubkey, // 31 +} + +impl<'ix> ExecuteOrderShimAccounts<'ix> { + pub fn to_account_metas(&self) -> Vec { + vec![ + AccountMeta::new(*self.signer, true), + AccountMeta::new(*self.cctp_message, false), + AccountMeta::new(*self.custodian, false), + AccountMeta::new_readonly(*self.fast_market_order, false), + AccountMeta::new(*self.active_auction, false), + AccountMeta::new(*self.active_auction_custody_token, false), + AccountMeta::new_readonly(*self.active_auction_config, false), + AccountMeta::new(*self.active_auction_best_offer_token, false), + AccountMeta::new(*self.executor_token, false), + AccountMeta::new(*self.initial_offer_token, false), + AccountMeta::new(*self.initial_participant, false), + AccountMeta::new_readonly(*self.to_router_endpoint, false), + AccountMeta::new_readonly(*self.post_message_shim_program, false), + AccountMeta::new(*self.post_message_sequence, false), + AccountMeta::new(*self.post_message_message, false), + AccountMeta::new(*self.cctp_deposit_for_burn_mint, false), + AccountMeta::new_readonly( + *self.cctp_deposit_for_burn_token_messenger_minter_sender_authority, + false, + ), + AccountMeta::new( + *self.cctp_deposit_for_burn_message_transmitter_config, + false, + ), + AccountMeta::new_readonly(*self.cctp_deposit_for_burn_token_messenger, false), + AccountMeta::new_readonly(*self.cctp_deposit_for_burn_remote_token_messenger, false), + AccountMeta::new_readonly(*self.cctp_deposit_for_burn_token_minter, false), + AccountMeta::new(*self.cctp_deposit_for_burn_local_token, false), + AccountMeta::new_readonly( + *self.cctp_deposit_for_burn_token_messenger_minter_event_authority, + false, + ), + AccountMeta::new_readonly( + *self.cctp_deposit_for_burn_token_messenger_minter_program, + false, + ), + AccountMeta::new_readonly( + *self.cctp_deposit_for_burn_message_transmitter_program, + false, + ), + AccountMeta::new_readonly(*self.core_bridge_program, false), + AccountMeta::new(*self.core_bridge_config, false), + AccountMeta::new(*self.core_bridge_fee_collector, false), + AccountMeta::new(*self.post_message_shim_event_authority, false), + AccountMeta::new_readonly(*self.system_program, false), + AccountMeta::new_readonly(*self.token_program, false), + AccountMeta::new_readonly(*self.clock, false), + ] + } +} + +pub struct ExecuteOrderCctpShim<'ix> { + pub program_id: &'ix Pubkey, + pub accounts: ExecuteOrderShimAccounts<'ix>, +} + +impl ExecuteOrderCctpShim<'_> { + pub fn instruction(&self) -> Instruction { + Instruction { + program_id: *self.program_id, + accounts: self.accounts.to_account_metas(), + data: FallbackMatchingEngineInstruction::ExecuteOrderCctpShim.to_vec(), + } + } +} + +pub fn handle_execute_order_shim(accounts: &[AccountInfo]) -> Result<()> { + // This saves stack space whereas having that in the body does not + check_account_length(accounts, 31)?; + + let program_id = &crate::ID; + + // Get the accounts + let signer_account = &accounts[0]; + let cctp_message_account = &accounts[1]; + let custodian_account = &accounts[2]; + let fast_market_order_account = &accounts[3]; + let active_auction_account = &accounts[4]; + let active_auction_custody_token_account = &accounts[5]; + let active_auction_config_account = &accounts[6]; + let active_auction_best_offer_token_account = &accounts[7]; + let executor_token_account = &accounts[8]; + let initial_offer_token_account = &accounts[9]; + let initial_participant_account = &accounts[10]; + let to_router_endpoint_account = &accounts[11]; + let _post_message_shim_program_account = &accounts[12]; + let _post_message_sequence_account = &accounts[13]; + let _post_message_message_account = &accounts[14]; + let cctp_deposit_for_burn_mint_account = &accounts[15]; + let cctp_deposit_for_burn_token_messenger_minter_sender_authority_account = &accounts[16]; + let cctp_deposit_for_burn_message_transmitter_config_account = &accounts[17]; + let cctp_deposit_for_burn_token_messenger_account = &accounts[18]; + let cctp_deposit_for_burn_remote_token_messenger_account = &accounts[19]; + let cctp_deposit_for_burn_token_minter_account = &accounts[20]; + let cctp_deposit_for_burn_local_token_account = &accounts[21]; + let cctp_deposit_for_burn_token_messenger_minter_event_authority_account = &accounts[22]; + let cctp_deposit_for_burn_token_messenger_minter_program_account = &accounts[23]; + let cctp_deposit_for_burn_message_transmitter_program_account = &accounts[24]; + let _core_bridge_program_account = &accounts[25]; + let _core_bridge_config_account = &accounts[26]; + let _core_bridge_fee_collector_account = &accounts[27]; + let _post_message_shim_event_authority_account = &accounts[28]; + let system_program_account = &accounts[29]; + let token_program_account = &accounts[30]; + + // Do checks + // ------------------------------------------------------------------------------------------------ + + let fast_market_order_zero_copy = + FastMarketOrderState::try_deserialize(&mut &fast_market_order_account.data.borrow()[..])?; + // Bind value for compiler (needed for pda seeds) + let active_auction_key = active_auction_account.key(); + + // Check cctp message is mutable + if !cctp_message_account.is_writable { + msg!("Cctp message is not writable"); + return Err(MatchingEngineError::AccountNotWritable.into()) + .map_err(|e: Error| e.with_account_name("cctp_message")); + } + + // Check cctp message seeds + let cctp_message_seeds = [ + common::CCTP_MESSAGE_SEED_PREFIX, + active_auction_key.as_ref(), + ]; + + let (cctp_message_pda, cctp_message_bump) = + Pubkey::find_program_address(&cctp_message_seeds, program_id); + if cctp_message_pda != cctp_message_account.key() { + msg!("Cctp message seeds are invalid"); + return Err(ErrorCode::ConstraintSeeds.into()) + .map_err(|e: Error| e.with_pubkeys((cctp_message_pda, cctp_message_account.key()))); + }; + + // Check custodian owner + if custodian_account.owner != program_id { + msg!( + "Custodian owner is invalid: expected {}, got {}", + program_id, + custodian_account.owner + ); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("custodian")); + }; + + // Check custodian is not paused + let checked_custodian = Custodian::try_deserialize(&mut &custodian_account.data.borrow()[..])?; + if checked_custodian.paused { + msg!("Custodian is paused"); + return Err(ErrorCode::ConstraintRaw.into()) + .map_err(|e: Error| e.with_account_name("custodian")); + }; + + let fast_market_order_digest = fast_market_order_zero_copy.digest(); + // Check fast market order seeds + let fast_market_order_seeds = [ + FastMarketOrderState::SEED_PREFIX, + fast_market_order_digest.as_ref(), + fast_market_order_zero_copy + .close_account_refund_recipient + .as_ref(), + ]; + + let (fast_market_order_pda, _fast_market_order_bump) = + Pubkey::find_program_address(&fast_market_order_seeds, program_id); + if fast_market_order_pda != fast_market_order_account.key() { + msg!("Fast market order seeds are invalid"); + return Err(ErrorCode::ConstraintSeeds.into()).map_err(|e: Error| { + e.with_pubkeys((fast_market_order_pda, fast_market_order_account.key())) + }); + }; + + // Check fast market order is owned by the matching engine program + if fast_market_order_account.owner != program_id { + msg!("Fast market order is not owned by the matching engine program"); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("fast_market_order")); + }; + + // Check active auction owner + if active_auction_account.owner != program_id { + msg!("Active auction is not owned by the matching engine program"); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("active_auction")); + }; + + // Check active auction pda + let mut active_auction = + Auction::try_deserialize(&mut &active_auction_account.data.borrow()[..])?; + + // Correct way to use create_program_address with existing seeds and bump + let active_auction_pda = Pubkey::create_program_address( + &[ + Auction::SEED_PREFIX, + active_auction.vaa_hash.as_ref(), + &[active_auction.bump], + ], + program_id, + ) + .map_err(|_| { + msg!("Failed to create program address with known bump"); + MatchingEngineError::InvalidPda + })?; + if active_auction_pda != active_auction_account.key() { + msg!("Active auction pda is invalid"); + return Err(ErrorCode::ConstraintSeeds.into()).map_err(|e: Error| { + e.with_pubkeys((active_auction_pda, active_auction_account.key())) + }); + }; + + // Check active auction is active + if active_auction.status != AuctionStatus::Active { + msg!("Active auction is not active"); + return Err(ErrorCode::ConstraintRaw.into()) + .map_err(|e: Error| e.with_account_name("active_auction")); + }; + + // Check active auction custody token pda + let active_auction_custody_token_pda = Pubkey::create_program_address( + &[ + crate::AUCTION_CUSTODY_TOKEN_SEED_PREFIX, + active_auction_account.key().as_ref(), + &[active_auction.info.as_ref().unwrap().custody_token_bump], + ], + program_id, + ) + .map_err(|_| { + msg!("Failed to create program address with known bump"); + MatchingEngineError::InvalidPda + })?; + if active_auction_custody_token_pda != active_auction_custody_token_account.key() { + msg!("Active auction custody token pda is invalid"); + return Err(ErrorCode::ConstraintSeeds.into()).map_err(|e: Error| { + e.with_pubkeys(( + active_auction_custody_token_pda, + active_auction_custody_token_account.key(), + )) + }); + }; + + // Check active auction config id + let active_auction_config = + AuctionConfig::try_deserialize(&mut &active_auction_config_account.data.borrow()[..])?; + if active_auction_config.id != active_auction.info.as_ref().unwrap().config_id { + msg!("Active auction config id is invalid"); + return Err(MatchingEngineError::AuctionConfigMismatch.into()) + .map_err(|e: Error| e.with_account_name("active_auction_config")); + }; + + // Check that the auction has reached its deadline + let auction_info = active_auction.info.as_ref().unwrap(); + if auction_info.within_auction_duration(&active_auction_config.parameters) { + msg!("Auction has not reached its deadline"); + return Err(MatchingEngineError::AuctionPeriodNotExpired.into()) + .map_err(|e: Error| e.with_account_name("active_auction")); + } + + // Check active auction best offer token address + if active_auction_best_offer_token_account.key() + != active_auction.info.as_ref().unwrap().best_offer_token + { + msg!("Active auction best offer token address is invalid"); + return Err(ErrorCode::ConstraintAddress.into()).map_err(|e: Error| { + e.with_pubkeys(( + active_auction_best_offer_token_account.key(), + active_auction.info.as_ref().unwrap().best_offer_token, + )) + }); + }; + + // TODO: Done with auction checks, now on to executor token checks + if executor_token_account.key() != active_auction.info.as_ref().unwrap().best_offer_token { + msg!("Executor token is not equal to best offer token"); + return Err(ErrorCode::ConstraintAddress.into()).map_err(|e: Error| { + e.with_pubkeys(( + executor_token_account.key(), + active_auction.info.as_ref().unwrap().best_offer_token, + )) + }); + }; + + // Check initial offer token address + if initial_offer_token_account.key() + != active_auction.info.as_ref().unwrap().initial_offer_token + { + msg!("Initial offer token address is invalid"); + return Err(ErrorCode::ConstraintAddress.into()).map_err(|e: Error| { + e.with_pubkeys(( + initial_offer_token_account.key(), + active_auction.info.as_ref().unwrap().initial_offer_token, + )) + }); + }; + + // Check initial participant address + if initial_participant_account.key() != active_auction.prepared_by { + msg!("Initial participant address is invalid"); + return Err(ErrorCode::ConstraintAddress.into()).map_err(|e: Error| { + e.with_pubkeys(( + initial_participant_account.key(), + active_auction.prepared_by, + )) + }); + }; + + let to_router_endpoint = + RouterEndpoint::try_deserialize(&mut &to_router_endpoint_account.data.borrow()[..])?; + if to_router_endpoint.protocol != active_auction.target_protocol { + msg!("To router endpoint protocol is invalid"); + return Err(MatchingEngineError::InvalidEndpoint.into()) + .map_err(|e: Error| e.with_account_name("to_router_endpoint")); + }; + + let destination_cctp_domain = match to_router_endpoint.protocol { + MessageProtocol::Cctp { domain } => domain, + _ => { + return Err(MatchingEngineError::InvalidCctpEndpoint.into()) + .map_err(|e: Error| e.with_account_name("to_router_endpoint")) + } + }; + + // Check cctp deposit for burn token messenger minter program address + if cctp_deposit_for_burn_token_messenger_minter_program_account.key() + != common::wormhole_cctp_solana::cctp::token_messenger_minter_program::id() + { + msg!("Cctp deposit for burn token messenger minter program address is invalid"); + return Err(ErrorCode::ConstraintAddress.into()).map_err(|e: Error| { + e.with_pubkeys(( + cctp_deposit_for_burn_token_messenger_minter_program_account.key(), + common::wormhole_cctp_solana::cctp::token_messenger_minter_program::id(), + )) + }); + }; + + // Check cctp deposit for burn message transmitter program address + if cctp_deposit_for_burn_message_transmitter_program_account.key() + != common::wormhole_cctp_solana::cctp::message_transmitter_program::id() + { + msg!("Cctp deposit for burn message transmitter program address is invalid"); + return Err(ErrorCode::ConstraintAddress.into()).map_err(|e: Error| { + e.with_pubkeys(( + cctp_deposit_for_burn_message_transmitter_program_account.key(), + common::wormhole_cctp_solana::cctp::message_transmitter_program::id(), + )) + }); + }; + + // End of checks + // ------------------------------------------------------------------------------------------------ + + // Get the fast market order data, without the discriminator + let fast_market_order_data = &fast_market_order_account.data.borrow()[8..]; + // Deserialise fast market order. Unwrap is safe because the account is owned by the matching engine program. + let fast_market_order = + bytemuck::try_from_bytes::(fast_market_order_data).unwrap(); + + // Prepare the execute order (get the user amount, fill, and order executed event) + let active_auction_info = active_auction.info.as_ref().unwrap(); + let current_slot = Clock::get().unwrap().slot; + + // We extend the grace period for locally executed orders. Reserving a sequence number for + // the fast fill will most likely require an additional transaction, so this buffer allows + // the best offer participant to perform his duty without the risk of getting slashed by + // another executor. + let additional_grace_period = match active_auction.target_protocol { + MessageProtocol::Local { .. } => { + crate::EXECUTE_FAST_ORDER_LOCAL_ADDITIONAL_GRACE_PERIOD.into() + } + _ => None, + }; + + let DepositPenalty { + penalty, + user_reward, + } = utils::auction::compute_deposit_penalty( + &active_auction_config.parameters, + active_auction_info, + current_slot, + additional_grace_period, + ); + + let init_auction_fee = fast_market_order.init_auction_fee; + + let user_amount = active_auction_info + .amount_in + .saturating_sub(active_auction_info.offer_price) + .saturating_sub(init_auction_fee) + .saturating_add(user_reward); + + // Keep track of the remaining amount in the custody token account. Whatever remains will go + // to the executor. + + let custody_token = TokenAccount::try_deserialize( + &mut &active_auction_custody_token_account.data.borrow()[..], + )?; + let mut remaining_custodied_amount = custody_token.amount.saturating_sub(user_amount); + + // Offer price + security deposit was checked in placing the initial offer. + let mut deposit_and_fee = active_auction_info + .offer_price + .saturating_add(active_auction_info.security_deposit) + .saturating_sub(user_reward); + + msg!("Security deposit: {}", active_auction_info.security_deposit); + + let penalized = penalty > 0; + + if penalized && active_auction_best_offer_token_account.key() != executor_token_account.key() { + deposit_and_fee = deposit_and_fee.saturating_sub(penalty); + } + + // Need these seeds in order to transfer tokens and then set authority of auction custody token account to the custodian + let auction_signer_seeds = &[ + Auction::SEED_PREFIX, + active_auction.vaa_hash.as_ref(), + &[active_auction.bump], + ]; + + // If the initial offer token account doesn't exist anymore, we have nowhere to send the + // init auction fee. The executor will get these funds instead. + // + // We check that this is a legitimate token account. + if utils::checked_deserialize_token_account(initial_offer_token_account, &common::USDC_MINT) + .is_some() + { + msg!("Initial offer token account exists"); + if active_auction_best_offer_token_account.key() != initial_offer_token_account.key() { + // Pay the auction initiator their fee. + let transfer_ix = spl_token::instruction::transfer( + &spl_token::ID, + &active_auction_custody_token_account.key(), + &initial_offer_token_account.key(), + &active_auction_account.key(), + &[], + init_auction_fee, + ) + .unwrap(); + msg!( + "Sending init auction fee {} to initial offer token account", + init_auction_fee + ); + invoke_signed_unchecked(&transfer_ix, accounts, &[auction_signer_seeds])?; + // Because the initial offer token was paid this fee, we account for it here. + remaining_custodied_amount = + remaining_custodied_amount.saturating_sub(init_auction_fee); + } else { + // Add it to the reimbursement. + deposit_and_fee = deposit_and_fee + .checked_add(init_auction_fee) + .ok_or_else(|| MatchingEngineError::U64Overflow)?; + msg!("New deposit and fee: {}", deposit_and_fee); + } + } + + // Return the security deposit and the fee to the highest bidder. + if active_auction_best_offer_token_account.key() == executor_token_account.key() { + // If the best offer token is equal to the executor token, just send whatever remains in + // the custody token account. + // + // NOTE: This will revert if the best offer token does not exist. But this will present + // an opportunity for another executor to execute this order and take what the best + // offer token would have received. + let transfer_ix = spl_token::instruction::transfer( + &spl_token::ID, + &active_auction_custody_token_account.key(), + &active_auction_best_offer_token_account.key(), + &active_auction_account.key(), + &[], + deposit_and_fee, + ) + .unwrap(); + msg!( + "Sending deposit and fee amount {} to best offer token account", + deposit_and_fee + ); + invoke_signed_unchecked(&transfer_ix, accounts, &[auction_signer_seeds])?; + } else { + // Otherwise, send the deposit and fee to the best offer token. If the best offer token + // doesn't exist at this point (which would be unusual), we will reserve these funds + // for the executor token. + if utils::checked_deserialize_token_account( + active_auction_best_offer_token_account, + &common::USDC_MINT, + ) + .is_some() + { + let transfer_ix = spl_token::instruction::transfer( + &spl_token::ID, + &active_auction_custody_token_account.key(), + &active_auction_best_offer_token_account.key(), + &active_auction_account.key(), + &[], + deposit_and_fee, + ) + .unwrap(); + msg!( + "Sending deposit and fee {} to best offer token account", + deposit_and_fee + ); + invoke_signed_unchecked(&transfer_ix, accounts, &[auction_signer_seeds])?; + remaining_custodied_amount = remaining_custodied_amount.saturating_sub(deposit_and_fee); + } + + // And pay the executor whatever remains in the auction custody token account. + if remaining_custodied_amount > 0 { + let instruction = spl_token::instruction::transfer( + &spl_token::ID, + &active_auction_custody_token_account.key(), + &executor_token_account.key(), + &active_auction_account.key(), + &[], + remaining_custodied_amount, + ) + .unwrap(); + msg!( + "Sending remaining custodied amount {} to executor token account", + remaining_custodied_amount + ); + invoke_signed_unchecked(&instruction, accounts, &[auction_signer_seeds])?; + } + } + + // Set the authority of the custody token account to the custodian. He will take over from + // here. + let set_authority_ix = spl_token::instruction::set_authority( + &spl_token::ID, + &active_auction_custody_token_account.key(), + Some(&custodian_account.key()), + spl_token::instruction::AuthorityType::AccountOwner, + &active_auction_account.key(), + &[], + ) + .unwrap(); + + invoke_signed_unchecked(&set_authority_ix, accounts, &[auction_signer_seeds])?; + + // Set the active auction status + active_auction.status = AuctionStatus::Completed { + slot: current_slot, + execute_penalty: if penalized { penalty.into() } else { None }, + }; + + let active_auction_data: &mut [u8] = &mut active_auction_account.data.borrow_mut(); + let mut cursor = std::io::Cursor::new(active_auction_data); + active_auction.try_serialize(&mut cursor).unwrap(); + + let fill = Fill { + source_chain: active_auction_info.source_chain, + order_sender: fast_market_order.sender, + redeemer: fast_market_order.redeemer, + redeemer_message: fast_market_order.redeemer_message + [..usize::from(fast_market_order.redeemer_message_length)] + .to_vec() + .try_into() + .unwrap(), + }; + + let post_message_accounts = + PostMessageAccounts::new(custodian_account.key(), signer_account.key()); + // Lets print the auction account balance + + burn_and_post( + CpiContext::new_with_signer( + cctp_deposit_for_burn_token_messenger_minter_program_account.to_account_info(), + common::wormhole_cctp_solana::cpi::DepositForBurnWithCaller { + burn_token_owner: custodian_account.to_account_info(), + payer: signer_account.to_account_info(), + token_messenger_minter_sender_authority: + cctp_deposit_for_burn_token_messenger_minter_sender_authority_account + .to_account_info(), + burn_token: active_auction_custody_token_account.to_account_info(), + message_transmitter_config: + cctp_deposit_for_burn_message_transmitter_config_account.to_account_info(), + token_messenger: cctp_deposit_for_burn_token_messenger_account.to_account_info(), + remote_token_messenger: cctp_deposit_for_burn_remote_token_messenger_account + .to_account_info(), + token_minter: cctp_deposit_for_burn_token_minter_account.to_account_info(), + local_token: cctp_deposit_for_burn_local_token_account.to_account_info(), + mint: cctp_deposit_for_burn_mint_account.to_account_info(), + cctp_message: cctp_message_account.to_account_info(), + message_transmitter_program: + cctp_deposit_for_burn_message_transmitter_program_account.to_account_info(), + token_messenger_minter_program: + cctp_deposit_for_burn_token_messenger_minter_program_account.to_account_info(), + token_program: token_program_account.to_account_info(), + system_program: system_program_account.to_account_info(), + event_authority: + cctp_deposit_for_burn_token_messenger_minter_event_authority_account + .to_account_info(), + }, + &[ + Custodian::SIGNER_SEEDS, + &[ + common::CCTP_MESSAGE_SEED_PREFIX, + active_auction_account.key().as_ref(), + &[cctp_message_bump], + ], + ], + ), + common::wormhole_cctp_solana::cpi::BurnAndPublishArgs { + burn_source: None, + destination_caller: to_router_endpoint.address, + destination_cctp_domain, + amount: user_amount, + mint_recipient: to_router_endpoint.mint_recipient, + wormhole_message_nonce: common::WORMHOLE_MESSAGE_NONCE, + payload: fill.to_vec(), + }, + post_message_accounts, + accounts, + )?; + + // Skip emitting the order executed event because we're using a shim + + // Finally close the account since it is no longer needed. + let instruction = spl_token::instruction::close_account( + &spl_token::ID, + &active_auction_custody_token_account.key(), + &initial_participant_account.key(), + &custodian_account.key(), + &[], + ) + .unwrap(); + + invoke_signed_unchecked(&instruction, accounts, &[Custodian::SIGNER_SEEDS])?; + + Ok(()) +} diff --git a/solana/programs/matching-engine/src/fallback/processor/helpers.rs b/solana/programs/matching-engine/src/fallback/processor/helpers.rs new file mode 100644 index 00000000..41633677 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/helpers.rs @@ -0,0 +1,131 @@ +use anchor_lang::prelude::*; + +use solana_program::{ + entrypoint::ProgramResult, + instruction::{AccountMeta, Instruction}, + program::invoke_signed_unchecked, + system_instruction, +}; + +#[inline(always)] +pub fn check_account_length(accounts: &[AccountInfo], len: usize) -> Result<()> { + if accounts.len() < len { + return Err(ErrorCode::AccountNotEnoughKeys.into()); + } + Ok(()) +} + +pub fn create_account_reliably( + payer_key: &Pubkey, + account_key: &Pubkey, + current_lamports: u64, + data_len: usize, + accounts: &[AccountInfo], + program_id: &Pubkey, + signer_seeds: &[&[&[u8]]], +) -> ProgramResult { + let lamports = Rent::get().unwrap().minimum_balance(data_len); + + if current_lamports == 0 { + let ix = system_instruction::create_account( + payer_key, + account_key, + lamports, + u64::try_from(data_len).unwrap(), // lol it won't do ::from + program_id, + ); + + invoke_signed_unchecked(&ix, accounts, signer_seeds)?; + } else { + const MAX_CPI_DATA_LEN: usize = 36; + + // Perform up to three CPIs: + // 1. Transfer lamports from payer to account (may not be necessary). + // 2. Allocate data to the account. + // 3. Assign the account owner to this program. + // + // The max length of instruction data is 36 bytes among the three + // instructions, so we will reuse the same allocated memory for all. + let mut cpi_ix = Instruction { + program_id: solana_program::system_program::ID, + accounts: vec![ + AccountMeta::new(*payer_key, true), + AccountMeta::new(*account_key, true), + ], + data: Vec::with_capacity(MAX_CPI_DATA_LEN), + }; + + // Safety: Because capacity is > 12, it is safe to set this length. + unsafe { + cpi_ix.data.set_len(12); + } + + // We will have to transfer the remaining lamports needed to cover rent + // for the account. + let lamport_diff = lamports.saturating_sub(current_lamports); + + // Only invoke transfer if there are lamports required. + if lamport_diff != 0 { + let cpi_data = &mut cpi_ix.data; + + // Safety: Because the capacity is > 4, it is safe to write to the + // first 4 elements, which covers the System program instruction + // selectors. + // + // The transfer and allocate instructions are 12 bytes long: + // - 4 bytes for the discriminator + // - 8 bytes for the lamports (transfer) or data length (allocate) + // + // The last 8 bytes will be copied to the data slice. + unsafe { + core::ptr::write_bytes(cpi_data.as_mut_ptr(), 0, 4); + } + cpi_data[0] = 2; // transfer selector + cpi_data[4..12].copy_from_slice(&lamport_diff.to_le_bytes()); + + invoke_signed_unchecked(&cpi_ix, accounts, signer_seeds)?; + } + + let cpi_accounts = &mut cpi_ix.accounts; + + // Safety: Setting the length reduces the previous length from the last + // CPI call. + // + // Both allocate and assign instructions require one account (the + // account being created). + unsafe { + cpi_accounts.set_len(1); + } + + // Because the payer and account are writable signers, we can simply + // overwrite the pubkey of the first account. + cpi_accounts[0].pubkey = *account_key; + + { + let cpi_data = &mut cpi_ix.data; + + cpi_data[0] = 8; // allocate selector + cpi_data[4..12].copy_from_slice(&u64::try_from(data_len).unwrap().to_le_bytes()); + // ↑ + // It won't do ::from but it'll do ::try_from + invoke_signed_unchecked(&cpi_ix, accounts, signer_seeds)?; + } + + { + let cpi_data = &mut cpi_ix.data; + + // Safety: The capacity of this vector is 36. This data will be + // overwritten for the next CPI call. + unsafe { + cpi_data.set_len(MAX_CPI_DATA_LEN); + } + + cpi_data[0] = 1; // assign selector + cpi_data[4..36].copy_from_slice(&program_id.to_bytes()); + + invoke_signed_unchecked(&cpi_ix, accounts, signer_seeds)?; + } + } + + Ok(()) +} diff --git a/solana/programs/matching-engine/src/fallback/processor/initialise_fast_market_order.rs b/solana/programs/matching-engine/src/fallback/processor/initialise_fast_market_order.rs new file mode 100644 index 00000000..302fb98a --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/initialise_fast_market_order.rs @@ -0,0 +1,217 @@ +use anchor_lang::prelude::*; +use anchor_lang::Discriminator; +use bytemuck::{Pod, Zeroable}; +use solana_program::instruction::Instruction; +use solana_program::program::invoke_signed_unchecked; + +use super::helpers::create_account_reliably; + +use super::helpers::check_account_length; +use super::FallbackMatchingEngineInstruction; +use crate::error::MatchingEngineError; +use crate::state::FastMarketOrder as FastMarketOrderState; + +pub struct InitialiseFastMarketOrderAccounts<'ix> { + /// The signer of the transaction + pub signer: &'ix Pubkey, + /// The fast market order account pubkey (that is created by the instruction) + pub fast_market_order_account: &'ix Pubkey, + /// The guardian set account pubkey + pub guardian_set: &'ix Pubkey, + /// The guardian set signatures account pubkey (created by the post verify vaa shim program) + pub guardian_set_signatures: &'ix Pubkey, + /// The verify vaa shim program pubkey + pub verify_vaa_shim_program: &'ix Pubkey, + /// The system program account pubkey + pub system_program: &'ix Pubkey, +} + +impl<'ix> InitialiseFastMarketOrderAccounts<'ix> { + pub fn to_account_metas(&self) -> Vec { + vec![ + AccountMeta::new(*self.signer, true), // This will be the refund recipient + AccountMeta::new(*self.fast_market_order_account, false), + AccountMeta::new_readonly(*self.guardian_set, false), + AccountMeta::new_readonly(*self.guardian_set_signatures, false), + AccountMeta::new(*self.verify_vaa_shim_program, false), + AccountMeta::new(*self.system_program, false), + ] + } +} + +#[derive(Debug, Copy, Clone, Pod, Zeroable)] +#[repr(C)] +pub struct InitialiseFastMarketOrderData { + /// The fast market order as the bytemuck struct + pub fast_market_order: FastMarketOrderState, + /// The guardian set bump + pub guardian_set_bump: u8, + /// Padding to ensure bytemuck deserialization works + _padding: [u8; 7], +} +impl InitialiseFastMarketOrderData { + // Adds the padding to the InitialiseFastMarketOrderData + pub fn new(fast_market_order: FastMarketOrderState, guardian_set_bump: u8) -> Self { + Self { + fast_market_order, + guardian_set_bump, + _padding: [0_u8; 7], + } + } + + /// Deserializes the InitialiseFastMarketOrderData from a byte slice + /// + /// # Arguments + /// + /// * `data` - A byte slice containing the InitialiseFastMarketOrderData + /// + /// # Returns + /// + /// Option<&Self> - The deserialized InitialiseFastMarketOrderData or None if the byte slice is not the correct length + pub fn from_bytes(data: &[u8]) -> Option<&Self> { + bytemuck::try_from_bytes::(data).ok() + } +} + +pub struct InitialiseFastMarketOrder<'ix> { + pub program_id: &'ix Pubkey, + pub accounts: InitialiseFastMarketOrderAccounts<'ix>, + pub data: InitialiseFastMarketOrderData, +} + +impl InitialiseFastMarketOrder<'_> { + pub fn instruction(&self) -> Instruction { + Instruction { + program_id: *self.program_id, + accounts: self.accounts.to_account_metas(), + data: FallbackMatchingEngineInstruction::InitialiseFastMarketOrder(&self.data).to_vec(), + } + } +} + +/// Initialises the fast market order account +/// +/// The verify shim program first checks that the digest of the fast market order is correct, and that the guardian signature is correct and recoverable. +/// If this is the case, the fast market order account is created. The fast market order account is owned by the matching engine program. It can be closed +/// by the close fast market order instruction, which returns the lamports to the close account refund recipient. +/// +/// # Arguments +/// +/// * `accounts` - The accounts of the fast market order and the guardian set +/// +/// # Returns +/// +/// Result<()> +pub fn initialise_fast_market_order( + accounts: &[AccountInfo], + data: &InitialiseFastMarketOrderData, +) -> Result<()> { + check_account_length(accounts, 6)?; + + let program_id = crate::ID; + + let signer = &accounts[0]; + let fast_market_order_account = &accounts[1]; + let guardian_set = &accounts[2]; + let guardian_set_signatures = &accounts[3]; + let _verify_vaa_shim_program = &accounts[4]; + let _system_program = &accounts[5]; + + let InitialiseFastMarketOrderData { + fast_market_order, + guardian_set_bump, + _padding: _, + } = *data; + + // Start of cpi call to verify the shim. + // ------------------------------------------------------------------------------------------------ + let fast_market_order_digest = fast_market_order.digest(); + // Did not want to pass in the vaa hash here. So recreated it. + let verify_hash_data = { + let mut data = vec![]; + data.extend_from_slice( + &wormhole_svm_shim::verify_vaa::VerifyVaaShimInstruction::::VERIFY_HASH_SELECTOR, + ); + data.push(guardian_set_bump); + data.extend_from_slice(&fast_market_order_digest); + data + }; + let verify_shim_ix = Instruction { + program_id: wormhole_svm_definitions::solana::VERIFY_VAA_SHIM_PROGRAM_ID, + accounts: vec![ + AccountMeta::new_readonly(guardian_set.key(), false), + AccountMeta::new_readonly(guardian_set_signatures.key(), false), + ], + data: verify_hash_data, + }; + // Make the cpi call to verify the shim. + invoke_signed_unchecked( + &verify_shim_ix, + &[ + guardian_set.to_account_info(), + guardian_set_signatures.to_account_info(), + ], + &[], + )?; + // ------------------------------------------------------------------------------------------------ + // End of cpi call to verify the shim. + + // Start of fast market order account creation + // ------------------------------------------------------------------------------------------------ + let fast_market_order_key = fast_market_order_account.key(); + let space = 8_usize.saturating_add(std::mem::size_of::()); + let (fast_market_order_pda, fast_market_order_bump) = Pubkey::find_program_address( + &[ + FastMarketOrderState::SEED_PREFIX, + fast_market_order_digest.as_ref(), + fast_market_order.close_account_refund_recipient.as_ref(), + ], + &program_id, + ); + + if fast_market_order_pda != fast_market_order_key { + msg!("Fast market order pda is invalid"); + return Err(MatchingEngineError::InvalidPda.into()) + .map_err(|e: Error| e.with_pubkeys((fast_market_order_key, fast_market_order_pda))); + } + let fast_market_order_seeds = [ + FastMarketOrderState::SEED_PREFIX, + fast_market_order_digest.as_ref(), + fast_market_order.close_account_refund_recipient.as_ref(), + &[fast_market_order_bump], + ]; + let fast_market_order_signer_seeds = &[&fast_market_order_seeds[..]]; + // Create the account using the system program. The create account reliably ensures that the account creation cannot be raced. + create_account_reliably( + &signer.key(), + &fast_market_order_key, + fast_market_order_account.lamports(), + space, + accounts, + &program_id, + fast_market_order_signer_seeds, + )?; + + // Borrow the account data mutably + let mut fast_market_order_account_data = fast_market_order_account.try_borrow_mut_data()?; + + // Write the discriminator to the first 8 bytes + let discriminator = FastMarketOrderState::discriminator(); + fast_market_order_account_data[0..8].copy_from_slice(&discriminator); + + let fast_market_order_bytes = bytemuck::bytes_of(&data.fast_market_order); + // Ensure the destination has enough space + if fast_market_order_account_data.len() < 8_usize.saturating_add(fast_market_order_bytes.len()) + { + msg!("Account data buffer too small"); + return Err(MatchingEngineError::AccountDataTooSmall.into()); + } + + // Write the fast_market_order struct to the account + fast_market_order_account_data[8..8_usize.saturating_add(fast_market_order_bytes.len())] + .copy_from_slice(fast_market_order_bytes); + // End of fast market order account creation + // ------------------------------------------------------------------------------------------------ + + Ok(()) +} diff --git a/solana/programs/matching-engine/src/fallback/processor/mod.rs b/solana/programs/matching-engine/src/fallback/processor/mod.rs new file mode 100644 index 00000000..a0e155c5 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/mod.rs @@ -0,0 +1,10 @@ +pub mod process_instruction; +pub use process_instruction::*; +pub mod burn_and_post; +pub mod close_fast_market_order; +pub mod execute_order; +pub mod initialise_fast_market_order; +pub mod place_initial_offer; +// pub mod prepare_order_response; + +pub mod helpers; diff --git a/solana/programs/matching-engine/src/fallback/processor/place_initial_offer.rs b/solana/programs/matching-engine/src/fallback/processor/place_initial_offer.rs new file mode 100644 index 00000000..4b1bd989 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/place_initial_offer.rs @@ -0,0 +1,529 @@ +use super::helpers::check_account_length; +use super::helpers::create_account_reliably; +use crate::state::{ + Auction, AuctionConfig, AuctionInfo, AuctionStatus, Custodian, + FastMarketOrder as FastMarketOrderState, MessageProtocol, RouterEndpoint, +}; +use crate::ID as PROGRAM_ID; +use anchor_lang::prelude::*; +use anchor_lang::Discriminator; +use anchor_spl::token::spl_token; +use bytemuck::{Pod, Zeroable}; +use common::TRANSFER_AUTHORITY_SEED_PREFIX; +use solana_program::instruction::Instruction; +use solana_program::keccak; +use solana_program::program::invoke_signed_unchecked; +use solana_program::program_pack::Pack; + +use super::FallbackMatchingEngineInstruction; +use crate::error::MatchingEngineError; + +#[derive(Debug, Copy, Clone, Pod, Zeroable)] +#[repr(C)] +pub struct PlaceInitialOfferCctpShimData { + pub offer_price: u64, +} + +impl PlaceInitialOfferCctpShimData { + pub fn new(offer_price: u64) -> Self { + Self { offer_price } + } + + pub fn from_bytes(data: &[u8]) -> Option<&Self> { + bytemuck::try_from_bytes::(data).ok() + } +} + +#[derive(Debug, Clone, PartialEq, Eq, Copy)] +pub struct PlaceInitialOfferCctpShimAccounts<'ix> { + pub signer: &'ix Pubkey, + pub transfer_authority: &'ix Pubkey, + pub custodian: &'ix Pubkey, + pub auction_config: &'ix Pubkey, + pub from_endpoint: &'ix Pubkey, + pub to_endpoint: &'ix Pubkey, + pub fast_market_order: &'ix Pubkey, // Needs initalising. Seeds are [FastMarketOrderState::SEED_PREFIX, auction_address.as_ref()] + pub auction: &'ix Pubkey, // Needs initalising + pub offer_token: &'ix Pubkey, + pub auction_custody_token: &'ix Pubkey, + pub usdc: &'ix Pubkey, + pub system_program: &'ix Pubkey, + pub token_program: &'ix Pubkey, +} + +impl<'ix> PlaceInitialOfferCctpShimAccounts<'ix> { + pub fn to_account_metas(&self) -> Vec { + vec![ + AccountMeta::new(*self.signer, true), + AccountMeta::new_readonly(*self.transfer_authority, false), + AccountMeta::new_readonly(*self.custodian, false), + AccountMeta::new_readonly(*self.auction_config, false), + AccountMeta::new_readonly(*self.from_endpoint, false), + AccountMeta::new_readonly(*self.to_endpoint, false), + AccountMeta::new(*self.fast_market_order, false), + AccountMeta::new(*self.auction, false), + AccountMeta::new(*self.offer_token, false), + AccountMeta::new(*self.auction_custody_token, false), + AccountMeta::new_readonly(*self.usdc, false), + AccountMeta::new_readonly(*self.system_program, false), + AccountMeta::new_readonly(*self.token_program, false), + ] + } +} + +#[derive(Debug, Clone, Copy)] +pub struct PlaceInitialOfferCctpShim<'ix> { + pub program_id: &'ix Pubkey, + pub accounts: PlaceInitialOfferCctpShimAccounts<'ix>, + pub data: PlaceInitialOfferCctpShimData, +} + +impl PlaceInitialOfferCctpShim<'_> { + pub fn instruction(&self) -> Instruction { + Instruction { + program_id: *self.program_id, + accounts: self.accounts.to_account_metas(), + data: FallbackMatchingEngineInstruction::PlaceInitialOfferCctpShim(&self.data).to_vec(), + } + } +} + +/// VaaMessageBodyHeader for the digest calculation +/// +/// This is the header of the vaa message body. It is used to calculate the digest of the fast market order. +#[derive(Debug)] +pub struct VaaMessageBodyHeader { + pub consistency_level: u8, + pub vaa_time: u32, + pub nonce: u32, + pub sequence: u64, + pub emitter_chain: u16, + pub emitter_address: [u8; 32], +} + +impl VaaMessageBodyHeader { + pub fn new( + consistency_level: u8, + vaa_time: u32, + sequence: u64, + emitter_chain: u16, + emitter_address: [u8; 32], + ) -> Self { + Self { + consistency_level, + vaa_time, + nonce: 0, + sequence, + emitter_chain, + emitter_address, + } + } + + /// This function creates both the message body and the payload. + /// This is all done here just because it's (supposedly?) cheaper in the solana vm. + pub fn message_body(&self, fast_market_order: &FastMarketOrderState) -> Vec { + let mut message_body = vec![]; + message_body.extend_from_slice(&self.vaa_time.to_be_bytes()); + message_body.extend_from_slice(&self.nonce.to_be_bytes()); + message_body.extend_from_slice(&self.emitter_chain.to_be_bytes()); + message_body.extend_from_slice(&self.emitter_address); + message_body.extend_from_slice(&self.sequence.to_be_bytes()); + message_body.extend_from_slice(&[self.consistency_level]); + let mut payload = vec![]; + payload.push(11_u8); + payload.extend_from_slice(&fast_market_order.amount_in.to_be_bytes()); + payload.extend_from_slice(&fast_market_order.min_amount_out.to_be_bytes()); + payload.extend_from_slice(&fast_market_order.target_chain.to_be_bytes()); + payload.extend_from_slice(&fast_market_order.redeemer); + payload.extend_from_slice(&fast_market_order.sender); + payload.extend_from_slice(&fast_market_order.refund_address); + payload.extend_from_slice(&fast_market_order.max_fee.to_be_bytes()); + payload.extend_from_slice(&fast_market_order.init_auction_fee.to_be_bytes()); + payload.extend_from_slice(&fast_market_order.deadline.to_be_bytes()); + payload.extend_from_slice(&fast_market_order.redeemer_message_length.to_be_bytes()); + if fast_market_order.redeemer_message_length > 0 { + payload.extend_from_slice( + &fast_market_order.redeemer_message + [..usize::from(fast_market_order.redeemer_message_length)], + ); + } + message_body.extend_from_slice(&payload); + message_body + } + + pub fn message_hash(&self, fast_market_order: &FastMarketOrderState) -> keccak::Hash { + keccak::hashv(&[self.message_body(fast_market_order).as_ref()]) + } + + pub fn digest(&self, fast_market_order: &FastMarketOrderState) -> keccak::Hash { + keccak::hashv(&[self.message_hash(fast_market_order).as_ref()]) + } + + pub fn vaa_time(&self) -> u32 { + self.vaa_time + } + + pub fn sequence(&self) -> u64 { + self.sequence + } + + pub fn emitter_chain(&self) -> u16 { + self.emitter_chain + } +} + +pub fn place_initial_offer_cctp_shim( + accounts: &[AccountInfo], + data: &PlaceInitialOfferCctpShimData, +) -> Result<()> { + // Check account owners + let program_id = &crate::ID; // Your program ID + + // Check all accounts are valid + check_account_length(accounts, 11)?; + // Extract data fields + // TODO: Remove sequence, vaa_time because they are in the fast market order state + let PlaceInitialOfferCctpShimData { offer_price } = *data; + + let signer = &accounts[0]; + let transfer_authority = &accounts[1]; + let custodian = &accounts[2]; + let auction_config = &accounts[3]; + let from_endpoint = &accounts[4]; + let to_endpoint = &accounts[5]; + let fast_market_order_account = &accounts[6]; + let auction_account = &accounts[7]; + let auction_key = auction_account.key(); + let offer_token = &accounts[8]; + let auction_custody_token = &accounts[9]; + let usdc = &accounts[10]; + + let fast_market_order_zero_copy = + FastMarketOrderState::try_deserialize(&mut &fast_market_order_account.data.borrow()[..])?; + + let vaa_time = fast_market_order_zero_copy.vaa_timestamp; + let sequence = fast_market_order_zero_copy.vaa_sequence; + let consistency_level = fast_market_order_zero_copy.vaa_consistency_level; + + // Check pda of the transfer authority is valid + let transfer_authority_seeds = [ + TRANSFER_AUTHORITY_SEED_PREFIX, + auction_key.as_ref(), + &offer_price.to_be_bytes(), + ]; + let (transfer_authority_pda, transfer_authority_bump) = + Pubkey::find_program_address(&transfer_authority_seeds, &PROGRAM_ID); + if transfer_authority_pda != transfer_authority.key() { + msg!("Transfer authority pda is invalid"); + return Err(ErrorCode::ConstraintSeeds.into()).map_err(|e: Error| { + e.with_pubkeys((transfer_authority_pda, transfer_authority.key())) + }); + } + + // Check custodian owner + if custodian.owner != program_id { + msg!( + "Custodian owner is invalid: expected {}, got {}", + program_id, + custodian.owner + ); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("custodian")); + } + // Check custodian is not paused + let checked_custodian = Custodian::try_deserialize(&mut &custodian.data.borrow()[..])?; + if checked_custodian.paused { + msg!("Custodian is paused"); + return Err(ErrorCode::ConstraintRaw.into()) + .map_err(|e: Error| e.with_account_name("custodian")); + } + // Check auction_config owner + if auction_config.owner != program_id { + msg!( + "Auction config owner is invalid: expected {}, got {}", + program_id, + auction_config.owner + ); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("auction_config")); + } + + // Check auction config id is correct corresponding to the custodian + let auction_config_account = + AuctionConfig::try_deserialize(&mut &auction_config.data.borrow()[..])?; + if auction_config_account.id != checked_custodian.auction_config_id { + msg!("Auction config id is invalid"); + return Err(ErrorCode::ConstraintRaw.into()) + .map_err(|e: Error| e.with_account_name("auction_config")); + } + + // Check usdc mint + if usdc.key() != common::USDC_MINT { + msg!("Usdc mint is invalid"); + return Err(MatchingEngineError::InvalidMint.into()); + } + + // Check from_endpoint owner + if from_endpoint.owner != program_id { + msg!( + "From endpoint owner is invalid: expected {}, got {}", + program_id, + from_endpoint.owner + ); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("from_endpoint")); + } + + // Deserialise the from_endpoint account + let from_endpoint_account = + RouterEndpoint::try_deserialize(&mut &from_endpoint.data.borrow()[..])?; + + // Check to_endpoint owner + if to_endpoint.owner != program_id { + msg!( + "To endpoint owner is invalid: expected {}, got {}", + program_id, + to_endpoint.owner + ); + return Err(ErrorCode::ConstraintOwner.into()) + .map_err(|e: Error| e.with_account_name("to_endpoint")); + } + + // Deserialise the to_endpoint account + let to_endpoint_account = RouterEndpoint::try_deserialize(&mut &to_endpoint.data.borrow()[..])?; + + // Check that the from and to endpoints are different + if from_endpoint_account.chain == to_endpoint_account.chain { + return Err(MatchingEngineError::SameEndpoint.into()); + } + + // Check that the to endpoint protocol is cctp or local + match to_endpoint_account.protocol { + MessageProtocol::Cctp { .. } | MessageProtocol::Local { .. } => (), + _ => return Err(MatchingEngineError::InvalidEndpoint.into()), + } + + // Check that the from endpoint protocol is cctp or local + match from_endpoint_account.protocol { + MessageProtocol::Cctp { .. } | MessageProtocol::Local { .. } => (), + _ => return Err(MatchingEngineError::InvalidEndpoint.into()), + } + + // Check that to endpoint chain is equal to the fast_market_order target_chain + if to_endpoint_account.chain != fast_market_order_zero_copy.target_chain { + msg!("To endpoint chain is not equal to the fast_market_order target_chain"); + return Err(MatchingEngineError::InvalidTargetRouter.into()); + } + + // Check contents of fast_market_order + { + let deadline = i64::from(fast_market_order_zero_copy.deadline); + let expiration = i64::from(vaa_time).saturating_add(crate::VAA_AUCTION_EXPIRATION_TIME); + let current_time = Clock::get().unwrap().unix_timestamp; + if !((deadline == 0 || current_time < deadline) && current_time < expiration) { + msg!("Fast market order has expired"); + return Err(MatchingEngineError::FastMarketOrderExpired.into()); + } + + if offer_price > fast_market_order_zero_copy.max_fee { + msg!("Offer price is too high"); + return Err(MatchingEngineError::OfferPriceTooHigh.into()); + } + } + + // Create the vaa_message struct to get the digest + let vaa_message = VaaMessageBodyHeader::new( + consistency_level, + vaa_time, + sequence, + from_endpoint_account.chain, + from_endpoint_account.address, + ); + let vaa_message_digest = vaa_message.digest(&fast_market_order_zero_copy); + + // Begin of initialisation of auction custody token account + // ------------------------------------------------------------------------------------------------ + let auction_custody_token_space = spl_token::state::Account::LEN; + + let (auction_custody_token_pda, auction_custody_token_bump) = Pubkey::find_program_address( + &[ + crate::AUCTION_CUSTODY_TOKEN_SEED_PREFIX, + auction_key.as_ref(), + ], + program_id, + ); + if auction_custody_token_pda != auction_custody_token.key() { + msg!( + "Auction custody token pda is invalid. Passed account: {}, expected: {}", + auction_custody_token.key(), + auction_custody_token_pda + ); + return Err(MatchingEngineError::InvalidPda.into()); + } + + let auction_custody_token_seeds = [ + crate::AUCTION_CUSTODY_TOKEN_SEED_PREFIX, + auction_key.as_ref(), + &[auction_custody_token_bump], + ]; + let auction_custody_token_signer_seeds = &[&auction_custody_token_seeds[..]]; + create_account_reliably( + &signer.key(), + &auction_custody_token_pda, + auction_custody_token.lamports(), + auction_custody_token_space, + accounts, + &spl_token::ID, + auction_custody_token_signer_seeds, + )?; + // Initialise the token account + let init_token_account_ix = spl_token::instruction::initialize_account3( + &spl_token::ID, + &auction_custody_token_pda, + &usdc.key(), + &auction_account.key(), + ) + .unwrap(); + + solana_program::program::invoke(&init_token_account_ix, accounts).unwrap(); + + // ------------------------------------------------------------------------------------------------ + // End of initialisation of auction custody token account + + // Begin of initialisation of auction account + // ------------------------------------------------------------------------------------------------ + let auction_space = 8 + Auction::INIT_SPACE; + let (pda, bump) = Pubkey::find_program_address( + &[Auction::SEED_PREFIX, vaa_message_digest.as_ref()], + program_id, + ); + + if pda != auction_key { + msg!("Auction pda is invalid"); + return Err(MatchingEngineError::InvalidPda.into()); + } + let auction_seeds = [Auction::SEED_PREFIX, vaa_message_digest.as_ref(), &[bump]]; + let auction_signer_seeds = &[&auction_seeds[..]]; + create_account_reliably( + &signer.key(), + &auction_key, + auction_account.lamports(), + auction_space, + accounts, + program_id, + auction_signer_seeds, + )?; + // Borrow the account data mutably + let mut data = auction_account + .try_borrow_mut_data() + .map_err(|_| MatchingEngineError::AccountNotWritable)?; + + // Write the discriminator to the first 8 bytes + let discriminator = Auction::discriminator(); + data[0..8].copy_from_slice(&discriminator); + + let security_deposit = fast_market_order_zero_copy.max_fee.saturating_add( + crate::utils::auction::compute_notional_security_deposit( + &auction_config_account.parameters, + fast_market_order_zero_copy.amount_in, + ), + ); + + let auction_to_write = Auction { + bump, + vaa_hash: vaa_message + .digest(&fast_market_order_zero_copy) + .as_ref() + .try_into() + .unwrap(), + vaa_timestamp: vaa_message.vaa_time(), + target_protocol: to_endpoint_account.protocol, + status: AuctionStatus::Active, + prepared_by: signer.key(), + info: AuctionInfo { + config_id: auction_config_account.id, + custody_token_bump: auction_custody_token_bump, + vaa_sequence: vaa_message.sequence(), + source_chain: vaa_message.emitter_chain(), + best_offer_token: offer_token.key(), + initial_offer_token: offer_token.key(), + start_slot: Clock::get().unwrap().slot, + amount_in: fast_market_order_zero_copy.amount_in, + security_deposit, + offer_price, + redeemer_message_len: fast_market_order_zero_copy.redeemer_message_length, + destination_asset_info: Default::default(), + } + .into(), + }; + // Write the auction struct to the account + let auction_bytes = auction_to_write + .try_to_vec() + .map_err(|_| MatchingEngineError::BorshDeserializationError)?; + data[8..8_usize.saturating_add(auction_bytes.len())].copy_from_slice(&auction_bytes); + // ------------------------------------------------------------------------------------------------ + // End of initialisation of auction account + + // Start of token transfer from offer token to auction custody token + // ------------------------------------------------------------------------------------------------ + + let transfer_ix = spl_token::instruction::transfer( + &spl_token::ID, + &offer_token.key(), + &auction_custody_token.key(), + &transfer_authority.key(), + &[], // Apparently this is only for multi-sig accounts + fast_market_order_zero_copy + .amount_in + .checked_add(security_deposit) + .ok_or_else(|| MatchingEngineError::U64Overflow)?, + ) + .unwrap(); + invoke_signed_unchecked( + &transfer_ix, + accounts, + &[&[ + TRANSFER_AUTHORITY_SEED_PREFIX, + auction_key.as_ref(), + &offer_price.to_be_bytes(), + &[transfer_authority_bump], + ]], + ) + .map_err(|_| MatchingEngineError::TokenTransferFailed)?; + // ------------------------------------------------------------------------------------------------ + // End of token transfer from offer token to auction custody token + Ok(()) +} + +#[cfg(test)] +mod tests { + use crate::state::FastMarketOrderParams; + + use super::*; + + #[test] + fn test_bytemuck() { + let test_fast_market_order = FastMarketOrderState::new(FastMarketOrderParams { + amount_in: 1000000000000000000, + min_amount_out: 1000000000000000000, + deadline: 1000000000, + target_chain: 1, + redeemer_message_length: 0, + redeemer: [0_u8; 32], + sender: [0_u8; 32], + refund_address: [0_u8; 32], + max_fee: 0, + init_auction_fee: 0, + redeemer_message: [0_u8; 512], + close_account_refund_recipient: [0_u8; 32], + vaa_sequence: 0, + vaa_timestamp: 0, + vaa_nonce: 0, + vaa_emitter_chain: 0, + vaa_consistency_level: 0, + vaa_emitter_address: [0_u8; 32], + }); + let bytes = bytemuck::bytes_of(&test_fast_market_order); + assert!(bytes.len() == std::mem::size_of::()); + } +} diff --git a/solana/programs/matching-engine/src/fallback/processor/prepare_order_response.rs b/solana/programs/matching-engine/src/fallback/processor/prepare_order_response.rs new file mode 100644 index 00000000..306ffb0e --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/prepare_order_response.rs @@ -0,0 +1,572 @@ +use std::io::Cursor; + +use super::helpers::create_account_reliably; +use super::FallbackMatchingEngineInstruction; +use crate::fallback::helpers::check_account_length; +use crate::state::PreparedOrderResponseInfo; +use crate::state::PreparedOrderResponseSeeds; +use crate::state::{ + Custodian, FastMarketOrder as FastMarketOrderState, MessageProtocol, PreparedOrderResponse, + RouterEndpoint, +}; +use anchor_lang::prelude::*; +use anchor_spl::token::spl_token; +use common::messages::raw::LiquidityLayerDepositMessage; +use common::messages::raw::LiquidityLayerMessage; +use common::messages::raw::SlowOrderResponse; +use common::wormhole_cctp_solana::cctp::message_transmitter_program; +use common::wormhole_cctp_solana::cpi::ReceiveMessageArgs; +use common::wormhole_cctp_solana::utils::CctpMessage; +use solana_program::instruction::Instruction; +use solana_program::keccak; +use solana_program::program::invoke_signed_unchecked; +use solana_program::program_pack::Pack; + +use crate::error::MatchingEngineError; + +#[derive(borsh::BorshDeserialize, borsh::BorshSerialize)] +pub struct PrepareOrderResponseCctpShimData { + pub encoded_cctp_message: Vec, + pub cctp_attestation: Vec, + pub finalized_vaa_message: FinalizedVaaMessage, +} + +#[derive(borsh::BorshDeserialize, borsh::BorshSerialize)] +pub struct FinalizedVaaMessage { + pub base_fee: u64, // Can also get from deposit payload + pub vaa_payload: Vec, // Can get a lot of this info from the cctp message + pub deposit_payload: Vec, // Probably dont need this since its in the vaa payload (at the end) + pub guardian_set_bump: u8, +} + +impl FinalizedVaaMessage { + pub fn digest( + &self, + sequence: u64, + timestamp: u32, + emitter_chain: u16, + emitter_address: [u8; 32], + nonce: u32, + consistency_level: u8, + ) -> [u8; 32] { + let message_hash = keccak::hashv(&[ + timestamp.to_be_bytes().as_ref(), + nonce.to_be_bytes().as_ref(), + emitter_chain.to_be_bytes().as_ref(), + &emitter_address, + &sequence.to_be_bytes(), + &[consistency_level], + self.vaa_payload.as_ref(), + ]); + // Digest is the hash of the message + keccak::hashv(&[message_hash.as_ref()]) + .as_ref() + .try_into() + .unwrap() + } + + pub fn get_slow_order_response<'a>(&'a self) -> SlowOrderResponse<'a> { + let liquidity_layer_message: LiquidityLayerDepositMessage<'a> = + LiquidityLayerDepositMessage::parse(&self.deposit_payload) + .expect("Cannot get slow order response from deposit payload"); + let slow_order_response: SlowOrderResponse<'a> = + liquidity_layer_message.to_slow_order_response_unchecked(); + slow_order_response + } +} + +impl PrepareOrderResponseCctpShimData { + pub fn new( + encoded_cctp_message: Vec, + cctp_attestation: Vec, + finalized_vaa_message: FinalizedVaaMessage, + ) -> Self { + Self { + encoded_cctp_message, + cctp_attestation, + finalized_vaa_message, + } + } + pub fn from_bytes(data: &[u8]) -> Option { + Self::try_from_slice(data).ok() + } + pub fn to_bytes(&self) -> Vec { + self.try_to_vec().unwrap() + } + + pub fn to_receive_message_args(&self) -> ReceiveMessageArgs { + let mut encoded_message = Vec::with_capacity(self.encoded_cctp_message.len()); + encoded_message.extend_from_slice(&self.encoded_cctp_message); + let mut cctp_attestation = Vec::with_capacity(self.cctp_attestation.len()); + cctp_attestation.extend_from_slice(&self.cctp_attestation); + ReceiveMessageArgs { + encoded_message, + attestation: cctp_attestation, + } + } +} + +pub struct PrepareOrderResponseCctpShimAccounts<'ix> { + pub signer: &'ix Pubkey, // 0 + pub custodian: &'ix Pubkey, // 1 + pub fast_market_order: &'ix Pubkey, // 2 + pub from_endpoint: &'ix Pubkey, // 3 + pub to_endpoint: &'ix Pubkey, // 4 + pub prepared_order_response: &'ix Pubkey, // 5 + pub prepared_custody_token: &'ix Pubkey, // 6 + pub base_fee_token: &'ix Pubkey, // 7 + pub usdc: &'ix Pubkey, // 8 + pub cctp_mint_recipient: &'ix Pubkey, // 9 + pub cctp_message_transmitter_authority: &'ix Pubkey, // 10 + pub cctp_message_transmitter_config: &'ix Pubkey, // 11 + pub cctp_used_nonces: &'ix Pubkey, // 12 + pub cctp_message_transmitter_event_authority: &'ix Pubkey, // 13 + pub cctp_token_messenger: &'ix Pubkey, // 14 + pub cctp_remote_token_messenger: &'ix Pubkey, // 15 + pub cctp_token_minter: &'ix Pubkey, // 16 + pub cctp_local_token: &'ix Pubkey, // 17 + pub cctp_token_pair: &'ix Pubkey, // 18 + pub cctp_token_messenger_minter_custody_token: &'ix Pubkey, // 19 + pub cctp_token_messenger_minter_event_authority: &'ix Pubkey, // 20 + pub cctp_token_messenger_minter_program: &'ix Pubkey, // 21 + pub cctp_message_transmitter_program: &'ix Pubkey, // 22 + pub guardian_set: &'ix Pubkey, // 23 + pub guardian_set_signatures: &'ix Pubkey, // 24 + pub verify_shim_program: &'ix Pubkey, // 25 + pub token_program: &'ix Pubkey, // 26 + pub system_program: &'ix Pubkey, // 27 +} + +impl<'ix> PrepareOrderResponseCctpShimAccounts<'ix> { + pub fn to_account_metas(&self) -> Vec { + vec![ + AccountMeta::new(*self.signer, true), + AccountMeta::new_readonly(*self.custodian, false), + AccountMeta::new_readonly(*self.fast_market_order, false), + AccountMeta::new_readonly(*self.from_endpoint, false), + AccountMeta::new_readonly(*self.to_endpoint, false), + AccountMeta::new(*self.prepared_order_response, false), + AccountMeta::new(*self.prepared_custody_token, false), + AccountMeta::new_readonly(*self.base_fee_token, false), + AccountMeta::new_readonly(*self.usdc, false), + AccountMeta::new(*self.cctp_mint_recipient, false), + AccountMeta::new_readonly(*self.cctp_message_transmitter_authority, false), + AccountMeta::new_readonly(*self.cctp_message_transmitter_config, false), + AccountMeta::new(*self.cctp_used_nonces, false), + AccountMeta::new_readonly(*self.cctp_message_transmitter_event_authority, false), + AccountMeta::new_readonly(*self.cctp_token_messenger, false), + AccountMeta::new_readonly(*self.cctp_remote_token_messenger, false), + AccountMeta::new_readonly(*self.cctp_token_minter, false), + AccountMeta::new(*self.cctp_local_token, false), + AccountMeta::new_readonly(*self.cctp_token_pair, false), + AccountMeta::new(*self.cctp_token_messenger_minter_custody_token, false), + AccountMeta::new_readonly(*self.cctp_token_messenger_minter_event_authority, false), + AccountMeta::new_readonly(*self.cctp_token_messenger_minter_program, false), + AccountMeta::new_readonly(*self.cctp_message_transmitter_program, false), + AccountMeta::new_readonly(*self.guardian_set, false), + AccountMeta::new_readonly(*self.guardian_set_signatures, false), + AccountMeta::new_readonly(*self.verify_shim_program, false), + AccountMeta::new_readonly(*self.token_program, false), + AccountMeta::new_readonly(*self.system_program, false), + ] + } +} + +// TODO: Also close the fast market order account since it is no longer needed +pub struct PrepareOrderResponseCctpShim<'ix> { + pub program_id: &'ix Pubkey, + pub accounts: PrepareOrderResponseCctpShimAccounts<'ix>, + pub data: PrepareOrderResponseCctpShimData, +} + +impl<'ix> PrepareOrderResponseCctpShim<'ix> { + pub fn instruction(self) -> Instruction { + Instruction { + program_id: *self.program_id, + accounts: self.accounts.to_account_metas(), + data: FallbackMatchingEngineInstruction::PrepareOrderResponseCctpShim(self.data) + .to_vec(), + } + } +} + +pub fn prepare_order_response_cctp_shim( + accounts: &[AccountInfo], + data: PrepareOrderResponseCctpShimData, +) -> Result<()> { + let program_id = &crate::ID; + check_account_length(accounts, 27)?; + + let signer = &accounts[0]; + let custodian = &accounts[1]; + let fast_market_order = &accounts[2]; + let from_endpoint = &accounts[3]; + let to_endpoint = &accounts[4]; + let prepared_order_response = &accounts[5]; + let prepared_custody_token = &accounts[6]; + let base_fee_token = &accounts[7]; + let usdc = &accounts[8]; + let cctp_mint_recipient = &accounts[9]; + let cctp_message_transmitter_authority = &accounts[10]; + let cctp_message_transmitter_config = &accounts[11]; + let cctp_used_nonces = &accounts[12]; + let cctp_message_transmitter_event_authority = &accounts[13]; + let cctp_token_messenger = &accounts[14]; + let cctp_remote_token_messenger = &accounts[15]; + let cctp_token_minter = &accounts[16]; + let cctp_local_token = &accounts[17]; + let cctp_token_pair = &accounts[18]; + let cctp_token_messenger_minter_custody_token = &accounts[19]; + let cctp_token_messenger_minter_event_authority = &accounts[20]; + let cctp_token_messenger_minter_program = &accounts[21]; + let cctp_message_transmitter_program = &accounts[22]; + let guardian_set = &accounts[23]; + let guardian_set_signatures = &accounts[24]; + let _verify_shim_program = &accounts[25]; + let token_program = &accounts[26]; + let system_program = &accounts[27]; + let receive_message_args = data.to_receive_message_args(); + let finalized_vaa_message = data.finalized_vaa_message; + + let deposit_option = LiquidityLayerMessage::parse(&finalized_vaa_message.vaa_payload) + .map_err(|_| MatchingEngineError::InvalidDeposit)?; + let deposit = deposit_option + .deposit() + .ok_or(MatchingEngineError::InvalidDepositPayloadId)?; + let cctp_message = CctpMessage::parse(&receive_message_args.encoded_message) + .map_err(|_| MatchingEngineError::InvalidCctpMessage)?; + require_eq!( + cctp_message.source_domain(), + deposit.source_cctp_domain(), + MatchingEngineError::InvalidCctpMessage + ); + require_eq!( + cctp_message.destination_domain(), + deposit.destination_cctp_domain(), + MatchingEngineError::InvalidCctpMessage + ); + require_eq!( + cctp_message.nonce(), + deposit.cctp_nonce(), + MatchingEngineError::InvalidCctpMessage + ); + // Load accounts + let fast_market_order_account_data = fast_market_order.data.borrow(); + let fast_market_order_zero_copy = + FastMarketOrderState::try_read(&fast_market_order_account_data[..])?; + // Create pdas for addresses that need to be created + // Check the prepared order response account is valid + // TODO: Pass the digest so it isn't recomputed + let fast_market_order_digest = fast_market_order_zero_copy.digest(); + // Construct the finalised vaa message digest data + let finalized_vaa_message_digest = { + let finalised_vaa_timestamp = fast_market_order_zero_copy.vaa_timestamp; + let finalised_vaa_sequence = fast_market_order_zero_copy.vaa_sequence - 1; + let finalised_vaa_emitter_chain = fast_market_order_zero_copy.vaa_emitter_chain; + let finalised_vaa_emitter_address = fast_market_order_zero_copy.vaa_emitter_address; + let finalised_vaa_nonce = fast_market_order_zero_copy.vaa_nonce; + let finalised_vaa_consistency_level = fast_market_order_zero_copy.vaa_consistency_level; + finalized_vaa_message.digest( + finalised_vaa_sequence, + finalised_vaa_timestamp, + finalised_vaa_emitter_chain, + finalised_vaa_emitter_address, + finalised_vaa_nonce, + finalised_vaa_consistency_level, + ) + }; + + // Check that fast market order is owned by the program + require!( + fast_market_order.owner == program_id, + ErrorCode::ConstraintOwner + ); + + let checked_custodian = + Custodian::try_deserialize(&mut &custodian.data.borrow()[..]).map(Box::new)?; + // Deserialise the to_endpoint account + + // TODO: Scope this to do checks and deallocate stack + let to_endpoint_account = + RouterEndpoint::try_deserialize(&mut &to_endpoint.data.borrow()[..]).map(Box::new)?; + // Deserialise the from_endpoint account + let from_endpoint_account = + RouterEndpoint::try_deserialize(&mut &from_endpoint.data.borrow()[..]).map(Box::new)?; + + let guardian_set_bump = finalized_vaa_message.guardian_set_bump; + + // Check loaded vaa is deposit message + // TODO: Fix errors + let liquidity_layer_message = + LiquidityLayerDepositMessage::parse(&finalized_vaa_message.deposit_payload) + .map_err(|_| MatchingEngineError::InvalidDepositPayloadId)?; + let slow_order_response = liquidity_layer_message + .slow_order_response() + .ok_or_else(|| MatchingEngineError::InvalidDepositPayloadId)?; + let prepared_order_response_seeds = [ + PreparedOrderResponse::SEED_PREFIX, + &fast_market_order_digest, + ]; + + let (prepared_order_response_pda, prepared_order_response_bump) = + Pubkey::find_program_address(&prepared_order_response_seeds, program_id); + + let prepared_custody_token_seeds = [ + crate::PREPARED_CUSTODY_TOKEN_SEED_PREFIX, + prepared_order_response_pda.as_ref(), + ]; + + let (prepared_custody_token_pda, prepared_custody_token_bump) = + Pubkey::find_program_address(&prepared_custody_token_seeds, program_id); + + // Check custodian account + require_eq!(custodian.owner, program_id, ErrorCode::ConstraintOwner); + + require!(!checked_custodian.paused, MatchingEngineError::Paused); + + // Check usdc mint + require_eq!( + usdc.key(), + common::USDC_MINT, + MatchingEngineError::InvalidMint + ); + + // Check from_endpoint owner + require_eq!(from_endpoint.owner, program_id, ErrorCode::ConstraintOwner); + + // Check to_endpoint owner + require_eq!(to_endpoint.owner, program_id, ErrorCode::ConstraintOwner); + + // Check that the from and to endpoints are different + require_neq!( + from_endpoint_account.chain, + to_endpoint_account.chain, + MatchingEngineError::SameEndpoint + ); + + // Check that the to endpoint protocol is cctp or local + require!( + matches!( + to_endpoint_account.protocol, + MessageProtocol::Cctp { .. } | MessageProtocol::Local { .. } + ), + MatchingEngineError::InvalidEndpoint + ); + + // Check that the from endpoint protocol is cctp or local + require!( + matches!( + from_endpoint_account.protocol, + MessageProtocol::Cctp { .. } | MessageProtocol::Local { .. } + ), + MatchingEngineError::InvalidEndpoint + ); + + // Check that to endpoint chain is equal to the fast_market_order target_chain + require_eq!( + to_endpoint_account.chain, + fast_market_order_zero_copy.target_chain, + MatchingEngineError::InvalidTargetRouter + ); + + require_eq!( + prepared_order_response_pda, + prepared_order_response.key(), + MatchingEngineError::InvalidPda + ); + + require_eq!( + prepared_custody_token_pda, + prepared_custody_token.key(), + MatchingEngineError::InvalidPda + ); + + // Check the base token fee key is not equal to the prepared custody token key + // TODO: Check that base fee token is actually a token account + require_neq!( + base_fee_token.key(), + prepared_custody_token.key(), + MatchingEngineError::InvalidBaseFeeToken + ); + + require_eq!( + token_program.key(), + spl_token::ID, + MatchingEngineError::InvalidProgram + ); + + require_eq!( + _verify_shim_program.key(), + wormhole_svm_definitions::solana::VERIFY_VAA_SHIM_PROGRAM_ID, + MatchingEngineError::InvalidProgram + ); + + require_eq!( + system_program.key(), + solana_program::system_program::ID, + MatchingEngineError::InvalidProgram + ); + + // Verify deposit message shim using verify shim program + + // Start verify deposit message vaa shim + // ------------------------------------------------------------------------------------------------ + let verify_hash_data = { + let mut data = vec![]; + data.extend_from_slice( + &wormhole_svm_shim::verify_vaa::VerifyVaaShimInstruction::::VERIFY_HASH_SELECTOR, + ); + data.push(guardian_set_bump); + data.extend_from_slice(&finalized_vaa_message_digest); + data + }; + + let verify_shim_ix = Instruction { + program_id: wormhole_svm_definitions::solana::VERIFY_VAA_SHIM_PROGRAM_ID, + accounts: vec![ + AccountMeta::new_readonly(guardian_set.key(), false), + AccountMeta::new_readonly(guardian_set_signatures.key(), false), + ], + data: verify_hash_data, + }; + invoke_signed_unchecked(&verify_shim_ix, &accounts, &[])?; + // End verify deposit message vaa shim + // ------------------------------------------------------------------------------------------------ + + // Start create prepared order response account + // ------------------------------------------------------------------------------------------------ + + // Write to the prepared slow order account, which will be closed by one of the following + // instructions: + // * settle_auction_active_cctp + // * settle_auction_complete + // * settle_auction_none + + let create_prepared_order_respone_seeds = [ + PreparedOrderResponse::SEED_PREFIX, + &fast_market_order_digest, + &[prepared_order_response_bump], + ]; + let prepared_order_response_signer_seeds = &[&create_prepared_order_respone_seeds[..]]; + let prepared_order_response_account_space = PreparedOrderResponse::compute_size( + fast_market_order_zero_copy.redeemer_message_length.into(), + ); + create_account_reliably( + &signer.key(), + &prepared_order_response.key(), + prepared_order_response.lamports(), + prepared_order_response_account_space, + accounts, + program_id, + prepared_order_response_signer_seeds, + )?; + // Write the prepared order response account data ... + let prepared_order_response_account_to_write = PreparedOrderResponse { + seeds: PreparedOrderResponseSeeds { + fast_vaa_hash: fast_market_order_digest, + bump: prepared_order_response_bump, + }, + info: PreparedOrderResponseInfo { + prepared_by: signer.key(), + base_fee_token: base_fee_token.key(), + source_chain: fast_market_order_zero_copy.vaa_emitter_chain, + base_fee: slow_order_response.base_fee(), + fast_vaa_timestamp: fast_market_order_zero_copy.vaa_timestamp, + amount_in: fast_market_order_zero_copy.amount_in, + sender: fast_market_order_zero_copy.sender, + redeemer: fast_market_order_zero_copy.redeemer, + init_auction_fee: fast_market_order_zero_copy.init_auction_fee, + }, + to_endpoint: to_endpoint_account.info, + redeemer_message: fast_market_order_zero_copy.redeemer_message + [..fast_market_order_zero_copy.redeemer_message_length as usize] + .to_vec(), + }; + // Use cursor in order to write the prepared order response account data + let prepared_order_response_data: &mut [u8] = &mut prepared_order_response + .try_borrow_mut_data() + .map_err(|_| MatchingEngineError::AccountNotWritable)?; + let mut cursor = Cursor::new(prepared_order_response_data); + prepared_order_response_account_to_write + .try_serialize(&mut cursor) + .map_err(|_| MatchingEngineError::BorshDeserializationError)?; + // End create prepared order response account + // ------------------------------------------------------------------------------------------------ + + // Start create prepared custody token account + // ------------------------------------------------------------------------------------------------ + let create_prepared_custody_token_seeds = [ + crate::PREPARED_CUSTODY_TOKEN_SEED_PREFIX, + prepared_order_response_pda.as_ref(), + &[prepared_custody_token_bump], + ]; + + let prepared_custody_token_signer_seeds = &[&create_prepared_custody_token_seeds[..]]; + let prepared_custody_token_account_space = spl_token::state::Account::LEN; + create_account_reliably( + &signer.key(), + &prepared_custody_token_pda, + prepared_custody_token.lamports(), + prepared_custody_token_account_space, + accounts, + &spl_token::ID, + prepared_custody_token_signer_seeds, + )?; + let init_token_account_ix = spl_token::instruction::initialize_account3( + &spl_token::ID, + &prepared_custody_token_pda, + &usdc.key(), + &prepared_order_response_pda, + )?; + solana_program::program::invoke_signed_unchecked(&init_token_account_ix, accounts, &[])?; + // End create prepared custody token account + // ------------------------------------------------------------------------------------------------ + + // Create cpi context for verify_vaa_and_mint + message_transmitter_program::cpi::receive_token_messenger_minter_message( + CpiContext::new_with_signer( + cctp_message_transmitter_program.to_account_info(), + message_transmitter_program::cpi::ReceiveTokenMessengerMinterMessage { + payer: signer.to_account_info(), + caller: custodian.to_account_info(), + message_transmitter_authority: cctp_message_transmitter_authority.to_account_info(), + message_transmitter_config: cctp_message_transmitter_config.to_account_info(), + used_nonces: cctp_used_nonces.to_account_info(), + token_messenger_minter_program: cctp_token_messenger_minter_program + .to_account_info(), + system_program: system_program.to_account_info(), + message_transmitter_event_authority: cctp_message_transmitter_event_authority + .to_account_info(), + message_transmitter_program: cctp_message_transmitter_program.to_account_info(), + token_messenger: cctp_token_messenger.to_account_info(), + remote_token_messenger: cctp_remote_token_messenger.to_account_info(), + token_minter: cctp_token_minter.to_account_info(), + local_token: cctp_local_token.to_account_info(), + token_pair: cctp_token_pair.to_account_info(), + mint_recipient: cctp_mint_recipient.to_account_info(), + custody_token: cctp_token_messenger_minter_custody_token.to_account_info(), + token_program: token_program.to_account_info(), + token_messenger_minter_event_authority: cctp_token_messenger_minter_event_authority + .to_account_info(), + }, + &[Custodian::SIGNER_SEEDS], + ), + receive_message_args, + )?; + + // Finally transfer minted via CCTP to prepared custody token. + let transfer_ix = spl_token::instruction::transfer( + &spl_token::ID, + &cctp_mint_recipient.key(), + &prepared_custody_token.key(), + &custodian.key(), + &[], // Apparently this is only for multi-sig accounts + fast_market_order_zero_copy.amount_in, + ) + .unwrap(); + + invoke_signed_unchecked(&transfer_ix, accounts, &[Custodian::SIGNER_SEEDS]) + .map_err(|_| MatchingEngineError::TokenTransferFailed)?; + + Ok(()) +} diff --git a/solana/programs/matching-engine/src/fallback/processor/process_instruction.rs b/solana/programs/matching-engine/src/fallback/processor/process_instruction.rs new file mode 100644 index 00000000..860ead50 --- /dev/null +++ b/solana/programs/matching-engine/src/fallback/processor/process_instruction.rs @@ -0,0 +1,164 @@ +use super::close_fast_market_order::close_fast_market_order; +use super::execute_order::handle_execute_order_shim; +use super::initialise_fast_market_order::{ + initialise_fast_market_order, InitialiseFastMarketOrderData, +}; +use super::place_initial_offer::{place_initial_offer_cctp_shim, PlaceInitialOfferCctpShimData}; +// use super::prepare_order_response::prepare_order_response_cctp_shim; +// use super::prepare_order_response::PrepareOrderResponseCctpShimData; +use crate::ID; +use anchor_lang::prelude::*; +use wormhole_svm_definitions::make_anchor_discriminator; + +impl<'ix> FallbackMatchingEngineInstruction<'ix> { + pub const INITIALISE_FAST_MARKET_ORDER_SELECTOR: [u8; 8] = + make_anchor_discriminator(b"global:initialise_fast_market_order"); + pub const CLOSE_FAST_MARKET_ORDER_SELECTOR: [u8; 8] = + make_anchor_discriminator(b"global:close_fast_market_order"); + pub const PLACE_INITIAL_OFFER_CCTP_SHIM_SELECTOR: [u8; 8] = + make_anchor_discriminator(b"global:place_initial_offer_cctp_shim"); + pub const EXECUTE_ORDER_CCTP_SHIM_SELECTOR: [u8; 8] = + make_anchor_discriminator(b"global:execute_order_cctp_shim"); + pub const PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR: [u8; 8] = + make_anchor_discriminator(b"global:prepare_order_response_cctp_shim"); +} + +pub enum FallbackMatchingEngineInstruction<'ix> { + InitialiseFastMarketOrder(&'ix InitialiseFastMarketOrderData), + CloseFastMarketOrder, + PlaceInitialOfferCctpShim(&'ix PlaceInitialOfferCctpShimData), + ExecuteOrderCctpShim, + // PrepareOrderResponseCctpShim(PrepareOrderResponseCctpShimData), +} + +pub fn process_instruction( + program_id: &Pubkey, + accounts: &[AccountInfo], + instruction_data: &[u8], +) -> Result<()> { + if program_id != &ID { + return Err(ErrorCode::InvalidProgramId.into()); + } + + let instruction = FallbackMatchingEngineInstruction::deserialize(instruction_data).unwrap(); + match instruction { + FallbackMatchingEngineInstruction::InitialiseFastMarketOrder(data) => { + initialise_fast_market_order(accounts, data) + } + FallbackMatchingEngineInstruction::CloseFastMarketOrder => { + close_fast_market_order(accounts) + } + FallbackMatchingEngineInstruction::PlaceInitialOfferCctpShim(data) => { + place_initial_offer_cctp_shim(accounts, data) + } + FallbackMatchingEngineInstruction::ExecuteOrderCctpShim => { + handle_execute_order_shim(accounts) + } // FallbackMatchingEngineInstruction::PrepareOrderResponseCctpShim(data) => { + // prepare_order_response_cctp_shim(accounts, data) + // } + } +} + +impl<'ix> FallbackMatchingEngineInstruction<'ix> { + pub fn deserialize(instruction_data: &'ix [u8]) -> Option { + if instruction_data.len() < 8 { + return None; + } + + match instruction_data[..8].try_into().unwrap() { + FallbackMatchingEngineInstruction::PLACE_INITIAL_OFFER_CCTP_SHIM_SELECTOR => { + Some(Self::PlaceInitialOfferCctpShim( + PlaceInitialOfferCctpShimData::from_bytes(&instruction_data[8..]).unwrap(), + )) + } + + FallbackMatchingEngineInstruction::INITIALISE_FAST_MARKET_ORDER_SELECTOR => Some( + Self::InitialiseFastMarketOrder(bytemuck::from_bytes(&instruction_data[8..])), + ), + FallbackMatchingEngineInstruction::CLOSE_FAST_MARKET_ORDER_SELECTOR => { + Some(Self::CloseFastMarketOrder) + } + FallbackMatchingEngineInstruction::EXECUTE_ORDER_CCTP_SHIM_SELECTOR => { + Some(Self::ExecuteOrderCctpShim) + } + // FallbackMatchingEngineInstruction::PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR => { + // Some(Self::PrepareOrderResponseCctpShim( + // PrepareOrderResponseCctpShimData::from_bytes(&instruction_data[8..]).unwrap(), + // )) + // } + _ => None, + } + } +} + +impl FallbackMatchingEngineInstruction<'_> { + pub fn to_vec(&self) -> Vec { + match self { + Self::PlaceInitialOfferCctpShim(data) => { + // Calculate the total capacity needed + let data_slice = bytemuck::bytes_of(*data); + let total_capacity = 8_usize.saturating_add(data_slice.len()); // 8 for the selector, plus the data length + + // Create a vector with the calculated capacity + let mut out = Vec::with_capacity(total_capacity); + + // Add the selector + out.extend_from_slice( + &FallbackMatchingEngineInstruction::PLACE_INITIAL_OFFER_CCTP_SHIM_SELECTOR, + ); + + // Extend the vector with the data slice + out.extend_from_slice(data_slice); + + out + } + Self::ExecuteOrderCctpShim => { + let total_capacity = 8; // 8 for the selector (no data) + + let mut out = Vec::with_capacity(total_capacity); + + out.extend_from_slice( + &FallbackMatchingEngineInstruction::EXECUTE_ORDER_CCTP_SHIM_SELECTOR, + ); + + out + } + Self::InitialiseFastMarketOrder(data) => { + let data_slice = bytemuck::bytes_of(*data); + let total_capacity = 8_usize.saturating_add(data_slice.len()); // 8 for the selector, plus the data length + + let mut out = Vec::with_capacity(total_capacity); + + out.extend_from_slice( + &FallbackMatchingEngineInstruction::INITIALISE_FAST_MARKET_ORDER_SELECTOR, + ); + out.extend_from_slice(data_slice); + + out + } + Self::CloseFastMarketOrder => { + let total_capacity = 8; // 8 for the selector (no data) + + let mut out = Vec::with_capacity(total_capacity); + + out.extend_from_slice( + &FallbackMatchingEngineInstruction::CLOSE_FAST_MARKET_ORDER_SELECTOR, + ); + + out + } // Self::PrepareOrderResponseCctpShim(data) => { + // let data_slice = data.to_bytes(); + // let total_capacity = 8 + data_slice.len(); // 8 for the selector, plus the data length + + // let mut out = Vec::with_capacity(total_capacity); + + // out.extend_from_slice( + // &FallbackMatchingEngineInstruction::PREPARE_ORDER_RESPONSE_CCTP_SHIM_SELECTOR, + // ); + // out.extend_from_slice(&data_slice); + + // out + // } + } + } +} diff --git a/solana/programs/matching-engine/src/lib.rs b/solana/programs/matching-engine/src/lib.rs index 58b35353..069a1f1a 100644 --- a/solana/programs/matching-engine/src/lib.rs +++ b/solana/programs/matching-engine/src/lib.rs @@ -10,6 +10,7 @@ mod events; mod processor; use processor::*; +pub mod fallback; pub mod state; pub mod utils; diff --git a/solana/programs/matching-engine/src/processor/admin/initialize.rs b/solana/programs/matching-engine/src/processor/admin/initialize.rs index 7ae99e18..bba3d4d9 100644 --- a/solana/programs/matching-engine/src/processor/admin/initialize.rs +++ b/solana/programs/matching-engine/src/processor/admin/initialize.rs @@ -106,7 +106,7 @@ pub struct Initialize<'info> { } #[derive(Debug, AnchorSerialize, AnchorDeserialize)] pub struct InitializeArgs { - auction_params: AuctionParameters, + pub auction_params: AuctionParameters, } pub fn initialize(ctx: Context, args: InitializeArgs) -> Result<()> { diff --git a/solana/programs/matching-engine/src/processor/auction/offer/improve.rs b/solana/programs/matching-engine/src/processor/auction/offer/improve.rs index b99dc4d7..c2c3c6ee 100644 --- a/solana/programs/matching-engine/src/processor/auction/offer/improve.rs +++ b/solana/programs/matching-engine/src/processor/auction/offer/improve.rs @@ -42,6 +42,7 @@ pub struct ImproveOffer<'info> { active_auction: ActiveAuction<'info>, #[account( + mut, constraint = { offer_token.key() != active_auction.custody_token.key() } @ MatchingEngineError::InvalidOfferToken, diff --git a/solana/programs/matching-engine/src/processor/auction/offer/place_initial/cctp.rs b/solana/programs/matching-engine/src/processor/auction/offer/place_initial/cctp.rs index fab8c53b..44f301b0 100644 --- a/solana/programs/matching-engine/src/processor/auction/offer/place_initial/cctp.rs +++ b/solana/programs/matching-engine/src/processor/auction/offer/place_initial/cctp.rs @@ -93,6 +93,7 @@ pub struct PlaceInitialOfferCctp<'info> { )] auction: Box>, + #[account(mut)] offer_token: Box>, #[account( diff --git a/solana/programs/matching-engine/src/state/fast_market_order.rs b/solana/programs/matching-engine/src/state/fast_market_order.rs new file mode 100644 index 00000000..d9e98332 --- /dev/null +++ b/solana/programs/matching-engine/src/state/fast_market_order.rs @@ -0,0 +1,161 @@ +use anchor_lang::prelude::*; +use anchor_lang::Discriminator; +use solana_program::keccak; + +/// An account that represents a fast market order vaa. It is created by the signer of the transaction, and owned by the matching engine program. +/// The of the account is able to close this account and redeem the lamports deposited into the account (for rent) +#[account(zero_copy)] +#[derive(Debug)] +#[repr(C)] +pub struct FastMarketOrder { + /// The amount of tokens sent from the source chain via the fast transfer + pub amount_in: u64, + /// The minimum amount of tokens to be received on the target chain via the fast transfer + pub min_amount_out: u64, + /// The deadline of the auction + pub deadline: u32, + /// The target chain (represented as a wormhole chain id) + pub target_chain: u16, + /// The length of the redeemer message + pub redeemer_message_length: u16, + /// The redeemer of the fast transfer (on the destination chain) + pub redeemer: [u8; 32], + /// The sender of the fast transfer (on the source chain) + pub sender: [u8; 32], + /// The refund address of the fast transfer + pub refund_address: [u8; 32], + /// The maximum fee of the fast transfer + pub max_fee: u64, + /// The initial auction fee of the fast transfer + pub init_auction_fee: u64, + /// The redeemer message of the fast transfer + pub redeemer_message: [u8; 512], + /// The refund recipient for the creator of the fast market order account + pub close_account_refund_recipient: [u8; 32], + /// The emitter address of the fast transfer + pub vaa_emitter_address: [u8; 32], + /// The sequence of the fast transfer vaa + pub vaa_sequence: u64, + /// The timestamp of the fast transfer vaa + pub vaa_timestamp: u32, + /// The vaa nonce, which is not used and can be set to 0 + pub vaa_nonce: u32, + /// The source chain of the fast transfer vaa (represented as a wormhole chain id) + pub vaa_emitter_chain: u16, + /// The consistency level of the fast transfer vaa + pub vaa_consistency_level: u8, + /// Not used, but required for bytemuck serialisation + _padding: [u8; 5], +} + +pub struct FastMarketOrderParams { + pub amount_in: u64, + pub min_amount_out: u64, + pub deadline: u32, + pub target_chain: u16, + pub redeemer_message_length: u16, + pub redeemer: [u8; 32], + pub sender: [u8; 32], + pub refund_address: [u8; 32], + pub max_fee: u64, + pub init_auction_fee: u64, + pub redeemer_message: [u8; 512], + pub close_account_refund_recipient: [u8; 32], + pub vaa_sequence: u64, + pub vaa_timestamp: u32, + pub vaa_nonce: u32, + pub vaa_emitter_chain: u16, + pub vaa_consistency_level: u8, + pub vaa_emitter_address: [u8; 32], +} + +impl FastMarketOrder { + pub fn new(params: FastMarketOrderParams) -> Self { + Self { + amount_in: params.amount_in, + min_amount_out: params.min_amount_out, + deadline: params.deadline, + target_chain: params.target_chain, + redeemer_message_length: params.redeemer_message_length, + redeemer: params.redeemer, + sender: params.sender, + refund_address: params.refund_address, + max_fee: params.max_fee, + init_auction_fee: params.init_auction_fee, + redeemer_message: params.redeemer_message, + close_account_refund_recipient: params.close_account_refund_recipient, + vaa_sequence: params.vaa_sequence, + vaa_timestamp: params.vaa_timestamp, + vaa_nonce: params.vaa_nonce, + vaa_emitter_chain: params.vaa_emitter_chain, + vaa_consistency_level: params.vaa_consistency_level, + vaa_emitter_address: params.vaa_emitter_address, + _padding: [0_u8; 5], + } + } + + pub const SEED_PREFIX: &'static [u8] = b"fast_market_order"; + + /// Convert the fast market order to a vec of bytes (without the discriminator) + pub fn to_vec(&self) -> Vec { + let payload_slice = bytemuck::bytes_of(self); + let mut payload = Vec::with_capacity(payload_slice.len()); + payload.extend_from_slice(payload_slice); + payload + } + + /// Creates an payload as expected in a fast market order vaa + pub fn payload(&self) -> Vec { + let mut payload = vec![]; + payload.push(11_u8); + payload.extend_from_slice(&self.amount_in.to_be_bytes()); + payload.extend_from_slice(&self.min_amount_out.to_be_bytes()); + payload.extend_from_slice(&self.target_chain.to_be_bytes()); + payload.extend_from_slice(&self.redeemer); + payload.extend_from_slice(&self.sender); + payload.extend_from_slice(&self.refund_address); + payload.extend_from_slice(&self.max_fee.to_be_bytes()); + payload.extend_from_slice(&self.init_auction_fee.to_be_bytes()); + payload.extend_from_slice(&self.deadline.to_be_bytes()); + payload.extend_from_slice(&self.redeemer_message_length.to_be_bytes()); + if self.redeemer_message_length > 0 { + payload.extend_from_slice( + // uisize try from should never fail + &self.redeemer_message[..usize::from(self.redeemer_message_length)], + ); + } + payload + } + + /// A double hash of the serialised fast market order. Used for seeds and verification. + pub fn digest(&self) -> [u8; 32] { + let message_hash = keccak::hashv(&[ + self.vaa_timestamp.to_be_bytes().as_ref(), + self.vaa_nonce.to_be_bytes().as_ref(), + self.vaa_emitter_chain.to_be_bytes().as_ref(), + &self.vaa_emitter_address, + &self.vaa_sequence.to_be_bytes(), + &[self.vaa_consistency_level], + self.payload().as_ref(), + ]); + // Digest is the hash of the message + keccak::hashv(&[message_hash.as_ref()]) + .as_ref() + .try_into() + .unwrap() + } + + /// Read from an account info + pub fn try_read(data: &[u8]) -> Result<&Self> { + if data.len() < 8 { + return Err(ErrorCode::AccountDiscriminatorNotFound.into()); + } + let discriminator: [u8; 8] = data[0..8].try_into().unwrap(); + if discriminator != Self::discriminator() { + return Err(ErrorCode::AccountDiscriminatorMismatch.into()); + } + let byte_muck_data = &data[8..]; + let fast_market_order = bytemuck::from_bytes::(byte_muck_data); + Ok(fast_market_order) + } +} diff --git a/solana/programs/matching-engine/src/state/mod.rs b/solana/programs/matching-engine/src/state/mod.rs index fbfe98a4..aeea998c 100644 --- a/solana/programs/matching-engine/src/state/mod.rs +++ b/solana/programs/matching-engine/src/state/mod.rs @@ -19,5 +19,8 @@ pub use prepared_order_response::*; mod proposal; pub use proposal::*; +mod fast_market_order; +pub use fast_market_order::*; + pub(crate) mod router_endpoint; pub use router_endpoint::*; diff --git a/solana/ts/src/idl/json/matching_engine.json b/solana/ts/src/idl/json/matching_engine.json index dd46e109..7076f216 100644 --- a/solana/ts/src/idl/json/matching_engine.json +++ b/solana/ts/src/idl/json/matching_engine.json @@ -3109,6 +3109,51 @@ { "code": 7284, "name": "AuctionHistoryFull" + }, + { + "code": 7536, + "name": "InvalidVerifyVaaShimProgram" + }, + { + "code": 7792, + "name": "AccountAlreadyInitialized" + }, + { + "code": 7794, + "name": "AccountNotWritable" + }, + { + "code": 7796, + "name": "BorshDeserializationError" + }, + { + "code": 7798, + "name": "InvalidPda" + }, + { + "code": 7800, + "name": "AccountDataTooSmall" + }, + { + "code": 7802, + "name": "InvalidProgram" + }, + { + "code": 7804, + "name": "TokenTransferFailed" + }, + { + "code": 7806, + "name": "InvalidMint" + }, + { + "code": 8048, + "name": "SameEndpoints", + "msg": "From and to router endpoints are the same" + }, + { + "code": 8050, + "name": "InvalidCctpMessage" } ], "types": [ diff --git a/solana/ts/src/idl/ts/matching_engine.ts b/solana/ts/src/idl/ts/matching_engine.ts index 2d0af2e6..e9434253 100644 --- a/solana/ts/src/idl/ts/matching_engine.ts +++ b/solana/ts/src/idl/ts/matching_engine.ts @@ -3115,6 +3115,51 @@ export type MatchingEngine = { { "code": 7284, "name": "auctionHistoryFull" + }, + { + "code": 7536, + "name": "invalidVerifyVaaShimProgram" + }, + { + "code": 7792, + "name": "accountAlreadyInitialized" + }, + { + "code": 7794, + "name": "accountNotWritable" + }, + { + "code": 7796, + "name": "borshDeserializationError" + }, + { + "code": 7798, + "name": "invalidPda" + }, + { + "code": 7800, + "name": "accountDataTooSmall" + }, + { + "code": 7802, + "name": "invalidProgram" + }, + { + "code": 7804, + "name": "tokenTransferFailed" + }, + { + "code": 7806, + "name": "invalidMint" + }, + { + "code": 8048, + "name": "sameEndpoints", + "msg": "From and to router endpoints are the same" + }, + { + "code": 8050, + "name": "invalidCctpMessage" } ], "types": [