diff --git a/.github/ISSUE_TEMPLATE/bug.yaml b/.github/ISSUE_TEMPLATE/bug.yaml index 42bc872f..ac03d6ef 100644 --- a/.github/ISSUE_TEMPLATE/bug.yaml +++ b/.github/ISSUE_TEMPLATE/bug.yaml @@ -1,7 +1,7 @@ name: Bug Report description: When you want to report something not working as expected. title: "[Bug] " -labels: ["bug"] +labels: [] body: - type: textarea id: details diff --git a/.github/ISSUE_TEMPLATE/feature.yaml b/.github/ISSUE_TEMPLATE/feature.yaml index d0da1b5b..709bae16 100644 --- a/.github/ISSUE_TEMPLATE/feature.yaml +++ b/.github/ISSUE_TEMPLATE/feature.yaml @@ -1,7 +1,7 @@ name: Feature Request description: When you have an idea for an improvement or new feature. title: "[Feature] " -labels: ["feature"] +labels: [] body: - type: textarea id: details diff --git a/.github/actions/anchor/action.yml b/.github/actions/anchor/action.yml index 7657c648..ddf510c3 100644 --- a/.github/actions/anchor/action.yml +++ b/.github/actions/anchor/action.yml @@ -9,7 +9,7 @@ inputs: anchor-version: description: 'The version of anchor to use.' required: false - default: 'v0.29.0' + default: 'v0.30.1' solana-key: description: 'The private key to use for the solana sdk.' required: false diff --git a/Anchor.toml b/Anchor.toml index 9f318835..1b9a09e4 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -9,21 +9,15 @@ cluster = "localnet" wallet = "~/.config/solana/id.json" [scripts] -test = "ts-mocha -t 1000000 legacy-sdk/whirlpool/tests/**/*.test.ts" +test = "yarn ts-mocha --timeout 1000000 legacy-sdk/whirlpool/**/*.test.ts" [test.validator] slots_per_epoch = "33" ticks_per_slot = 7 url = "https://api.mainnet-beta.solana.com" -# In v0.29.0, this doesn't work because ProgramData account is cloned with executable = false (anchor bug ?) -# So we need to use test.genesis config. -# [[test.validator.clone]] -# address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" - -[[test.genesis]] +[[test.validator.clone]] address = "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s" -program = "legacy-sdk/whirlpool/tests/external_program/mpl_token_metadata.20240214.so" [[test.genesis]] address = "EBZDYx7599krFc4m2govwBdZcicr4GgepqC78m71nsHS" diff --git a/Cargo.lock b/Cargo.lock index e8121c48..4353c303 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -40,23 +40,22 @@ dependencies = [ [[package]] name = "ahash" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" +checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.5" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd7d5a2cecb58716e47d67d5703a249964b14c7be1ec3cad3affc295b2d1c35d" +checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.12", "once_cell", "version_check", "zerocopy", @@ -64,123 +63,129 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.20" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" +checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" dependencies = [ "memchr", ] [[package]] name = "anchor-attribute-access-control" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" dependencies = [ "anchor-syn", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-attribute-account" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" dependencies = [ "anchor-syn", - "bs58 0.5.0", + "bs58 0.5.1", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-attribute-constant" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" dependencies = [ "anchor-syn", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-attribute-error" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" dependencies = [ "anchor-syn", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-attribute-event" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" dependencies = [ "anchor-syn", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-attribute-program" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" dependencies = [ + "anchor-lang-idl", "anchor-syn", + "anyhow", + "bs58 0.5.1", + "heck", + "proc-macro2", "quote", - "syn 1.0.107", + "serde_json", + "syn 1.0.109", ] [[package]] name = "anchor-derive-accounts" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" dependencies = [ "anchor-syn", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-derive-serde" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" dependencies = [ "anchor-syn", "borsh-derive-internal 0.10.3", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-derive-space" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecc31d19fa54840e74b7a979d44bcea49d70459de846088a1d71e87ba53c419" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] name = "anchor-lang" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -191,54 +196,98 @@ dependencies = [ "anchor-derive-accounts", "anchor-derive-serde", "anchor-derive-space", + "anchor-lang-idl", "arrayref", - "base64 0.13.1", + "base64 0.21.7", "bincode", "borsh 0.10.3", "bytemuck", - "getrandom 0.2.12", + "getrandom 0.2.15", "solana-program", "thiserror", ] +[[package]] +name = "anchor-lang-idl" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" +dependencies = [ + "anchor-lang-idl-spec", + "anyhow", + "heck", + "regex", + "serde", + "serde_json", + "sha2 0.10.8", +] + +[[package]] +name = "anchor-lang-idl-spec" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bdf143115440fe621bdac3a29a1f7472e09f6cd82b2aa569429a0c13f103838" +dependencies = [ + "anyhow", + "serde", +] + [[package]] name = "anchor-spl" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a" +checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" dependencies = [ "anchor-lang", "mpl-token-metadata", - "solana-program", "spl-associated-token-account", "spl-memo", + "spl-pod", "spl-token", - "spl-token-2022 0.9.0", + "spl-token-2022", + "spl-token-group-interface", + "spl-token-metadata-interface", ] [[package]] name = "anchor-syn" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9101b84702fed2ea57bd22992f75065da5648017135b844283a2f6d74f27825" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" dependencies = [ "anyhow", - "bs58 0.5.0", + "bs58 0.5.1", + "cargo_toml", "heck", "proc-macro2", "quote", "serde", "serde_json", "sha2 0.10.8", - "syn 1.0.107", + "syn 1.0.109", "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 = "anyhow" -version = "1.0.68" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "ark-bn254" @@ -295,7 +344,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" dependencies = [ "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -308,7 +357,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -344,7 +393,7 @@ checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -359,9 +408,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -381,16 +430,16 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi 0.1.19", + "hermit-abi", "libc", "winapi", ] [[package]] name = "autocfg" -version = "1.1.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "base64" @@ -436,15 +485,9 @@ checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" [[package]] name = "bitflags" -version = "1.3.2" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -460,9 +503,9 @@ dependencies = [ [[package]] name = "blake3" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" +checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" dependencies = [ "arrayref", "arrayvec", @@ -517,6 +560,16 @@ dependencies = [ "hashbrown 0.13.2", ] +[[package]] +name = "borsh" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" +dependencies = [ + "borsh-derive 1.5.1", + "cfg_aliases", +] + [[package]] name = "borsh-derive" version = "0.9.3" @@ -527,7 +580,7 @@ dependencies = [ "borsh-schema-derive-internal 0.9.3", "proc-macro-crate 0.1.5", "proc-macro2", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -540,7 +593,21 @@ dependencies = [ "borsh-schema-derive-internal 0.10.3", "proc-macro-crate 0.1.5", "proc-macro2", - "syn 1.0.107", + "syn 1.0.109", +] + +[[package]] +name = "borsh-derive" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" +dependencies = [ + "once_cell", + "proc-macro-crate 3.1.0", + "proc-macro2", + "quote", + "syn 2.0.72", + "syn_derive", ] [[package]] @@ -551,7 +618,7 @@ checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -562,7 +629,7 @@ checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -573,7 +640,7 @@ checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -584,7 +651,7 @@ checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -595,18 +662,18 @@ checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" [[package]] name = "bs58" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5353f36341f7451062466f0b755b96ac3a9547e4d7f6b70d603fc721a7d7896" +checksum = "bf88ba1141d185c399bee5288d850d63b8369520c1eafc32a0430b5b6c287bf4" dependencies = [ "tinyvec", ] [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" [[package]] name = "bv" @@ -620,35 +687,45 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.14.3" +version = "1.16.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" +checksum = "102087e286b4677862ea56cf8fc58bb2cdfa8725c40ffb80fe3a008eb7f2fc83" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.5.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "965ab7eb5f8f97d2a083c799f3a1b994fc397b2fe2da5d1da1626ce15a39f2b1" +checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "byteorder" -version = "1.4.3" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" + +[[package]] +name = "cargo_toml" +version = "0.19.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] [[package]] name = "cc" -version = "1.0.83" +version = "1.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1174fb0b6ec23863f8b971027804a42614e347eafb0a95bf0b12cdae21fc4d0" +checksum = "26a5c3fd7bfa1ce3897a3a3501d362b2d87b7f2583ebcb4a949ec25911025cbc" dependencies = [ "jobserver", "libc", @@ -660,13 +737,23 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "cfg_aliases" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" + [[package]] name = "chrono" -version = "0.4.34" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" +checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" dependencies = [ + "android-tzdata", + "iana-time-zone", "num-traits", + "serde", + "windows-targets", ] [[package]] @@ -705,56 +792,44 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] -name = "cpufeatures" -version = "0.2.5" +name = "core-foundation-sys" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" -dependencies = [ - "libc", -] +checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" [[package]] -name = "crossbeam-channel" -version = "0.5.6" +name = "cpufeatures" +version = "0.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" dependencies = [ - "cfg-if", - "crossbeam-utils", + "libc", ] [[package]] name = "crossbeam-deque" -version = "0.8.2" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" dependencies = [ - "cfg-if", "crossbeam-epoch", "crossbeam-utils", ] [[package]] name = "crossbeam-epoch" -version = "0.9.13" +version = "0.9.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" dependencies = [ - "autocfg", - "cfg-if", "crossbeam-utils", - "memoffset 0.7.1", - "scopeguard", ] [[package]] name = "crossbeam-utils" -version = "0.8.14" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" -dependencies = [ - "cfg-if", -] +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -807,72 +882,47 @@ dependencies = [ [[package]] name = "darling" -version = "0.13.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a01d95850c592940db9b8194bc39f4bc0e89dee5c4265e4b1807c34a9aba453c" -dependencies = [ - "darling_core 0.13.4", - "darling_macro 0.13.4", -] - -[[package]] -name = "darling" -version = "0.20.5" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc5d6b04b3fd0ba9926f945895de7d806260a2d7431ba82e7edaecb043c4c6b8" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.5", - "darling_macro 0.20.5", + "darling_core", + "darling_macro", ] [[package]] name = "darling_core" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "859d65a907b6852c9361e3185c862aae7fafd2887876799fa55f5f99dc40d610" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", "strsim", - "syn 1.0.107", -] - -[[package]] -name = "darling_core" -version = "0.20.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04e48a959bcd5c761246f5d090ebc2fbf7b9cd527a492b07a67510c108f1e7e3" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "darling_macro" -version = "0.13.4" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c972679f83bdf9c42bd905396b6c3588a843a17f0f16dfcfa3e2c5d57441835" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.13.4", + "darling_core", "quote", - "syn 1.0.107", + "syn 2.0.72", ] [[package]] -name = "darling_macro" -version = "0.20.5" +name = "deranged" +version = "0.3.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d1545d67a2149e1d93b7e5c7752dce5a7426eb5d1357ddcfd89336b94444f77" +checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" dependencies = [ - "darling_core 0.20.5", - "quote", - "syn 2.0.48", + "powerfmt", + "serde", ] [[package]] @@ -889,7 +939,7 @@ checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -914,9 +964,9 @@ dependencies = [ [[package]] name = "ed25519" -version = "1.5.2" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9c280362032ea4203659fc489832d0204ef09f247a0506f170dafcac08c369" +checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" dependencies = [ "signature", ] @@ -949,9 +999,9 @@ dependencies = [ [[package]] name = "either" -version = "1.10.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "env_logger" @@ -967,14 +1017,27 @@ dependencies = [ ] [[package]] -name = "fastrand" -version = "1.8.0" +name = "equivalent" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + +[[package]] +name = "errno" +version = "0.3.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ - "instant", + "libc", + "windows-sys 0.52.0", ] +[[package]] +name = "fastrand" +version = "2.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" + [[package]] name = "feature-probe" version = "0.1.1" @@ -1013,9 +1076,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1030,18 +1093,30 @@ version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" dependencies = [ - "ahash 0.7.6", + "ahash 0.7.8", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" + [[package]] name = "hashbrown" version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" dependencies = [ - "ahash 0.8.5", + "ahash 0.8.11", ] +[[package]] +name = "hashbrown" +version = "0.14.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" + [[package]] name = "heck" version = "0.3.3" @@ -1060,15 +1135,6 @@ dependencies = [ "libc", ] -[[package]] -name = "hermit-abi" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" -dependencies = [ - "libc", -] - [[package]] name = "hex" version = "0.4.3" @@ -1111,6 +1177,29 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[package]] +name = "iana-time-zone" +version = "0.1.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "windows-core", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" +dependencies = [ + "cc", +] + [[package]] name = "ident_case" version = "1.0.1" @@ -1134,12 +1223,24 @@ dependencies = [ ] [[package]] -name = "instant" -version = "0.1.12" +name = "indexmap" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ - "cfg-if", + "autocfg", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3fc2e30ba82dd1b3911c8de1ffc143c74a914a14e99514d7637e3099df5ea0" +dependencies = [ + "equivalent", + "hashbrown 0.14.5", ] [[package]] @@ -1153,48 +1254,54 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.5" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" +checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.25" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.68" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406cda4b368d531c842222cf9d2600a9a4acce8d29423695379c6868a143a9ee" +checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" dependencies = [ "wasm-bindgen", ] [[package]] name = "keccak" -version = "0.1.3" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3afef3b6eff9ce9d8ff9b3601125eec7f0c8cbac7abd14f355d053fa56c98768" +checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" dependencies = [ "cpufeatures", ] [[package]] name = "lazy_static" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" +checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.153" +version = "0.2.155" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" + +[[package]] +name = "libm" +version = "0.2.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" [[package]] name = "libsecp256k1" @@ -1256,11 +1363,17 @@ dependencies = [ "thiserror", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" + [[package]] name = "lock_api" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" +checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" dependencies = [ "autocfg", "scopeguard", @@ -1268,15 +1381,15 @@ dependencies = [ [[package]] name = "log" -version = "0.4.20" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "memchr" -version = "2.5.0" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -1289,18 +1402,9 @@ dependencies = [ [[package]] name = "memoffset" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" -dependencies = [ - "autocfg", -] - -[[package]] -name = "memoffset" -version = "0.9.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a634b1c61a95585bd15607c6ab0c4e5b226e695ff2800ba0cdccddf208c406c" +checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" dependencies = [ "autocfg", ] @@ -1319,9 +1423,9 @@ dependencies = [ [[package]] name = "mpl-token-metadata" -version = "3.2.3" +version = "4.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba8ee05284d79b367ae8966d558e1a305a781fc80c9df51f37775169117ba64f" +checksum = "caf0f61b553e424a6234af1268456972ee66c2222e1da89079242251fa7479e5" dependencies = [ "borsh 0.10.3", "num-derive 0.3.3", @@ -1332,15 +1436,20 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.4" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ - "autocfg", "num-integer", "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" @@ -1349,7 +1458,7 @@ checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", + "syn 1.0.109", ] [[package]] @@ -1360,97 +1469,66 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "num-integer" -version = "0.1.45" +version = "0.1.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" dependencies = [ - "autocfg", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" +checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", -] - -[[package]] -name = "num_cpus" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" -dependencies = [ - "hermit-abi 0.2.6", - "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", + "libm", ] [[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" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96667db765a921f7b295ffee8b60472b686a51d4f21c2ee4ffdb94c7013b65a6" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "proc-macro-crate 1.2.1", - "proc-macro2", - "quote", - "syn 2.0.48", + "num_enum_derive", ] [[package]] name = "num_enum_derive" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" +checksum = "af1844ef2428cc3e1cb900be36181049ef3d3193c63e43026cfe202983b27a56" dependencies = [ - "proc-macro-crate 1.2.1", + "proc-macro-crate 3.1.0", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "once_cell" -version = "1.17.0" +version = "1.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" +checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "opaque-debug" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" +checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" [[package]] name = "parking_lot" -version = "0.12.1" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -1458,22 +1536,22 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.6" +version = "0.9.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" +checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys", + "windows-targets", ] [[package]] name = "paste" -version = "1.0.11" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d01a5bd0424d00070b0098dd17ebca6f961a959dead1dbcbbbc1d1cd8d3deeba" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pbkdf2" @@ -1495,9 +1573,9 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.2.0" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" [[package]] name = "polyval" @@ -1511,11 +1589,20 @@ dependencies = [ "universal-hash", ] +[[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" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] [[package]] name = "proc-macro-crate" @@ -1523,47 +1610,68 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] name = "proc-macro-crate" -version = "1.2.1" +version = "3.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eda0fc3b0fb7c975631757e14d9049da17374063edb6ebbcbc54d880d4fe94e9" +checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" dependencies = [ - "once_cell", - "thiserror", - "toml", + "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", + "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.78" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] [[package]] name = "proptest" -version = "1.0.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e0d9cc07f18492d879586c92b485def06bc850da3118075cd45d50e9c95b0e5" +checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" dependencies = [ "bit-set", - "bitflags 1.3.2", - "byteorder", + "bit-vec", + "bitflags", "lazy_static", "num-traits", - "quick-error 2.0.1", "rand 0.8.5", "rand_chacha 0.3.1", "rand_xorshift", "regex-syntax", "rusty-fork", "tempfile", + "unarray", ] [[package]] @@ -1583,7 +1691,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] @@ -1592,17 +1700,11 @@ version = "1.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" -[[package]] -name = "quick-error" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a993555f31e5a609f617c12db6250dedcac1b0a85076912c436e6fc9b2c8e6a3" - [[package]] name = "quote" -version = "1.0.35" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1666,7 +1768,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.12", + "getrandom 0.2.15", ] [[package]] @@ -1698,9 +1800,9 @@ dependencies = [ [[package]] name = "rayon" -version = "1.6.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" dependencies = [ "either", "rayon-core", @@ -1708,50 +1810,51 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.10.1" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cac410af5d00ab6884528b4ab69d1e8e146e8d471201800fa1b4524126de6ad3" +checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" dependencies = [ - "crossbeam-channel", "crossbeam-deque", "crossbeam-utils", - "num_cpus", ] [[package]] name = "redox_syscall" -version = "0.2.16" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 1.3.2", + "bitflags", ] [[package]] name = "regex" -version = "1.7.1" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", + "regex-automata", "regex-syntax", ] [[package]] -name = "regex-syntax" -version = "0.6.28" +name = "regex-automata" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" +dependencies = [ + "aho-corasick", + "memchr", + "regex-syntax", +] [[package]] -name = "remove_dir_all" -version = "0.5.3" +name = "regex-syntax" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" -dependencies = [ - "winapi", -] +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "rustc-hash" @@ -1768,11 +1871,24 @@ dependencies = [ "semver", ] +[[package]] +name = "rustix" +version = "0.38.34" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys", + "windows-sys 0.52.0", +] + [[package]] name = "rustversion" -version = "1.0.14" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "rusty-fork" @@ -1781,78 +1897,77 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" dependencies = [ "fnv", - "quick-error 1.2.3", + "quick-error", "tempfile", "wait-timeout", ] [[package]] name = "ryu" -version = "1.0.12" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "scopeguard" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.16" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.196" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "870026e60fa08c69f064aa766c10f10b1d62db9ccd4d0abb206472bee0ce3b32" +checksum = "5b3e4cd94123dd520a128bcd11e34d9e9e423e7e3e50425cb1b4b1e3549d0284" dependencies = [ "serde_derive", ] [[package]] name = "serde_bytes" -version = "0.11.14" +version = "0.11.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" +checksum = "387cc504cb06bb40a96c8e04e951fe01854cf6bc921053c954e4a606d9675c6a" dependencies = [ "serde", ] [[package]] name = "serde_derive" -version = "1.0.196" +version = "1.0.206" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33c85360c95e7d137454dc81d9a4ed2b8efd8fbe19cee57357b32b9771fccb67" +checksum = "fabfb6138d2383ea8208cf98ccf69cdfb1aff4088460681d84189aa259762f97" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "serde_json" -version = "1.0.113" +version = "1.0.124" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69801b70b1c3dac963ecb03a364ba0ceda9cf60c71cfe475e99864759c8b8a79" +checksum = "66ad62847a56b3dba58cc891acd13884b9c61138d330c0d7b6181713d4fce38d" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] [[package]] -name = "serde_with" -version = "1.14.0" +name = "serde_spanned" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678b5a069e50bf00ecd22d0cd8ddf7c236f68581b03db652061ed5eb13a312ff" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" dependencies = [ "serde", - "serde_json", - "serde_with_macros 1.5.2", ] [[package]] @@ -1861,20 +1976,14 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" dependencies = [ + "base64 0.13.1", + "chrono", + "hex", + "indexmap 1.9.3", "serde", - "serde_with_macros 2.3.3", -] - -[[package]] -name = "serde_with_macros" -version = "1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e182d6ec6f05393cc0e5ed1bf81ad6db3a8feedf8ee515ecdd369809bcce8082" -dependencies = [ - "darling 0.13.4", - "proc-macro2", - "quote", - "syn 1.0.107", + "serde_json", + "serde_with_macros", + "time", ] [[package]] @@ -1883,10 +1992,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.5", + "darling", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] @@ -1927,9 +2036,9 @@ dependencies = [ [[package]] name = "sha3" -version = "0.10.6" +version = "0.10.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" dependencies = [ "digest 0.10.7", "keccak", @@ -1941,6 +2050,12 @@ 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" @@ -1953,23 +2068,19 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.10.0" +version = "1.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" +checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" [[package]] name = "solana-frozen-abi" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9ac7bbff73e7f0e42f2453c2a514c1f7e1976617e655c5eea4c8d4f74d01d6" +checksum = "9aa49cd7eef8103e5f06e5ef3da844fef2e01290897814b1495dda2be63bfcde" dependencies = [ - "ahash 0.8.5", - "blake3", "block-buffer 0.10.4", "bs58 0.4.0", "bv", - "byteorder", - "cc", "either", "generic-array", "im", @@ -1980,7 +2091,6 @@ dependencies = [ "serde", "serde_bytes", "serde_derive", - "serde_json", "sha2 0.10.8", "solana-frozen-abi-macro", "subtle", @@ -1989,21 +2099,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d6a65acf04814029dc7d8f34bf4d3e264183d1d0f2af528a6d28ce3343a22fd" +checksum = "3aeb9e6679ac24dc9087f8bcc31c4912cb729a41897278a1fefe5b0a14636f6c" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "solana-logger" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0ea479b76e53b869443fd1a46d3d678dfc4a3cdf1e76e777b7871276d4b71d4" +checksum = "141e96bc474ec11533eeddcd597097308e42965d05601ea1f3c321b879f91534" dependencies = [ "env_logger", "lazy_static", @@ -2012,9 +2122,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b8038b87341412d9a5dd5fd9a47501a13716bf22bd5f0e091089b2822eaea1e" +checksum = "11e245fdb69973415d6d1f08c4ea2c82cce16c1100c800fc4dae396eac9c3305" dependencies = [ "ark-bn254", "ark-ec", @@ -2022,10 +2132,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.4.2", + "bitflags", "blake3", "borsh 0.10.3", "borsh 0.9.3", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -2033,7 +2144,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.12", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -2041,9 +2152,9 @@ dependencies = [ "libsecp256k1", "light-poseidon", "log", - "memoffset 0.9.0", + "memoffset", "num-bigint", - "num-derive 0.3.3", + "num-derive 0.4.2", "num-traits", "parking_lot", "rand 0.8.5", @@ -2054,7 +2165,7 @@ dependencies = [ "serde_derive", "serde_json", "sha2 0.10.8", - "sha3 0.10.6", + "sha3 0.10.8", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-sdk-macro", @@ -2066,15 +2177,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4fa260b2ddae30b9e31574ea81a2b157dba991e3908b544ab9bc4436c19c891" +checksum = "92947ea7072e0dfadc53d79e570c1d13e830b74047ca8b938c3fa799707ebd34" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.4.2", - "borsh 0.10.3", + "bitflags", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -2091,9 +2202,9 @@ dependencies = [ "libsecp256k1", "log", "memmap2", - "num-derive 0.3.3", + "num-derive 0.4.2", "num-traits", - "num_enum 0.6.1", + "num_enum", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -2105,9 +2216,10 @@ dependencies = [ "serde_bytes", "serde_derive", "serde_json", - "serde_with 2.3.3", + "serde_with", "sha2 0.10.8", - "sha3 0.10.6", + "sha3 0.10.8", + "siphasher", "solana-frozen-abi", "solana-frozen-abi-macro", "solana-logger", @@ -2120,15 +2232,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "204ed709eac41f4d67417eaacc8c66b0435b0f2b07ec367c15f97a0624fa09ca" +checksum = "6548235a0d4babb0f410f0a41b05425013f1168a739bfc447860d5eb2d82f849" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] @@ -2139,9 +2251,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-zk-token-sdk" -version = "1.17.22" +version = "1.18.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "535c3af389866ddaac91a28df6bb351dcf3b73d489ee7f982e043ef10232877a" +checksum = "43318fb5bd649bc57711188908b561f70ee3e506d26300018af7fd36585fdf90" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -2153,7 +2265,7 @@ dependencies = [ "itertools", "lazy_static", "merlin", - "num-derive 0.3.3", + "num-derive 0.4.2", "num-traits", "rand 0.7.3", "serde", @@ -2168,25 +2280,25 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "2.3.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "992d9c64c2564cc8f63a4b508bf3ebcdf2254b0429b13cd1d31adb6162432a5f" +checksum = "143109d789171379e6143ef23191786dfaac54289ad6e7917cfb26b36c432b10" dependencies = [ "assert_matches", - "borsh 0.10.3", + "borsh 1.5.1", "num-derive 0.4.2", "num-traits", "solana-program", "spl-token", - "spl-token-2022 1.0.0", + "spl-token-2022", "thiserror", ] [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "210101376962bb22bb13be6daea34656ea1cbc248fce2164b146e39203b55e03" dependencies = [ "bytemuck", "solana-program", @@ -2195,44 +2307,44 @@ dependencies = [ [[package]] name = "spl-discriminator-derive" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] name = "spl-discriminator-syn" -version = "0.1.2" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fea7be851bd98d10721782ea958097c03a0c2a07d8d4997041d0ece6319a63" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.48", + "syn 2.0.72", "thiserror", ] [[package]] name = "spl-memo" -version = "4.0.1" +version = "4.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58e9bae02de3405079a057fe244c867a08f92d48327d231fc60da831f94caf0a" +checksum = "a49f49f95f2d02111ded31696ab38a081fab623d4c76bd4cb074286db4560836" dependencies = [ "solana-program", ] [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "c52d84c55efeef8edcc226743dc089d7e3888b8e3474569aa3eff152b37b9996" dependencies = [ - "borsh 0.10.3", + "borsh 1.5.1", "bytemuck", "solana-program", "solana-zk-token-sdk", @@ -2241,9 +2353,9 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "e45a49acb925db68aa501b926096b2164adbdcade7a0c24152af9f0742d0a602" dependencies = [ "num-derive 0.4.2", "num-traits", @@ -2254,35 +2366,21 @@ dependencies = [ [[package]] name = "spl-program-error-derive" -version = "0.3.2" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1845dfe71fd68f70382232742e758557afe973ae19e6c06807b2c30f5d5cb474" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.48", -] - -[[package]] -name = "spl-tlv-account-resolution" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" -dependencies = [ - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "syn 2.0.72", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.5.2" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +checksum = "fab8edfd37be5fa17c9e42c1bff86abbbaf0494b031b37957f2728ad2ff842ba" dependencies = [ "bytemuck", "solana-program", @@ -2294,52 +2392,30 @@ dependencies = [ [[package]] name = "spl-token" -version = "4.0.1" +version = "4.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95ae123223633a389f95d1da9d49c2d0a50d499e7060b9624626a69e536ad2a4" +checksum = "b9eb465e4bf5ce1d498f05204c8089378c1ba34ef2777ea95852fc53a1fd4fb2" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum", "solana-program", "thiserror", ] [[package]] name = "spl-token-2022" -version = "0.9.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +checksum = "b01d1b2851964e257187c0bca43a0de38d0af59192479ca01ac3e2b58b1bd95a" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", - "solana-program", - "solana-zk-token-sdk", - "spl-memo", - "spl-pod", - "spl-token", - "spl-token-metadata-interface", - "spl-transfer-hook-interface 0.3.0", - "spl-type-length-value", - "thiserror", -] - -[[package]] -name = "spl-token-2022" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d697fac19fd74ff472dfcc13f0b442dd71403178ce1de7b5d16f83a33561c059" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.4.2", - "num-traits", - "num_enum 0.7.2", + "num_enum", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -2348,16 +2424,16 @@ dependencies = [ "spl-token", "spl-token-group-interface", "spl-token-metadata-interface", - "spl-transfer-hook-interface 0.4.1", + "spl-transfer-hook-interface", "spl-type-length-value", "thiserror", ] [[package]] name = "spl-token-group-interface" -version = "0.1.1" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb67fbacd587377a400aba81718abe4424d0e9d5ea510034d3b7f130d102153" +checksum = "014817d6324b1e20c4bbc883e8ee30a5faa13e59d91d1b2b95df98b920150c17" dependencies = [ "bytemuck", "solana-program", @@ -2368,11 +2444,11 @@ dependencies = [ [[package]] name = "spl-token-metadata-interface" -version = "0.2.1" +version = "0.3.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16aa8f64b6e0eaab3f5034e84d867c8435d8216497b4543a4978a31f4b6e8a8" +checksum = "f3da00495b602ebcf5d8ba8b3ecff1ee454ce4c125c9077747be49c2d62335ba" dependencies = [ - "borsh 0.10.3", + "borsh 1.5.1", "solana-program", "spl-discriminator", "spl-pod", @@ -2382,41 +2458,9 @@ dependencies = [ [[package]] name = "spl-transfer-hook-interface" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" -dependencies = [ - "arrayref", - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution 0.4.0", - "spl-type-length-value", -] - -[[package]] -name = "spl-transfer-hook-interface" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aabdb7c471566f6ddcee724beb8618449ea24b399e58d464d6b5bc7db550259" -dependencies = [ - "arrayref", - "bytemuck", - "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution 0.5.2", - "spl-type-length-value", -] - -[[package]] -name = "spl-transfer-hook-interface" -version = "0.5.0" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "825a69d531baa1ff261a29b98fcf08e134249e624052a6b60183bb2eab2fa8ae" +checksum = "a9b5c08a89838e5a2931f79b17f611857f281a14a2100968a3ccef352cb7414b" dependencies = [ "arrayref", "bytemuck", @@ -2424,15 +2468,15 @@ dependencies = [ "spl-discriminator", "spl-pod", "spl-program-error", - "spl-tlv-account-resolution 0.5.2", + "spl-tlv-account-resolution", "spl-type-length-value", ] [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "c872f93d0600e743116501eba2d53460e73a12c9a496875a42a7d70e034fe06d" dependencies = [ "bytemuck", "solana-program", @@ -2449,9 +2493,9 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "strsim" -version = "0.10.0" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "subtle" @@ -2461,9 +2505,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.107" +version = "1.0.109" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" +checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" dependencies = [ "proc-macro2", "quote", @@ -2472,9 +2516,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.48" +version = "2.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0f3531638e407dfc0814761abb7c00a5b54992b849452a0646b7f65c9f770f3f" +checksum = "dc4b9b9bf2add8093d3f2c0204471e951b2285580335de42f9d2534f3ae7a8af" dependencies = [ "proc-macro2", "quote", @@ -2482,58 +2526,88 @@ dependencies = [ ] [[package]] -name = "synstructure" -version = "0.12.6" +name = "syn_derive" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" dependencies = [ + "proc-macro-error", "proc-macro2", "quote", - "syn 1.0.107", - "unicode-xid", + "syn 2.0.72", ] [[package]] name = "tempfile" -version = "3.3.0" +version = "3.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" +checksum = "b8fcd239983515c23a32fb82099f97d0b11b8c72f654ed659363a95c3dad7a53" dependencies = [ "cfg-if", "fastrand", - "libc", - "redox_syscall", - "remove_dir_all", - "winapi", + "once_cell", + "rustix", + "windows-sys 0.52.0", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" dependencies = [ "winapi-util", ] [[package]] name = "thiserror" -version = "1.0.57" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.57" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", +] + +[[package]] +name = "time" +version = "0.3.36" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" +dependencies = [ + "deranged", + "itoa", + "num-conv", + "powerfmt", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" + +[[package]] +name = "time-macros" +version = "0.2.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" +dependencies = [ + "num-conv", + "time-core", ] [[package]] @@ -2557,33 +2631,78 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.6.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" +checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" dependencies = [ "tinyvec_macros", ] [[package]] name = "tinyvec_macros" -version = "0.1.0" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" +checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.19" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a1ed1f98e3fdc28d6d910e6737ae6ab1a93bf1985935a1193e68f93eeb68d24e" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.20", +] + +[[package]] +name = "toml_datetime" +version = "0.6.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] + +[[package]] +name = "toml_edit" +version = "0.21.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +dependencies = [ + "indexmap 2.3.0", + "toml_datetime", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" +dependencies = [ + "indexmap 2.3.0", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.18", +] + [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "uint" @@ -2597,32 +2716,32 @@ dependencies = [ "static_assertions", ] +[[package]] +name = "unarray" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" + [[package]] name = "unicode-ident" -version = "1.0.6" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.22" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.10.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" - -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "universal-hash" @@ -2646,9 +2765,9 @@ dependencies = [ [[package]] name = "version_check" -version = "0.9.4" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" [[package]] name = "wait-timeout" @@ -2673,9 +2792,9 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e124130aee3fb58c5bdd6b639a0509486b0338acaaae0c84a5124b0f588b7f" +checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -2683,24 +2802,24 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9e7e1900c352b609c8488ad12639a311045f40a35491fb69ba8c12f758af70b" +checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b30af9e2d358182b5c7449424f017eba305ed32a7010509ede96cdc4696c46ed" +checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2708,28 +2827,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642f325be6301eb8107a83d12a8ac6c1e1c54345a7ef1a9261962dfefda09e66" +checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.91" +version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f186bd2dcf04330886ce82d6f33dd75a7bfcf69ecf5763b89fcde53b6ac9838" +checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" [[package]] name = "web-sys" -version = "0.3.60" +version = "0.3.69" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" dependencies = [ "js-sys", "wasm-bindgen", @@ -2737,7 +2856,7 @@ dependencies = [ [[package]] name = "whirlpool" -version = "0.3.0" +version = "0.3.1" dependencies = [ "anchor-lang", "anchor-spl", @@ -2747,11 +2866,11 @@ dependencies = [ "proptest", "serde", "serde_json", - "serde_with 1.14.0", + "serde_with", "solana-program", "solana-security-txt", "spl-token", - "spl-transfer-hook-interface 0.5.0", + "spl-transfer-hook-interface", "thiserror", "uint", ] @@ -2774,11 +2893,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.5" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "winapi", + "windows-sys 0.59.0", ] [[package]] @@ -2787,15 +2906,43 @@ 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", +] + +[[package]] +name = "windows-sys" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" +dependencies = [ + "windows-targets", +] + [[package]] name = "windows-sys" -version = "0.42.0" +version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets", +] + +[[package]] +name = "windows-targets" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ "windows_aarch64_gnullvm", "windows_aarch64_msvc", "windows_i686_gnu", + "windows_i686_gnullvm", "windows_i686_msvc", "windows_x86_64_gnu", "windows_x86_64_gnullvm", @@ -2804,64 +2951,89 @@ dependencies = [ [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" -version = "0.42.1" +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 = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.1" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" -version = "0.42.1" +version = "0.52.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" + +[[package]] +name = "winnow" +version = "0.5.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" +checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" +dependencies = [ + "memchr", +] + +[[package]] +name = "winnow" +version = "0.6.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "68a9bda4691f099d435ad181000724da8e5899daa10713c2d432552b9ccd3a6f" +dependencies = [ + "memchr", +] [[package]] name = "zerocopy" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.32" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.48", + "syn 2.0.72", ] [[package]] @@ -2875,12 +3047,11 @@ dependencies = [ [[package]] name = "zeroize_derive" -version = "1.3.3" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 1.0.107", - "synstructure", + "syn 2.0.72", ] diff --git a/Cargo.toml b/Cargo.toml index a60de986..7d57d075 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,4 +1,15 @@ [workspace] +resolver = "2" members = [ "programs/*" ] + +[profile.release] +overflow-checks = true +lto = "fat" +codegen-units = 1 + +[profile.release.build-override] +opt-level = 3 +incremental = false +codegen-units = 1 diff --git a/README.md b/README.md index cb379a28..6b8e3ac9 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,8 @@ This monorepo contains all the code needed to build, deploy and interact the Whi ### Requirements -- Anchor 0.29.0 -- Solana 1.17.22 +- Anchor v0.30.1 +- Solana v1.18.21 ### Getting Started @@ -47,10 +47,10 @@ These instructions are for setting up a development environment on a Mac. If you * Install NodeJS and gcc-12 using `brew install node gcc@12`. * Add gcc-12 headers to your cpath using `export CPATH="/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include"`. * Install Rust lang using `curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh`. -* Install the Solana CLI using `curl -sSfL https://release.solana.com/v1.17.22/install | sh`. +* Install the Solana CLI using `curl -sSfL https://release.solana.com/v1.18.21/install | sh`. * Add the Solana CLI to your path using `export PATH="/Users/$(whoami)/.local/share/solana/install/active_release/bin:$PATH"`. * Install Anchor version manager using `cargo install --git https://github.com/coral-xyz/anchor avm --locked --force`. -* Install the latest Anchor version using `avm install 0.29.0 && avm use 0.29.0`. +* Install the latest Anchor version using `avm install 0.30.1 && avm use 0.30.1`. * Clone this repository using `git clone https://github.com/orca-so/whirlpools`. * Install the dependencies using `yarn`. * Set up a Solana wallet if you don't have one already (see below). diff --git a/legacy-sdk/whirlpool/README.md b/legacy-sdk/whirlpool/README.md index f5048c75..6b53a98a 100644 --- a/legacy-sdk/whirlpool/README.md +++ b/legacy-sdk/whirlpool/README.md @@ -16,7 +16,7 @@ In your package, run: ``` yarn add "@orca-so/whirlpools-sdk" yarn add "@orca-so/common-sdk" -yarn add "@coral-xyz/anchor@0.29.0" +yarn add "@coral-xyz/anchor@0.30.1" yarn add "@solana/web3.js" yarn add "@solana/spl-token" yarn add "decimal.js" diff --git a/legacy-sdk/whirlpool/package.json b/legacy-sdk/whirlpool/package.json index 86ac1ee7..77f24cb8 100644 --- a/legacy-sdk/whirlpool/package.json +++ b/legacy-sdk/whirlpool/package.json @@ -6,7 +6,7 @@ "main": "dist/index.js", "types": "dist/index.d.ts", "peerDependencies": { - "@coral-xyz/anchor": "~0.29.0", + "@coral-xyz/anchor": "~0.30.1", "@orca-so/common-sdk": "0.6.2", "@solana/spl-token": "^0.4.8", "@solana/web3.js": "^1.90.0", @@ -16,14 +16,12 @@ "tiny-invariant": "^1.3.1" }, "devDependencies": { - "@coral-xyz/anchor": "~0.29.0", + "@coral-xyz/anchor": "~0.30.1", "@orca-so/common-sdk": "0.6.2", "@orca-so/whirlpools-program": "*", "@solana/spl-token": "^0.4.8", "@solana/web3.js": "^1.90.0", "decimal.js": "^10.4.3", - "mocha": "^10.7.3", - "ts-mocha": "^10.0.0", "typescript": "^5.3.3" }, "scripts": { diff --git a/legacy-sdk/whirlpool/src/context.ts b/legacy-sdk/whirlpool/src/context.ts index abac3aa6..e8bb103e 100644 --- a/legacy-sdk/whirlpool/src/context.ts +++ b/legacy-sdk/whirlpool/src/context.ts @@ -64,7 +64,8 @@ export class WhirlpoolContext { commitment: opts.userDefaultConfirmCommitment || "confirmed", preflightCommitment: opts.userDefaultConfirmCommitment || "confirmed", }); - const program = new Program(WhirlpoolIDL as Idl, programId, anchorProvider); + const idl = { ...WhirlpoolIDL, address: programId.toString() } as Idl; + const program = new Program(idl, anchorProvider); return new WhirlpoolContext( anchorProvider, anchorProvider.wallet, @@ -99,7 +100,8 @@ export class WhirlpoolContext { lookupTableFetcher?: LookupTableFetcher, opts: WhirlpoolContextOpts = {} ): WhirlpoolContext { - const program = new Program(WhirlpoolIDL as Idl, programId, provider); + const idl = { ...WhirlpoolIDL, address: programId.toString() } as Idl; + const program = new Program(idl, provider); return new WhirlpoolContext( provider, provider.wallet, diff --git a/legacy-sdk/whirlpool/src/network/public/parsing.ts b/legacy-sdk/whirlpool/src/network/public/parsing.ts index 6e512f6c..c8eb6ce2 100644 --- a/legacy-sdk/whirlpool/src/network/public/parsing.ts +++ b/legacy-sdk/whirlpool/src/network/public/parsing.ts @@ -13,6 +13,7 @@ import { WhirlpoolsConfigData, WhirlpoolsConfigExtensionData, } from "../../types/public"; +import { convertIdlToCamelCase } from "@coral-xyz/anchor/dist/cjs/idl"; /** * @category Network @@ -206,11 +207,11 @@ export class ParsableTokenBadge { } } -const WhirlpoolCoder = new BorshAccountsCoder(WhirlpoolIDL as Idl); +const WhirlpoolCoder = new BorshAccountsCoder(convertIdlToCamelCase(WhirlpoolIDL as Idl)); function parseAnchorAccount(accountName: AccountName, accountData: AccountInfo) { const data = accountData.data; - const discriminator = BorshAccountsCoder.accountDiscriminator(accountName); + const discriminator = WhirlpoolCoder.accountDiscriminator(accountName); if (discriminator.compare(data.slice(0, 8))) { console.error("incorrect account name during parsing"); return null; diff --git a/legacy-sdk/whirlpool/src/types/public/anchor-types.ts b/legacy-sdk/whirlpool/src/types/public/anchor-types.ts index 1efbde3d..976fc108 100644 --- a/legacy-sdk/whirlpool/src/types/public/anchor-types.ts +++ b/legacy-sdk/whirlpool/src/types/public/anchor-types.ts @@ -1,6 +1,7 @@ import { BN, BorshAccountsCoder, Idl } from "@coral-xyz/anchor"; import { PublicKey } from "@solana/web3.js"; import WhirlpoolIDL from "../../artifacts/whirlpool.json"; +import { convertIdlToCamelCase } from "@coral-xyz/anchor/dist/cjs/idl"; /** * This file contains the types that has the same structure as the types anchor functions returns. @@ -15,17 +16,17 @@ import WhirlpoolIDL from "../../artifacts/whirlpool.json"; * @category Network */ export enum AccountName { - WhirlpoolsConfig = "WhirlpoolsConfig", - Position = "Position", - TickArray = "TickArray", - Whirlpool = "Whirlpool", - FeeTier = "FeeTier", - PositionBundle = "PositionBundle", - WhirlpoolsConfigExtension = "WhirlpoolsConfigExtension", - TokenBadge = "TokenBadge", + WhirlpoolsConfig = "whirlpoolsConfig", + Position = "position", + TickArray = "tickArray", + Whirlpool = "whirlpool", + FeeTier = "feeTier", + PositionBundle = "positionBundle", + WhirlpoolsConfigExtension = "whirlpoolsConfigExtension", + TokenBadge = "tokenBadge", } -export const WHIRLPOOL_IDL = WhirlpoolIDL as Idl; +export const WHIRLPOOL_IDL = convertIdlToCamelCase(WhirlpoolIDL as Idl); /** * The Anchor coder for the Whirlpool program. @@ -40,7 +41,7 @@ export const WHIRLPOOL_CODER = new BorshAccountsCoder(WHIRLPOOL_IDL); */ export function getAccountSize(accountName: AccountName) { const size = WHIRLPOOL_CODER.size( - WHIRLPOOL_IDL.accounts!.find((account) => account.name === accountName)! + WHIRLPOOL_IDL.accounts!.find((account) => account.name === accountName)!.name ); return size + RESERVED_BYTES[accountName]; } diff --git a/legacy-sdk/whirlpool/tests/external_program/mpl_token_metadata.20240214.so b/legacy-sdk/whirlpool/tests/external_program/mpl_token_metadata.20240214.so deleted file mode 100644 index fdc129a7..00000000 Binary files a/legacy-sdk/whirlpool/tests/external_program/mpl_token_metadata.20240214.so and /dev/null differ diff --git a/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle.test.ts b/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle.test.ts index ed90fe99..c688286a 100644 --- a/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle.test.ts @@ -237,18 +237,6 @@ describe("initialize_position_bundle", () => { ); }); - it("should be failed: invalid rent sysvar", async () => { - const tx = await createInitializePositionBundleTx(ctx, { - // invalid parameter - rent: anchor.web3.SYSVAR_CLOCK_PUBKEY, - }); - - await assert.rejects( - tx.buildAndExecute(), - /0xbc7/ // AccountSysvarMismatch - ); - }); - it("should be failed: invalid associated token program", async () => { const tx = await createInitializePositionBundleTx(ctx, { // invalid parameter diff --git a/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle_with_metadata.test.ts b/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle_with_metadata.test.ts index 6af305bf..5e0eef3d 100644 --- a/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle_with_metadata.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/initialize_position_bundle_with_metadata.test.ts @@ -362,7 +362,7 @@ describe("initialize_position_bundle_with_metadata", () => { await assert.rejects( tx.buildAndExecute(), - /0xbc7/ // AccountSysvarMismatch + /0x7dc/ // ConstraintAddress ); }); diff --git a/legacy-sdk/whirlpool/tests/integration/open_bundled_position.test.ts b/legacy-sdk/whirlpool/tests/integration/open_bundled_position.test.ts index 0e40cfc2..a19e58ba 100644 --- a/legacy-sdk/whirlpool/tests/integration/open_bundled_position.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/open_bundled_position.test.ts @@ -500,22 +500,6 @@ describe("open_bundled_position", () => { /0xbc0/ // InvalidProgramId ); }); - - it("should be failed: invalid rent", async () => { - const positionBundleInfo = await initializePositionBundle(ctx); - - const tx = await createOpenBundledPositionTx( - ctx, positionBundleInfo.positionBundleMintKeypair.publicKey, 0, { - // invalid parameter - rent: anchor.web3.SYSVAR_CLOCK_PUBKEY, - } - ); - - await assert.rejects( - tx.buildAndExecute(), - /0xbc7/ // AccountSysvarMismatch - ); - }); }); describe("authority delegation", () => { diff --git a/legacy-sdk/whirlpool/tests/integration/v2/collect_fees_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/collect_fees_v2.test.ts index ea5a6bca..09900c5f 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/collect_fees_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/collect_fees_v2.test.ts @@ -1068,7 +1068,7 @@ describe("collect_fees_v2", () => { tokenVaultB: tokenVaultBKeypair.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1116,7 +1116,7 @@ describe("collect_fees_v2", () => { tokenVaultB: tokenVaultBKeypair.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1212,7 +1212,7 @@ describe("collect_fees_v2", () => { tokenVaultB: tokenVaultBKeypair.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1260,7 +1260,7 @@ describe("collect_fees_v2", () => { tokenVaultB: tokenVaultBKeypair.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); diff --git a/legacy-sdk/whirlpool/tests/integration/v2/collect_protocol_fees_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/collect_protocol_fees_v2.test.ts index 40503fbe..be97208b 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/collect_protocol_fees_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/collect_protocol_fees_v2.test.ts @@ -689,7 +689,7 @@ describe("collect_protocol_fees_v2", () => { ) .addSigner(collectProtocolFeesAuthorityKeypair) .buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -743,7 +743,7 @@ describe("collect_protocol_fees_v2", () => { ) .addSigner(collectProtocolFeesAuthorityKeypair) .buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -851,7 +851,7 @@ describe("collect_protocol_fees_v2", () => { ) .addSigner(collectProtocolFeesAuthorityKeypair) .buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -905,7 +905,7 @@ describe("collect_protocol_fees_v2", () => { ) .addSigner(collectProtocolFeesAuthorityKeypair) .buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); diff --git a/legacy-sdk/whirlpool/tests/integration/v2/collect_reward_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/collect_reward_v2.test.ts index 3a2e2e7b..5a60cd22 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/collect_reward_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/collect_reward_v2.test.ts @@ -1086,7 +1086,7 @@ describe("collect_reward_v2", () => { rewardIndex: i, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); } }); @@ -1156,7 +1156,7 @@ describe("collect_reward_v2", () => { rewardIndex: i, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); } }); diff --git a/legacy-sdk/whirlpool/tests/integration/v2/decrease_liquidity_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/decrease_liquidity_v2.test.ts index f27640db..82e3d0d2 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/decrease_liquidity_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/decrease_liquidity_v2.test.ts @@ -1260,7 +1260,7 @@ describe("decrease_liquidity_v2", () => { tickArrayUpper: tickArray, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1305,7 +1305,7 @@ describe("decrease_liquidity_v2", () => { tickArrayUpper: tickArray, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1395,7 +1395,7 @@ describe("decrease_liquidity_v2", () => { tickArrayUpper: tickArray, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1440,7 +1440,7 @@ describe("decrease_liquidity_v2", () => { tickArrayUpper: tickArray, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); diff --git a/legacy-sdk/whirlpool/tests/integration/v2/increase_liquidity_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/increase_liquidity_v2.test.ts index 5ae6ee02..6cf7abc1 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/increase_liquidity_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/increase_liquidity_v2.test.ts @@ -1547,7 +1547,7 @@ describe("increase_liquidity_v2", () => { tickArrayUpper: positionInitInfo.tickArrayUpper, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1598,7 +1598,7 @@ describe("increase_liquidity_v2", () => { tickArrayUpper: positionInitInfo.tickArrayUpper, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1700,7 +1700,7 @@ describe("increase_liquidity_v2", () => { tickArrayUpper: positionInitInfo.tickArrayUpper, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1751,7 +1751,7 @@ describe("increase_liquidity_v2", () => { tickArrayUpper: positionInitInfo.tickArrayUpper, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); diff --git a/legacy-sdk/whirlpool/tests/integration/v2/initialize_pool_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/initialize_pool_v2.test.ts index df6352de..5ee93ad5 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/initialize_pool_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/initialize_pool_v2.test.ts @@ -1221,9 +1221,8 @@ describe("initialize_pool_v2", () => { isToken2022: true, hasGroupPointerExtension: true, }; - // TODO: remove anchorPatch: v0.29 doesn't recognize GroupPointer - await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: true }); - await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: true }); + await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: false }); + await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: false }); }); //[11 Mar, 2024] NOT IMPLEMENTED / I believe this extension is not stable yet @@ -1242,11 +1241,10 @@ describe("initialize_pool_v2", () => { isToken2022: true, hasGroupMemberPointerExtension: true, }; - // TODO: remove anchorPatch: v0.29 doesn't recognize MemberPointer - await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: true }); - await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: true }); + await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: false }); + await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: false }); }); - + it("Token-2022: [FAIL] with/without TokenBadge with NonTransferable", async () => { const tokenTrait: TokenTrait = { isToken2022: true, diff --git a/legacy-sdk/whirlpool/tests/integration/v2/initialize_reward_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/initialize_reward_v2.test.ts index 17370948..51eb775a 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/initialize_reward_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/initialize_reward_v2.test.ts @@ -738,9 +738,8 @@ describe("initialize_reward_v2", () => { isToken2022: true, hasGroupPointerExtension: true, }; - // TODO: remove anchorPatch: v0.29 doesn't recognize GroupPointer - await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: true }); - await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: true }); + await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: false }); + await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: false }); }); //[11 Mar, 2024] NOT IMPLEMENTED / I believe this extension is not stable yet @@ -759,11 +758,10 @@ describe("initialize_reward_v2", () => { isToken2022: true, hasGroupMemberPointerExtension: true, }; - // TODO: remove anchorPatch: v0.29 doesn't recognize MemberPointer - await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: true }); - await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: true }); + await runTest({ supported: false, createTokenBadge: true, tokenTrait, anchorPatch: false }); + await runTest({ supported: false, createTokenBadge: false, tokenTrait, anchorPatch: false }); }); - + it("Token-2022: [FAIL] with/without TokenBadge with NonTransferable", async () => { const tokenTrait: TokenTrait = { isToken2022: true, diff --git a/legacy-sdk/whirlpool/tests/integration/v2/swap_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/swap_v2.test.ts index 7923e58e..5eb0d029 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/swap_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/swap_v2.test.ts @@ -2239,7 +2239,7 @@ describe("swap_v2", () => { oracle: oraclePda.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -2288,7 +2288,7 @@ describe("swap_v2", () => { oracle: oraclePda.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -2386,7 +2386,7 @@ describe("swap_v2", () => { oracle: oraclePda.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -2435,7 +2435,7 @@ describe("swap_v2", () => { oracle: oraclePda.publicKey, }) ).buildAndExecute(), - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); diff --git a/legacy-sdk/whirlpool/tests/integration/v2/two_hop_swap_v2.test.ts b/legacy-sdk/whirlpool/tests/integration/v2/two_hop_swap_v2.test.ts index 9abba4c4..256c1d1e 100644 --- a/legacy-sdk/whirlpool/tests/integration/v2/two_hop_swap_v2.test.ts +++ b/legacy-sdk/whirlpool/tests/integration/v2/two_hop_swap_v2.test.ts @@ -258,9 +258,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, whirlpoolOne: baseIxParams.whirlpoolTwo, }, - ///0x7d3/ // ConstraintRaw - // V2 has token_mint_one_a and it has address constraint - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -287,28 +285,28 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenVaultOneInput: baseIxParams.tokenVaultOneIntermediate, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); await rejectParams( { ...baseIxParams, tokenVaultOneIntermediate: baseIxParams.tokenVaultOneInput, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); await rejectParams( { ...baseIxParams, tokenVaultTwoIntermediate: baseIxParams.tokenVaultTwoOutput, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); await rejectParams( { ...baseIxParams, tokenVaultTwoOutput: baseIxParams.tokenVaultTwoIntermediate, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); @@ -1743,7 +1741,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenMintInput: otherTokenPublicKey, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); it("token_mint_intermediate", async () => { @@ -1752,7 +1750,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenMintIntermediate: otherTokenPublicKey, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); it("token_mint_output", async () => { @@ -1761,7 +1759,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenMintOutput: otherTokenPublicKey, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); }); @@ -1773,7 +1771,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenProgramInput: TEST_TOKEN_PROGRAM_ID, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); it("token_program_intermediate", async () => { @@ -1782,7 +1780,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenProgramIntermediate: TEST_TOKEN_PROGRAM_ID, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); it("token_program_output", async () => { @@ -1791,7 +1789,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenProgramOutput: TEST_TOKEN_PROGRAM_ID, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); }); @@ -1852,7 +1850,7 @@ describe("two_hop_swap_v2", () => { }).buildAndExecute(), /0xbc0/ // InvalidProgramId ); - + }); }); @@ -1981,7 +1979,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenProgramInput: TEST_TOKEN_2022_PROGRAM_ID, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); it("token_program_intermediate", async () => { @@ -1990,7 +1988,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenProgramIntermediate: TEST_TOKEN_2022_PROGRAM_ID, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); it("token_program_output", async () => { @@ -1999,7 +1997,7 @@ describe("two_hop_swap_v2", () => { ...baseIxParams, tokenProgramOutput: TEST_TOKEN_2022_PROGRAM_ID, }, - /0x7dc/ // ConstraintAddress + /0x7d3/ // ConstraintRaw ); }); }); diff --git a/package.json b/package.json index 13b9daaf..ef28ada6 100644 --- a/package.json +++ b/package.json @@ -16,9 +16,11 @@ "@types/node": "^22.1.0", "husky": "^9.1.4", "lint-staged": "^15.2.8", + "mocha": "^10.2.0", "nx": "^19.5.7", "prettier": "^3.1.1", - "rimraf": "^6.0.1" + "rimraf": "^6.0.1", + "ts-mocha": "^10.0.0" }, "workspaces": [ "legacy-sdk/*", diff --git a/programs/whirlpool/Cargo.toml b/programs/whirlpool/Cargo.toml index dba9fee8..353dd9cb 100644 --- a/programs/whirlpool/Cargo.toml +++ b/programs/whirlpool/Cargo.toml @@ -1,37 +1,36 @@ [package] name = "whirlpool" -version = "0.3.0" -description = "Created with Anchor" -edition = "2018" +version = "0.3.1" +edition = "2021" [lib] crate-type = ["cdylib", "lib"] -name = "whirlpool" [features] no-entrypoint = [] no-idl = [] cpi = ["no-entrypoint"] default = [] +idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] -anchor-lang = "0.29" -anchor-spl = {version = "0.29", features = ["metadata", "memo"]} -spl-token = {version = "4", features = ["no-entrypoint"]} -spl-transfer-hook-interface = "0.5.0" -solana-program = "1.17" -thiserror = "1.0" -uint = {version = "0.9.1", default-features = false} -borsh09 = {package = "borsh", version = "0.9.1"} -arrayref = "0.3.7" -bytemuck = "1.14.3" +anchor-lang = { version = "=0.30.1" } +anchor-spl = { version = "=0.30.1", features = ["metadata", "memo"] } +spl-token = { version = "=4.0.3", features = ["no-entrypoint"] } +spl-transfer-hook-interface = { version = "=0.6.5" } +solana-program = { version = "=1.18.21" } +thiserror = { version = "=1.0.63" } +uint = { version = "=0.9.5", default-features = false } +arrayref = { version = "=0.3.8" } +borsh09 = { package = "borsh", version = "=0.9.3" } solana-security-txt = { version = "=1.1.1" } +bytemuck = { version = "=1.16.3", features = ["derive", "min_const_generics"] } [dev-dependencies] -proptest = "1.0" -serde = "1.0.117" -serde_json = "1.0.59" +proptest = "=1.5.0" +serde = "=1.0.206" +serde_json = "=1.0.124" [dev-dependencies.serde_with] -version = "1.12.0" +version = "=2.3.3" features = ["json"] diff --git a/programs/whirlpool/src/instructions/initialize_pool.rs b/programs/whirlpool/src/instructions/initialize_pool.rs index 2b0fe456..f11afd77 100644 --- a/programs/whirlpool/src/instructions/initialize_pool.rs +++ b/programs/whirlpool/src/instructions/initialize_pool.rs @@ -8,8 +8,8 @@ use anchor_spl::token::{self, Mint, Token, TokenAccount}; pub struct InitializePool<'info> { pub whirlpools_config: Box>, - pub token_mint_a: Account<'info, Mint>, - pub token_mint_b: Account<'info, Mint>, + pub token_mint_a: Box>, + pub token_mint_b: Box>, #[account(mut)] pub funder: Signer<'info>, @@ -40,12 +40,13 @@ pub struct InitializePool<'info> { pub token_vault_b: Box>, #[account(has_one = whirlpools_config, constraint = fee_tier.tick_spacing == tick_spacing)] - pub fee_tier: Account<'info, FeeTier>, + pub fee_tier: Box>, #[account(address = token::ID)] pub token_program: Program<'info, Token>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, } pub fn handler( diff --git a/programs/whirlpool/src/instructions/initialize_position_bundle.rs b/programs/whirlpool/src/instructions/initialize_position_bundle.rs index 4496098e..e9b1e948 100644 --- a/programs/whirlpool/src/instructions/initialize_position_bundle.rs +++ b/programs/whirlpool/src/instructions/initialize_position_bundle.rs @@ -37,7 +37,8 @@ pub struct InitializePositionBundle<'info> { #[account(address = token::ID)] pub token_program: Program<'info, Token>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, pub associated_token_program: Program<'info, AssociatedToken>, } diff --git a/programs/whirlpool/src/instructions/initialize_position_bundle_with_metadata.rs b/programs/whirlpool/src/instructions/initialize_position_bundle_with_metadata.rs index dc49ca59..b953395a 100644 --- a/programs/whirlpool/src/instructions/initialize_position_bundle_with_metadata.rs +++ b/programs/whirlpool/src/instructions/initialize_position_bundle_with_metadata.rs @@ -2,6 +2,7 @@ use anchor_lang::prelude::*; use anchor_spl::associated_token::AssociatedToken; use anchor_spl::token::{self, Mint, Token, TokenAccount}; use anchor_spl::metadata::Metadata; +use solana_program::sysvar; use crate::constants::nft::whirlpool_nft_update_auth::ID as WPB_NFT_UPDATE_AUTH; use crate::{state::*, util::mint_position_bundle_token_with_metadata_and_remove_authority}; @@ -48,7 +49,9 @@ pub struct InitializePositionBundleWithMetadata<'info> { #[account(address = token::ID)] pub token_program: Program<'info, Token>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: checked via account constraints + #[account(address = sysvar::rent::ID)] + pub rent: UncheckedAccount<'info>, pub associated_token_program: Program<'info, AssociatedToken>, pub metadata_program: Program<'info, Metadata>, diff --git a/programs/whirlpool/src/instructions/initialize_reward.rs b/programs/whirlpool/src/instructions/initialize_reward.rs index 2a6759b6..0887ccc1 100644 --- a/programs/whirlpool/src/instructions/initialize_reward.rs +++ b/programs/whirlpool/src/instructions/initialize_reward.rs @@ -28,7 +28,8 @@ pub struct InitializeReward<'info> { #[account(address = token::ID)] pub token_program: Program<'info, Token>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, } pub fn handler(ctx: Context, reward_index: u8) -> Result<()> { diff --git a/programs/whirlpool/src/instructions/open_bundled_position.rs b/programs/whirlpool/src/instructions/open_bundled_position.rs index dea68c46..8e49d2c5 100644 --- a/programs/whirlpool/src/instructions/open_bundled_position.rs +++ b/programs/whirlpool/src/instructions/open_bundled_position.rs @@ -35,7 +35,8 @@ pub struct OpenBundledPosition<'info> { pub funder: Signer<'info>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, } pub fn handler( diff --git a/programs/whirlpool/src/instructions/open_position.rs b/programs/whirlpool/src/instructions/open_position.rs index 16ad2a95..6921c4d7 100644 --- a/programs/whirlpool/src/instructions/open_position.rs +++ b/programs/whirlpool/src/instructions/open_position.rs @@ -40,7 +40,8 @@ pub struct OpenPosition<'info> { #[account(address = token::ID)] pub token_program: Program<'info, Token>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, pub associated_token_program: Program<'info, AssociatedToken>, } diff --git a/programs/whirlpool/src/instructions/open_position_with_metadata.rs b/programs/whirlpool/src/instructions/open_position_with_metadata.rs index 2249ac58..76fd8cde 100644 --- a/programs/whirlpool/src/instructions/open_position_with_metadata.rs +++ b/programs/whirlpool/src/instructions/open_position_with_metadata.rs @@ -2,6 +2,7 @@ use anchor_lang::prelude::*; use anchor_spl::associated_token::AssociatedToken; use anchor_spl::token::{self, Mint, Token, TokenAccount}; use anchor_spl::metadata::Metadata; +use solana_program::sysvar; use crate::{state::*, util::mint_position_token_with_metadata_and_remove_authority}; use crate::state; @@ -29,7 +30,7 @@ pub struct OpenPositionWithMetadata<'info> { mint::authority = whirlpool, mint::decimals = 0, )] - pub position_mint: Account<'info, Mint>, + pub position_mint: Box>, /// CHECK: checked via the Metadata CPI call /// https://github.com/metaplex-foundation/metaplex-program-library/blob/master/token-metadata/program/src/utils.rs#L873 @@ -48,7 +49,9 @@ pub struct OpenPositionWithMetadata<'info> { #[account(address = token::ID)] pub token_program: Program<'info, Token>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: checked via account constraints + #[account(address = sysvar::rent::ID)] + pub rent: UncheckedAccount<'info>, pub associated_token_program: Program<'info, AssociatedToken>, pub metadata_program: Program<'info, Metadata>, diff --git a/programs/whirlpool/src/instructions/v2/collect_fees.rs b/programs/whirlpool/src/instructions/v2/collect_fees.rs index 0f8baa48..36714f43 100644 --- a/programs/whirlpool/src/instructions/v2/collect_fees.rs +++ b/programs/whirlpool/src/instructions/v2/collect_fees.rs @@ -39,9 +39,9 @@ pub struct CollectFeesV2<'info> { #[account(mut, address = whirlpool.token_vault_b)] pub token_vault_b: Box>, - #[account(address = token_mint_a.to_account_info().owner.clone())] + #[account(constraint = token_program_a.key() == token_mint_a.to_account_info().owner.clone())] pub token_program_a: Interface<'info, TokenInterface>, - #[account(address = token_mint_b.to_account_info().owner.clone())] + #[account(constraint = token_program_b.key() == token_mint_b.to_account_info().owner.clone())] pub token_program_b: Interface<'info, TokenInterface>, pub memo_program: Program<'info, Memo>, diff --git a/programs/whirlpool/src/instructions/v2/collect_protocol_fees.rs b/programs/whirlpool/src/instructions/v2/collect_protocol_fees.rs index c7f99690..05c6a915 100644 --- a/programs/whirlpool/src/instructions/v2/collect_protocol_fees.rs +++ b/programs/whirlpool/src/instructions/v2/collect_protocol_fees.rs @@ -31,9 +31,9 @@ pub struct CollectProtocolFeesV2<'info> { #[account(mut, constraint = token_destination_b.mint == whirlpool.token_mint_b)] pub token_destination_b: InterfaceAccount<'info, TokenAccount>, - #[account(address = token_mint_a.to_account_info().owner.clone())] + #[account(constraint = token_program_a.key() == token_mint_a.to_account_info().owner.clone())] pub token_program_a: Interface<'info, TokenInterface>, - #[account(address = token_mint_b.to_account_info().owner.clone())] + #[account(constraint = token_program_b.key() == token_mint_b.to_account_info().owner.clone())] pub token_program_b: Interface<'info, TokenInterface>, pub memo_program: Program<'info, Memo>, diff --git a/programs/whirlpool/src/instructions/v2/collect_reward.rs b/programs/whirlpool/src/instructions/v2/collect_reward.rs index 111ca54b..ab5566fd 100644 --- a/programs/whirlpool/src/instructions/v2/collect_reward.rs +++ b/programs/whirlpool/src/instructions/v2/collect_reward.rs @@ -36,7 +36,7 @@ pub struct CollectRewardV2<'info> { #[account(mut, address = whirlpool.reward_infos[reward_index as usize].vault)] pub reward_vault: Box>, - #[account(address = reward_mint.to_account_info().owner.clone())] + #[account(constraint = reward_token_program.key() == reward_mint.to_account_info().owner.clone())] pub reward_token_program: Interface<'info, TokenInterface>, pub memo_program: Program<'info, Memo>, diff --git a/programs/whirlpool/src/instructions/v2/increase_liquidity.rs b/programs/whirlpool/src/instructions/v2/increase_liquidity.rs index e0d0d824..b384758f 100644 --- a/programs/whirlpool/src/instructions/v2/increase_liquidity.rs +++ b/programs/whirlpool/src/instructions/v2/increase_liquidity.rs @@ -17,9 +17,9 @@ pub struct ModifyLiquidityV2<'info> { #[account(mut)] pub whirlpool: Account<'info, Whirlpool>, - #[account(address = token_mint_a.to_account_info().owner.clone())] + #[account(constraint = token_program_a.key() == token_mint_a.to_account_info().owner.clone())] pub token_program_a: Interface<'info, TokenInterface>, - #[account(address = token_mint_b.to_account_info().owner.clone())] + #[account(constraint = token_program_b.key() == token_mint_b.to_account_info().owner.clone())] pub token_program_b: Interface<'info, TokenInterface>, pub memo_program: Program<'info, Memo>, diff --git a/programs/whirlpool/src/instructions/v2/initialize_pool.rs b/programs/whirlpool/src/instructions/v2/initialize_pool.rs index 9c34ae41..0ef952fb 100644 --- a/programs/whirlpool/src/instructions/v2/initialize_pool.rs +++ b/programs/whirlpool/src/instructions/v2/initialize_pool.rs @@ -12,8 +12,8 @@ use crate::{ pub struct InitializePoolV2<'info> { pub whirlpools_config: Box>, - pub token_mint_a: InterfaceAccount<'info, Mint>, - pub token_mint_b: InterfaceAccount<'info, Mint>, + pub token_mint_a: Box>, + pub token_mint_b: Box>, #[account(seeds = [b"token_badge", whirlpools_config.key().as_ref(), token_mint_a.key().as_ref()], bump)] /// CHECK: checked in the handler @@ -53,14 +53,15 @@ pub struct InitializePoolV2<'info> { pub token_vault_b: Box>, #[account(has_one = whirlpools_config, constraint = fee_tier.tick_spacing == tick_spacing)] - pub fee_tier: Account<'info, FeeTier>, + pub fee_tier: Box>, - #[account(address = token_mint_a.to_account_info().owner.clone())] + #[account(constraint = token_program_a.key() == token_mint_a.to_account_info().owner.clone())] pub token_program_a: Interface<'info, TokenInterface>, - #[account(address = token_mint_b.to_account_info().owner.clone())] + #[account(constraint = token_program_b.key() == token_mint_b.to_account_info().owner.clone())] pub token_program_b: Interface<'info, TokenInterface>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, } pub fn handler( diff --git a/programs/whirlpool/src/instructions/v2/initialize_reward.rs b/programs/whirlpool/src/instructions/v2/initialize_reward.rs index 264eb308..73807af2 100644 --- a/programs/whirlpool/src/instructions/v2/initialize_reward.rs +++ b/programs/whirlpool/src/instructions/v2/initialize_reward.rs @@ -34,10 +34,11 @@ pub struct InitializeRewardV2<'info> { )] pub reward_vault: Box>, - #[account(address = reward_mint.to_account_info().owner.clone())] + #[account(constraint = reward_token_program.key() == reward_mint.to_account_info().owner.clone())] pub reward_token_program: Interface<'info, TokenInterface>, pub system_program: Program<'info, System>, - pub rent: Sysvar<'info, Rent>, + /// CHECK: no longer used anywhere + pub rent: UncheckedAccount<'info>, } pub fn handler(ctx: Context, reward_index: u8) -> Result<()> { @@ -49,10 +50,10 @@ pub fn handler(ctx: Context, reward_index: u8) -> Result<()> ctx.accounts.reward_mint.key(), &ctx.accounts.reward_token_badge, )?; - + if !is_supported_token_mint(&ctx.accounts.reward_mint, is_token_badge_initialized).unwrap() { return Err(ErrorCode::UnsupportedTokenMint.into()); - } + } Ok(whirlpool.initialize_reward( reward_index as usize, diff --git a/programs/whirlpool/src/instructions/v2/swap.rs b/programs/whirlpool/src/instructions/v2/swap.rs index e1bcee00..ed03f930 100644 --- a/programs/whirlpool/src/instructions/v2/swap.rs +++ b/programs/whirlpool/src/instructions/v2/swap.rs @@ -13,9 +13,9 @@ use crate::{ #[derive(Accounts)] pub struct SwapV2<'info> { - #[account(address = token_mint_a.to_account_info().owner.clone())] + #[account(constraint = token_program_a.key() == token_mint_a.to_account_info().owner.clone())] pub token_program_a: Interface<'info, TokenInterface>, - #[account(address = token_mint_b.to_account_info().owner.clone())] + #[account(constraint = token_program_b.key() == token_mint_b.to_account_info().owner.clone())] pub token_program_b: Interface<'info, TokenInterface>, pub memo_program: Program<'info, Memo>, @@ -29,7 +29,7 @@ pub struct SwapV2<'info> { pub token_mint_a: InterfaceAccount<'info, Mint>, #[account(address = whirlpool.token_mint_b)] pub token_mint_b: InterfaceAccount<'info, Mint>, - + #[account(mut, constraint = token_owner_account_a.mint == whirlpool.token_mint_a)] pub token_owner_account_a: Box>, #[account(mut, address = whirlpool.token_vault_a)] @@ -273,5 +273,5 @@ pub fn swap_with_transfer_fee_extension<'info>( next_fee_growth_global: swap_update.next_fee_growth_global, next_reward_infos: swap_update.next_reward_infos, next_protocol_fee: swap_update.next_protocol_fee, - }) + }) } diff --git a/programs/whirlpool/src/instructions/v2/two_hop_swap.rs b/programs/whirlpool/src/instructions/v2/two_hop_swap.rs index 59623a6d..75d3b9ff 100644 --- a/programs/whirlpool/src/instructions/v2/two_hop_swap.rs +++ b/programs/whirlpool/src/instructions/v2/two_hop_swap.rs @@ -25,30 +25,30 @@ pub struct TwoHopSwapV2<'info> { #[account(mut)] pub whirlpool_two: Box>, - #[account(address = whirlpool_one.input_token_mint(a_to_b_one))] - pub token_mint_input: InterfaceAccount<'info, Mint>, - #[account(address = whirlpool_one.output_token_mint(a_to_b_one))] + #[account(constraint = token_mint_input.key() == whirlpool_one.input_token_mint(a_to_b_one))] + pub token_mint_input: InterfaceAccount<'info, Mint>, + #[account(constraint = token_mint_intermediate.key() == whirlpool_one.output_token_mint(a_to_b_one))] pub token_mint_intermediate: InterfaceAccount<'info, Mint>, - #[account(address = whirlpool_two.output_token_mint(a_to_b_two))] + #[account(constraint = token_mint_output.key() == whirlpool_two.output_token_mint(a_to_b_two))] pub token_mint_output: InterfaceAccount<'info, Mint>, - #[account(address = token_mint_input.to_account_info().owner.clone())] + #[account(constraint = token_program_input.key() == token_mint_input.to_account_info().owner.clone())] pub token_program_input: Interface<'info, TokenInterface>, - #[account(address = token_mint_intermediate.to_account_info().owner.clone())] + #[account(constraint = token_program_intermediate.key() == token_mint_intermediate.to_account_info().owner.clone())] pub token_program_intermediate: Interface<'info, TokenInterface>, - #[account(address = token_mint_output.to_account_info().owner.clone())] + #[account(constraint = token_program_output.key() == token_mint_output.to_account_info().owner.clone())] pub token_program_output: Interface<'info, TokenInterface>, #[account(mut, constraint = token_owner_account_input.mint == token_mint_input.key())] pub token_owner_account_input: Box>, - #[account(mut, address = whirlpool_one.input_token_vault(a_to_b_one))] + #[account(mut, constraint = token_vault_one_input.key() == whirlpool_one.input_token_vault(a_to_b_one))] pub token_vault_one_input: Box>, - #[account(mut, address = whirlpool_one.output_token_vault(a_to_b_one))] + #[account(mut, constraint = token_vault_one_intermediate.key() == whirlpool_one.output_token_vault(a_to_b_one))] pub token_vault_one_intermediate: Box>, - #[account(mut, address = whirlpool_two.input_token_vault(a_to_b_two))] + #[account(mut, constraint = token_vault_two_intermediate.key() == whirlpool_two.input_token_vault(a_to_b_two))] pub token_vault_two_intermediate: Box>, - #[account(mut, address = whirlpool_two.output_token_vault(a_to_b_two))] + #[account(mut, constraint = token_vault_two_output.key() == whirlpool_two.output_token_vault(a_to_b_two))] pub token_vault_two_output: Box>, #[account(mut, constraint = token_owner_account_output.mint == token_mint_output.key())] pub token_owner_account_output: Box>, @@ -292,7 +292,7 @@ pub fn handler<'a, 'b, 'c, 'info>( } } - /* + /* update_and_swap_whirlpool_v2( whirlpool_one, &ctx.accounts.token_authority, diff --git a/programs/whirlpool/src/util/sparse_swap.rs b/programs/whirlpool/src/util/sparse_swap.rs index 74462a54..9f51a997 100644 --- a/programs/whirlpool/src/util/sparse_swap.rs +++ b/programs/whirlpool/src/util/sparse_swap.rs @@ -106,16 +106,16 @@ impl<'info> SparseSwapTickSequenceBuilder<'info> { /// /// static_tick_array_account_infos and supplemental_tick_array_account_infos will be merged, /// and deduplicated by key. TickArray accounts can be provided in any order. - /// + /// /// Even if over three tick arrays are provided, only three tick arrays are used in the single swap. /// The extra TickArray acts as a fallback in case the current price moves. - /// + /// /// # Parameters /// - `whirlpool` - Whirlpool account /// - `a_to_b` - Direction of the swap /// - `static_tick_array_account_infos` - TickArray accounts provided through required accounts /// - `supplemental_tick_array_account_infos` - TickArray accounts provided through remaining accounts - /// + /// /// # Errors /// - `DifferentWhirlpoolTickArrayAccount` - If the provided TickArray account is not for the whirlpool /// - `InvalidTickArraySequence` - If no valid TickArray account for the swap is found @@ -527,7 +527,7 @@ mod sparse_swap_tick_sequence_tests { #[test] fn a_to_b() { do_test(true, 1, 0, vec![0, -88, -176]); - } + } #[test] fn a_to_b_not_shifted() { @@ -571,7 +571,7 @@ mod sparse_swap_tick_sequence_tests { #[test] fn a_to_b() { do_test(true, 64, 0, vec![0, -5632, -11264]); - } + } #[test] fn a_to_b_not_shifted() { @@ -615,7 +615,7 @@ mod sparse_swap_tick_sequence_tests { #[test] fn a_to_b() { do_test(true, 32768, 0, vec![0, -2883584]); - } + } #[test] fn a_to_b_not_shifted() { @@ -815,7 +815,6 @@ mod sparse_swap_tick_sequence_tests { let swap_tick_sequence = builder.build().unwrap(); for i in 0..TICK_ARRAY_SIZE_USIZE { let tick = swap_tick_sequence.get_tick(0, 5632 + (i as i32) * 64, 64).unwrap(); - let initialized = tick.initialized; assert_eq!(initialized, false); let liquidity_net = tick.liquidity_net; @@ -1052,7 +1051,6 @@ mod sparse_swap_tick_sequence_tests { None ); let ta1 = ta1_mock.to_account_info(true); - let result = SparseSwapTickSequenceBuilder::try_from( &whirlpool, false, @@ -1351,7 +1349,7 @@ mod sparse_swap_tick_sequence_tests { None, ); assert!(result.is_err()); - assert!(result.err().unwrap().to_string().contains("AccountNotMutable")); + assert!(result.err().unwrap().to_string().contains("AccountNotMutable")); } run_test(0); @@ -1407,7 +1405,7 @@ mod sparse_swap_tick_sequence_tests { None, ); assert!(result.is_err()); - assert!(result.err().unwrap().to_string().contains("AccountOwnedByWrongProgram")); + assert!(result.err().unwrap().to_string().contains("AccountOwnedByWrongProgram")); } #[test] diff --git a/programs/whirlpool/src/util/token.rs b/programs/whirlpool/src/util/token.rs index 4ae33750..f7dde7f9 100644 --- a/programs/whirlpool/src/util/token.rs +++ b/programs/whirlpool/src/util/token.rs @@ -123,7 +123,7 @@ pub fn mint_position_token_with_metadata_and_remove_authority<'info>( metadata_program: &Program<'info, metadata::Metadata>, token_program: &Program<'info, Token>, system_program: &Program<'info, System>, - rent: &Sysvar<'info, Rent>, + rent: &UncheckedAccount<'info>, ) -> Result<()> { mint_position_token( whirlpool, @@ -246,7 +246,7 @@ pub fn mint_position_bundle_token_with_metadata_and_remove_authority<'info>( metadata_program: &Program<'info, metadata::Metadata>, token_program: &Program<'info, Token>, system_program: &Program<'info, System>, - rent: &Sysvar<'info, Rent>, + rent: &UncheckedAccount<'info>, position_bundle_seeds: &[&[u8]], ) -> Result<()> { mint_position_bundle_token( diff --git a/yarn.lock b/yarn.lock index fe07e9fc..85b57818 100644 --- a/yarn.lock +++ b/yarn.lock @@ -14,11 +14,19 @@ __metadata: languageName: node linkType: hard -"@coral-xyz/anchor@npm:~0.29.0": - version: 0.29.0 - resolution: "@coral-xyz/anchor@npm:0.29.0" +"@coral-xyz/anchor-errors@npm:^0.30.1": + version: 0.30.1 + resolution: "@coral-xyz/anchor-errors@npm:0.30.1" + checksum: 10c0/cb6749b68c12df54041d1be47df7a7b7f1d4ad2c54759bca7964c22a5dd892de0deb004100ac81cf70278e373d228a99d648013225613b5de85854530c41f501 + languageName: node + linkType: hard + +"@coral-xyz/anchor@npm:~0.30.1": + version: 0.30.1 + resolution: "@coral-xyz/anchor@npm:0.30.1" dependencies: - "@coral-xyz/borsh": "npm:^0.29.0" + "@coral-xyz/anchor-errors": "npm:^0.30.1" + "@coral-xyz/borsh": "npm:^0.30.1" "@noble/hashes": "npm:^1.3.1" "@solana/web3.js": "npm:^1.68.0" bn.js: "npm:^5.1.2" @@ -32,7 +40,7 @@ __metadata: snake-case: "npm:^3.0.4" superstruct: "npm:^0.15.4" toml: "npm:^3.0.0" - checksum: 10c0/cc863ab22b23c126e83b0804a43d45fdb7836659b917db0a8895146ec8d48637db034a7ae7dbd55d5ec7a058a266dd06878e1f921950df1e899369e49fb36c93 + checksum: 10c0/ed0e5903e72d11884015bd8c21199604f56c20a4570972323133011172677b7dcfa8c7054055d827f914b61ad5b70378343809a83a06f3f6010e9d08707fd4c5 languageName: node linkType: hard @@ -48,15 +56,15 @@ __metadata: languageName: node linkType: hard -"@coral-xyz/borsh@npm:^0.29.0": - version: 0.29.0 - resolution: "@coral-xyz/borsh@npm:0.29.0" +"@coral-xyz/borsh@npm:^0.30.1": + version: 0.30.1 + resolution: "@coral-xyz/borsh@npm:0.30.1" dependencies: bn.js: "npm:^5.1.2" buffer-layout: "npm:^1.2.0" peerDependencies: "@solana/web3.js": ^1.68.0 - checksum: 10c0/25afec48714d9f0c95a02d04215803181f7da0aad85fdd1b076d9f37ef54586342e01e24fc1b2128aba0b5155e970afd6a2c6f8b0343699d8733c0703655ce39 + checksum: 10c0/eaad9c59647ba58faecc408a30416f17b0cab56bce907cc54654f7a0b151526954c71cedadce7ed38830b731244d918e87b7c3fb19c56a26c2b140c5ccef27dd languageName: node linkType: hard @@ -278,18 +286,16 @@ __metadata: version: 0.0.0-use.local resolution: "@orca-so/whirlpools-sdk@workspace:legacy-sdk/whirlpool" dependencies: - "@coral-xyz/anchor": "npm:~0.29.0" + "@coral-xyz/anchor": "npm:~0.30.1" "@orca-so/common-sdk": "npm:0.6.2" "@orca-so/whirlpools-program": "npm:*" "@solana/spl-token": "npm:^0.4.8" "@solana/web3.js": "npm:^1.90.0" decimal.js: "npm:^10.4.3" - mocha: "npm:^10.7.3" tiny-invariant: "npm:^1.3.1" - ts-mocha: "npm:^10.0.0" typescript: "npm:^5.3.3" peerDependencies: - "@coral-xyz/anchor": ~0.29.0 + "@coral-xyz/anchor": ~0.30.1 "@orca-so/common-sdk": 0.6.2 "@solana/spl-token": ^0.4.8 "@solana/web3.js": ^1.90.0 @@ -306,9 +312,11 @@ __metadata: "@types/node": "npm:^22.1.0" husky: "npm:^9.1.4" lint-staged: "npm:^15.2.8" + mocha: "npm:^10.2.0" nx: "npm:^19.5.7" prettier: "npm:^3.1.1" rimraf: "npm:^6.0.1" + ts-mocha: "npm:^10.0.0" languageName: unknown linkType: soft @@ -2548,7 +2556,7 @@ __metadata: languageName: node linkType: hard -"mocha@npm:^10.7.3": +"mocha@npm:^10.2.0": version: 10.7.3 resolution: "mocha@npm:10.7.3" dependencies: