From 1c9c9d1a13894cf7ba49328edff03cefc73f89f3 Mon Sep 17 00:00:00 2001 From: lukacan Date: Thu, 22 Aug 2024 22:51:59 +0200 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Instead=20of=20creating=20?= =?UTF-8?q?our=20own=20IDL=20try=20to=20use=20the=20anchors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/actions/setup-rust/action.yml | 1 + .github/workflows/run_examples.yml | 10 +- CHANGELOG.md | 3 + Cargo.lock | 683 ++-- Cargo.toml | 7 +- crates/cli/src/command.rs | 2 +- crates/cli/src/command/build.rs | 2 +- crates/cli/src/command/fuzz.rs | 16 +- crates/cli/src/command/init.rs | 12 +- crates/cli/src/lib.rs | 10 +- crates/client/Cargo.toml | 4 +- crates/client/src/anchor_idl.rs | 60 + crates/client/src/commander.rs | 156 +- crates/client/src/idl.rs | 689 ---- crates/client/src/lib.rs | 11 +- .../fuzz_instructions_generator.rs | 382 ++ .../fuzzer_generator.rs | 241 -- .../client/src/source_code_generators/mod.rs | 4 +- .../program_client_generator.rs | 340 +- .../snapshot_generator.rs | 763 ---- .../test_fuzz_generator.rs | 172 + .../trident-tests/accounts_snapshots.rs | 2 - .../trident-tests/fuzz_instructions.rs | 2 - .../src/templates/trident-tests/test_fuzz.rs | 28 - crates/client/src/test_generator.rs | 402 +- crates/client/tests/anchor_idl/example.json | 241 ++ .../expected_fuzz_instructions.rs | 109 + .../expected_program_client_code.rs | 157 + .../expected_test_fuzz.rs | 37 + .../expanded_source_codes/expanded_escrow.rs | 3315 ----------------- .../expanded_fuzz_example3.rs | 3138 ---------------- .../expected_accounts_snapshots.rs | 218 -- .../expected_fuzz_instructions.rs | 187 - .../expected_program_client_code.rs | 184 - crates/client/tests/test_fuzz.rs | 95 +- .../test_program/fuzz_example3/Cargo.toml | 22 - .../test_program/fuzz_example3/Xargo.toml | 2 - .../test_program/fuzz_example3/src/error.rs | 10 - .../src/instructions/initialize.rs | 95 - .../fuzz_example3/src/instructions/mod.rs | 5 - .../src/instructions/withdraw.rs | 74 - .../test_program/fuzz_example3/src/lib.rs | 34 - .../test_program/fuzz_example3/src/state.rs | 38 - crates/client/tests/test_program_client.rs | 65 +- crates/fuzz/Cargo.toml | 8 - .../fuzz/derive/accounts_snapshots/Cargo.toml | 3 +- .../fuzz/derive/accounts_snapshots/src/lib.rs | 6 +- .../arbitrary-custom-types-4/Anchor.toml | 1 + .../arbitrary-custom-types-4/Cargo.lock | 1150 +++--- .../arbitrary-custom-types-4/Cargo.toml | 10 +- .../arbitrary-custom-types-4/src/lib.rs | 6 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 82 - .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 12 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 47 +- .../arbitrary-limit-inputs-5/Anchor.toml | 1 + .../arbitrary-limit-inputs-5/Cargo.lock | 19 +- .../src/instructions/initialize.rs | 4 +- .../arbitrary-limit-inputs-5/src/lib.rs | 2 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 16 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 56 +- .../fuzz-tests/cpi-metaplex-7/Anchor.toml | 1 + examples/fuzz-tests/cpi-metaplex-7/Cargo.lock | 13 +- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 11 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 53 +- examples/fuzz-tests/hello_world/Anchor.toml | 1 + examples/fuzz-tests/hello_world/Cargo.lock | 1156 +++--- .../programs/hello_world/Cargo.toml | 10 +- .../programs/hello_world/src/lib.rs | 7 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 57 - .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 30 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 53 +- .../Anchor.toml | 2 + .../incorrect-integer-arithmetic-3/Cargo.lock | 620 ++- .../incorrect-integer-arithmetic-3/Cargo.toml | 12 +- .../src/instructions/initialize.rs | 4 +- .../src/instructions/withdraw.rs | 4 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 218 -- .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 14 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 45 +- .../incorrect-ix-sequence-1/Anchor.toml | 1 + .../incorrect-ix-sequence-1/Cargo.lock | 1150 +++--- .../incorrect-ix-sequence-1/Cargo.toml | 10 +- .../src/instructions/end_registrations.rs | 6 +- .../src/instructions/initialize.rs | 5 +- .../src/instructions/invest.rs | 9 +- .../src/instructions/register.rs | 8 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 199 - .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 231 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 45 +- examples/fuzz-tests/simple-cpi-6/Cargo.lock | 15 +- .../simple-cpi-6/programs/caller/Cargo.toml | 3 + .../simple-cpi-6/programs/caller/src/lib.rs | 4 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 49 - .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 56 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 61 +- .../unauthorized-access-2/Anchor.toml | 1 + .../unauthorized-access-2/Cargo.lock | 1150 +++--- .../programs/unauthorized-access-2/Cargo.toml | 10 +- .../src/instructions/initialize.rs | 6 +- .../src/instructions/withdraw.rs | 6 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 106 - .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 14 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 45 +- .../unchecked-arithmetic-0/Cargo.lock | 1150 +++--- .../unchecked-arithmetic-0/Cargo.toml | 10 +- .../unchecked-arithmetic-0/src/lib.rs | 6 +- .../trident-tests/fuzz_tests/Cargo.toml | 1 + .../fuzz_tests/fuzz_0/accounts_snapshots.rs | 82 - .../fuzz_tests/fuzz_0/fuzz_instructions.rs | 10 +- .../fuzz_tests/fuzz_0/test_fuzz.rs | 53 +- .../escrow/.program_client/src/lib.rs | 124 +- examples/integration-tests/escrow/Anchor.toml | 8 +- examples/integration-tests/escrow/Cargo.lock | 2111 ++++++++--- .../escrow/programs/escrow/Cargo.toml | 9 +- .../escrow/trident-tests/poc_tests/Cargo.toml | 2 +- .../turnstile/.program_client/src/lib.rs | 56 +- .../integration-tests/turnstile/Anchor.toml | 7 + .../integration-tests/turnstile/Cargo.lock | 1050 +++++- .../turnstile/programs/turnstile/Cargo.toml | 7 +- 125 files changed, 8832 insertions(+), 14812 deletions(-) create mode 100644 crates/client/src/anchor_idl.rs delete mode 100644 crates/client/src/idl.rs create mode 100644 crates/client/src/source_code_generators/fuzz_instructions_generator.rs delete mode 100644 crates/client/src/source_code_generators/fuzzer_generator.rs delete mode 100644 crates/client/src/source_code_generators/snapshot_generator.rs create mode 100644 crates/client/src/source_code_generators/test_fuzz_generator.rs delete mode 100644 crates/client/src/templates/trident-tests/accounts_snapshots.rs delete mode 100644 crates/client/src/templates/trident-tests/fuzz_instructions.rs delete mode 100644 crates/client/src/templates/trident-tests/test_fuzz.rs create mode 100644 crates/client/tests/anchor_idl/example.json create mode 100644 crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs create mode 100644 crates/client/tests/expected_source_codes/expected_program_client_code.rs create mode 100644 crates/client/tests/expected_source_codes/expected_test_fuzz.rs delete mode 100644 crates/client/tests/test_data/expanded_source_codes/expanded_escrow.rs delete mode 100644 crates/client/tests/test_data/expanded_source_codes/expanded_fuzz_example3.rs delete mode 100644 crates/client/tests/test_data/expected_source_codes/expected_accounts_snapshots.rs delete mode 100644 crates/client/tests/test_data/expected_source_codes/expected_fuzz_instructions.rs delete mode 100644 crates/client/tests/test_data/expected_source_codes/expected_program_client_code.rs delete mode 100644 crates/client/tests/test_program/fuzz_example3/Cargo.toml delete mode 100644 crates/client/tests/test_program/fuzz_example3/Xargo.toml delete mode 100644 crates/client/tests/test_program/fuzz_example3/src/error.rs delete mode 100644 crates/client/tests/test_program/fuzz_example3/src/instructions/initialize.rs delete mode 100644 crates/client/tests/test_program/fuzz_example3/src/instructions/mod.rs delete mode 100644 crates/client/tests/test_program/fuzz_example3/src/instructions/withdraw.rs delete mode 100644 crates/client/tests/test_program/fuzz_example3/src/lib.rs delete mode 100644 crates/client/tests/test_program/fuzz_example3/src/state.rs delete mode 100644 examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs delete mode 100644 examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs delete mode 100644 examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs delete mode 100644 examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs delete mode 100644 examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs delete mode 100644 examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs delete mode 100644 examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs diff --git a/.github/actions/setup-rust/action.yml b/.github/actions/setup-rust/action.yml index ae7f7358..669022c7 100644 --- a/.github/actions/setup-rust/action.yml +++ b/.github/actions/setup-rust/action.yml @@ -16,6 +16,7 @@ runs: run: | rustup default nightly rustup component add rustfmt clippy + rustup component add rustfmt clippy --toolchain nightly shell: bash - name: Install Cargo Expand run: cargo install --locked cargo-expand diff --git a/.github/workflows/run_examples.yml b/.github/workflows/run_examples.yml index 2dea29b6..a25d5c42 100644 --- a/.github/workflows/run_examples.yml +++ b/.github/workflows/run_examples.yml @@ -5,8 +5,8 @@ on: name: Test Escrow env: - SOLANA_CLI_VERSION: 1.18.12 - ANCHOR_VERSION: 0.29.0 + SOLANA_CLI_VERSION: 1.18.18 + ANCHOR_VERSION: 0.30.1 jobs: test_escrow: @@ -16,12 +16,10 @@ jobs: - uses: ./.github/actions/setup-rust/ - uses: ./.github/actions/setup-solana/ - uses: ./.github/actions/setup-anchor/ + - uses: ./.github/actions/setup-trident/ id: rust-setup - uses: Swatinem/rust-cache@v2 name: Cache Rust and it's packages - - name: Build Escrow - working-directory: examples/integration-tests/escrow - run: anchor build - name: Test Escrow working-directory: examples/integration-tests/escrow - run: cargo run --manifest-path ../../../Cargo.toml test + run: trident test diff --git a/CHANGELOG.md b/CHANGELOG.md index 57bf63b7..836bf408 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,9 @@ incremented upon a breaking change and the patch version will be incremented for ## [dev] - Unreleased +**Changed** +- impr/ instead of parsing source code and creating our IDL, read anchor IDL ([196](https://github.com/Ackee-Blockchain/trident/pull/196)) + ## [0.7.0] - 2024-08-14 **Added** diff --git a/Cargo.lock b/Cargo.lock index 7dc015f3..11dabb10 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -355,24 +361,24 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "038dfcf04a5feb68e9c60b21c9625a54c2c0616e79b72b0fd87075a056ae1d1b" +checksum = "1bec1de6f59aedf83baf9ff929c98f2ad654b97c9510f4e70cf6f661d49fd5b1" [[package]] name = "anstyle-parse" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c03a11a9034d92058ceb6ee011ce58af4a9bf61491aa7e1e59ecd24bd40d22d4" +checksum = "eb47de1e80c2b463c735db5b217a0ddc39d612e7ac9e2e96a5aed1f57616c1cb" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.0" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad186efb764318d35165f1758e7dcef3b10628e26d41a44bc5550652e6804391" +checksum = "6d36fc52c7f6c869915e99412912f22093507da8d9e942ceaf66fe4b7c14422a" dependencies = [ "windows-sys 0.52.0", ] @@ -535,15 +541,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -609,9 +615,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.11" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd066d0b4ef8ecb03a55319dc13aa6910616d0f44008a045bb1835af830abff5" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -638,7 +644,7 @@ checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -668,7 +674,7 @@ dependencies = [ "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -841,10 +847,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "syn_derive", ] @@ -946,22 +952,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.16.1" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b236fc92302c97ed75b38da1f4917b5cdda4984745740f153a5d3059e48d725e" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.7.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee891b04274a59bd38b412188e24b849617b2e45a0fd8d057deb63e7403761b" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -972,9 +978,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -999,9 +1005,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.7" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0ec6b951b160caa93cc0c7b209e5a3bff7aae9062213451ac99493cd844c239" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -1041,13 +1047,13 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.99" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96c51067fd44124faa7f870b4b1c969379ad32b2ba805aa959430ceaa384f695" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -1158,7 +1164,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1178,9 +1184,9 @@ checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "colorchoice" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b6a852b24ab71dffc585bcb46eaf7959d175cb865a7152e35b348d1b2960422" +checksum = "d3fd119d74b830634cea2a0f58bbd0d54540518a14397557951e79340abc28c0" [[package]] name = "combine" @@ -1245,9 +1251,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1270,15 +1276,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -1441,7 +1447,7 @@ dependencies = [ "proc-macro2", "quote", "strsim 0.11.1", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1463,7 +1469,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core 0.20.10", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1543,7 +1549,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1649,7 +1655,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1672,7 +1678,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1778,7 +1784,7 @@ checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1791,7 +1797,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -1831,9 +1837,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1863,24 +1869,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1969,7 +1975,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -2090,7 +2096,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", "tokio-util 0.7.11", @@ -2169,6 +2175,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -2371,9 +2383,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cb725b6505e51229de32027e0cfcd9db29da4d89156f9747b0a5195643fa3e1" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" [[package]] name = "indexmap" @@ -2387,9 +2399,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2425,11 +2437,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2451,18 +2463,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2499,9 +2511,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.155" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b3888a4aecf77e811145cadf6eef5901f4782c53886191b2f693f24761847c" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2511,6 +2523,7 @@ checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2606,9 +2619,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.25.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6eab492fe7f8651add23237ea56dbf11b3c4ff762ab83d40a47f11433421f91" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2616,9 +2629,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.5" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9764018d143cc854c9f17f0b907de70f14393b1f502da6375dce70f00514eb3" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2637,7 +2650,7 @@ dependencies = [ "serde", "serde_derive", "serde_json", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -2715,15 +2728,25 @@ dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2873,7 +2896,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -2938,11 +2961,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2954,19 +2977,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -2977,9 +3000,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.36.1" +version = "0.36.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" +checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" dependencies = [ "memchr", ] @@ -3083,7 +3106,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall", "smallvec", "windows-targets 0.52.6", ] @@ -3159,7 +3182,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3211,9 +3234,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3223,9 +3246,12 @@ 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 = "predicates" @@ -3243,15 +3269,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3275,12 +3301,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.20" +version = "0.2.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" +checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" dependencies = [ "proc-macro2", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3318,11 +3344,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -3375,7 +3401,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3429,9 +3455,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3550,27 +3576,18 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ "getrandom 0.2.15", "libredox", @@ -3579,9 +3596,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.5" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91213439dad192326a0d7c6ee3955910425f441d7038e0d6933b0aec5c4517f" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3721,7 +3738,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.70", + "syn 2.0.76", "unicode-ident", ] @@ -3749,9 +3766,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3767,9 +3784,9 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ "bitflags 2.6.0", "errno", @@ -3874,7 +3891,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -3889,9 +3906,9 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627723fd09706bacdb5cf41499e95098555af3c3c29d014dc3c458ef6be11c0" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ "bitflags 2.6.0", "core-foundation", @@ -3902,9 +3919,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.11.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "317936bbbd05227752583946b9e66d7ce3b489f84e11a94a510b4437fef407d7" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3930,9 +3947,9 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] @@ -3948,22 +3965,23 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.204" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.120" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] @@ -3999,7 +4017,7 @@ dependencies = [ "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -4008,7 +4026,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -4037,7 +4055,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -4121,6 +4139,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4179,9 +4203,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4973213a11c2e1b924b36e0c6688682b5aa4623f8d4eeaa1204c32cee524e6d6" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -4204,9 +4228,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74c06263320e399af20d46c8cebea7a1d5dc1bc56f31f8dfaacf7119576c48a7" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" dependencies = [ "arrayref", "bincode", @@ -4230,7 +4254,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4265,9 +4289,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4e57cb8f2e90361280b246f70bb7f5f86f4e4ff1ad5bbdfe18a81bea141f03a" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" dependencies = [ "bincode", "bytemuck", @@ -4286,9 +4310,9 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c65a9540370523f3ade7190526309337cc50f1d742b3341dfa7357da3f59a56" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ "borsh 1.5.1", "futures", @@ -4303,9 +4327,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b1dc20a7a71cf37bcbc2a3a5dfd73d7410a13850aa68d954a9c09e6a77e652" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", @@ -4314,9 +4338,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d449d55d3c5c3fe4c9f0c9f790a9feabe294f8ff0b4c6b771a20b2313ad8974a" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" dependencies = [ "bincode", "crossbeam-channel", @@ -4334,9 +4358,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b1a55b8533f2dc716602e7c1b2bd555d5ac598ef6e80d28a517e6f31baf042e" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -4353,16 +4377,16 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fda213af7ae26ce249120f211060d2a85d87fe367c6490ee19b70845cbd320fc" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" dependencies = [ "bv", "bytemuck", "log", "memmap2 0.5.10", "modular-bitfield", - "num_enum 0.7.2", + "num_enum 0.7.3", "rand 0.8.5", "solana-measure", "solana-sdk", @@ -4371,9 +4395,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909f4553d0b31bb5b97533a6b64cc321a4eace9112d6efbabcf4408ea1b3f1db" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -4388,9 +4412,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2242c4a0776cdaec1358d0ffc61b32131985a7b2210c491fa465d28c313eb880" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -4404,9 +4428,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bada4ba96ef2f351363ba64ce4f592bc584ac48bb7d9da4e41303416b0a21026" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -4431,16 +4455,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5cc431df6cc1dd964134fa4ec7df765d3af3fae9c2148f96a3c4fb500290633" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -4464,9 +4488,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9eb36ef3c3a1f38515c1ae0d255c4d6e5e635a856ac2aa1cd5f892b3db58e857" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4474,9 +4498,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e38b040d3a42e8f7d80c4a86bb0d49d7aed663b56b0fe0ae135d2d145fb7ae3a" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -4488,15 +4512,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae02622c63943485f0af3d0896626eaf6478e734f0b6bc61c7cc5320963c6e75" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -4510,9 +4534,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "838532d8437d00958621d2589d6033e9c69ea95cd0936efa8964146e49dcff53" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" dependencies = [ "lazy_static", "log", @@ -4534,9 +4558,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4867f66e9527fa44451c861c1dc6d9b2a7c7a668d7c6a297cdefbe39f4395b33" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4559,21 +4583,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168f24d97347b85f05192df58d6be3e3047a4aadc4001bc1b9e711a5ec878eea" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98c426482234b7c267a5e0dfa8198442e1ffad2ad6c521f6b810949bc2719215" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" dependencies = [ "log", "solana-measure", @@ -4584,9 +4608,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0511082fc62f2d086520fff5aa1917c389d8c840930c08ad255ae05952c08a2" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -4595,9 +4619,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be55a3df105431d25f86f2a7da0cbbde5f54c1f0782ca59367ea4a8037bc6797" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -4605,9 +4629,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddec097ed7572804389195128dbd57958b427829153c6cd8ec3343c86fe3cd22" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -4620,9 +4644,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258fa7c29fb7605b8d2ed89aa0d43c640d14f4147ad1f5b3fdad19a1ac145ca5" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4648,9 +4672,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca422edcf16a6e64003ca118575ea641f7b750f14a0ad28c71dd84f33dcb912a" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4677,9 +4701,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc5a636dc75e5c25651e34f7a36afc9ae60d38166687c5b0375abb580ac81a2" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4732,9 +4756,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf373c3da0387f47fee4c5ed2465a9628b9db026a62211a692a9285aa9251544" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4760,9 +4784,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9194b8744c5b135401ab4a2923a1072d3a67697bd50f7450a4ed5302f36a6999" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ "assert_matches", "async-trait", @@ -4790,9 +4814,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97b9abc76168d19927561db6a3685b98752bd0961b4ce4f8b7f85ee12238c017" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" dependencies = [ "crossbeam-channel", "futures-util", @@ -4815,9 +4839,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7952c5306a0be5f5276448cd20246b31265bfa884f29a077a24303c6a16aeb34" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4842,9 +4866,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4fa0cc66f8e73d769bca2ede3012ba2ef8ab67963e832808665369f2cf81743" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4852,9 +4876,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "289803796d4ff7b4699504d3ab9e9d9c5205ea3892b2ebe397b377494dbd75d4" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4871,9 +4895,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6cb55a08018776a62ecff52139fbcdab1a7baa4e8f077202be58156e8dde4d5f" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4897,9 +4921,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72a8403038f4d6ab65bc7e7afb3afe8d9824c592232553c5cef55cf3de36025d" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4919,9 +4943,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4caca735caf76d51c074c3bacbfe38094bf7f92cfbe7b5b13f3bc4946e64f889" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4932,9 +4956,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699943045665038bfa4e76dd2582b4c390f1aec6ab5edef36da43afe3469f1d" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" dependencies = [ "aquamarine", "arrayref", @@ -4963,7 +4987,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -5009,9 +5033,9 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df43d3a1e1637397ab43cbc216a5a8f977ec8a3cc3f3ae8c3851c83a3255dbcf" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", @@ -5036,7 +5060,7 @@ dependencies = [ "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -5064,15 +5088,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86c76414183a325038ff020b22c07d1e9d2da0703ddc0244acfed37ee2921d96" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5083,9 +5107,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e056d865d22548bb7228121e118aa632486fc1a33a100961e5e98b5663371384" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" dependencies = [ "crossbeam-channel", "log", @@ -5099,9 +5123,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5dd1bc07beb75da5df5e07301d3d0d6104872c9afade22b910af9061fb4bc15" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" dependencies = [ "bincode", "log", @@ -5114,16 +5138,16 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fad1bdb955ec6d23a1dbf87e403ff3e610d68616275693125a893d7ed4b2d323" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -5147,9 +5171,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78733745268c96d5a29c09cde9f0a6c9d662abba43e661b75dd858da8e3d0b2e" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -5161,9 +5185,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc301310ba0755c449a8800136f67f8ad14419b366404629894cd10021495360" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -5176,14 +5200,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb887bd5078ff015e103e9ee54a6713380590efa8ff1804b3a653f07188928c6" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -5200,9 +5224,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a0cdfdf63192fb60de094fae8e81159e4e3e9aac9659fe3f9ef0e707023fb32" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -5225,9 +5249,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ea0d6d8d66e36371577f51c4d1d6192a66f1fa4efe7161a36d94677640dcadb" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5240,9 +5264,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f4c2f531c22ce806b211118be8928a791425f97de4592371fb57b246ed33e34" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -5256,9 +5280,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28ab95a5d19ff0464def1777adaae5a74e1edc9e6818103064c18fdc2643f6cb" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" dependencies = [ "crossbeam-channel", "itertools", @@ -5275,9 +5299,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d8a6486017e71a3714a8e1a635e17209135cc20535ba9808ccf106d80ff6e8b" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -5297,9 +5321,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e3dfb2deb449f7eb1dbd0c7e66dd95ec7b1303a5788673f9fbc9b5a5ea59f2" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -5311,9 +5335,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.17" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "513407f88394e437b4ff5aad892bc5bf51a655ae2401e6e63549734d3695c46f" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5340,9 +5364,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -5414,7 +5438,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5426,7 +5450,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.70", + "syn 2.0.76", "thiserror", ] @@ -5474,7 +5498,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5516,7 +5540,7 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -5657,9 +5681,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.70" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0209b68b3613b093e0ec905354eccaedcfe83b8cb37cbdeae64026c3064c16" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5675,7 +5699,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5765,14 +5789,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5819,7 +5844,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5830,7 +5855,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "test-case-core", ] @@ -5851,22 +5876,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -5946,32 +5971,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.38.0" +version = "1.40.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -6066,9 +6090,9 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.6" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4badfd56924ae69bcc9039335b2e017639ce3f9b001c393c1b2d1ef846ce2cbf" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" [[package]] name = "toml_edit" @@ -6076,27 +6100,27 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -6118,7 +6142,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -6173,12 +6197,14 @@ version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6221,6 +6247,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6258,13 +6285,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6273,7 +6295,6 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] @@ -6356,9 +6377,9 @@ checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -6444,9 +6465,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -6487,34 +6508,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6524,9 +6546,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6534,28 +6556,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6594,11 +6616,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6634,6 +6656,15 @@ dependencies = [ "windows-targets 0.52.6", ] +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", +] + [[package]] name = "windows-targets" version = "0.48.5" @@ -6764,6 +6795,15 @@ 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 = "winreg" version = "0.50.0" @@ -6824,6 +6864,7 @@ version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ + "byteorder", "zerocopy-derive", ] @@ -6835,7 +6876,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -6855,7 +6896,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.70", + "syn 2.0.76", ] [[package]] @@ -6879,9 +6920,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.12+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 72e56de1..c389f39d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -6,9 +6,10 @@ resolver = "1" [workspace.dependencies] # ANCHOR -anchor-client = ">=0.29.0" -anchor-syn = ">=0.29.0" -anchor-lang = ">=0.29.0" +anchor-client = "0.30.1" +anchor-syn = "0.30.1" +anchor-lang = "0.30.1" +anchor-lang-idl-spec = "0.1.0" # SOLANA diff --git a/crates/cli/src/command.rs b/crates/cli/src/command.rs index 3dadbe8b..a6f4a400 100644 --- a/crates/cli/src/command.rs +++ b/crates/cli/src/command.rs @@ -11,7 +11,7 @@ mod test; pub use test::test; mod init; -pub use init::{init, SnapshotsType, TestsType}; +pub use init::{init, TestsType}; mod clean; pub use clean::clean; diff --git a/crates/cli/src/command/build.rs b/crates/cli/src/command/build.rs index d005301b..11a3ab4c 100644 --- a/crates/cli/src/command/build.rs +++ b/crates/cli/src/command/build.rs @@ -22,6 +22,6 @@ pub async fn build(root: Option) { } } }; - let mut generator: TestGenerator = TestGenerator::new_with_root(root, false); + let mut generator: TestGenerator = TestGenerator::new_with_root(root); generator.build().await?; } diff --git a/crates/cli/src/command/fuzz.rs b/crates/cli/src/command/fuzz.rs index 27bf5fd7..50f672f8 100644 --- a/crates/cli/src/command/fuzz.rs +++ b/crates/cli/src/command/fuzz.rs @@ -6,8 +6,6 @@ use trident_client::___private::{Commander, TestGenerator}; use crate::_discover; -use super::SnapshotsType; - pub const TRIDENT_TOML: &str = "Trident.toml"; #[derive(Subcommand)] @@ -29,10 +27,7 @@ pub enum FuzzCommand { crash_file_path: String, }, /// Add new fuzz test. Explicit fuzz test name is not yet supported. Implicit name is fuzz_ID, where ID is automatically derived. - Add { - #[clap(default_value = "file")] - snapshots_type: SnapshotsType, - }, + Add, } #[throws] @@ -69,13 +64,8 @@ pub async fn fuzz(root: Option, subcmd: FuzzCommand) { commander.run_fuzzer_debug(target, crash_file_path).await?; } - FuzzCommand::Add { snapshots_type } => { - // generate generator with root so that we do not need to again - // look for root within the generator - let mut generator = match snapshots_type { - SnapshotsType::Macro => TestGenerator::new_with_root(root, false), - SnapshotsType::File => TestGenerator::new_with_root(root, true), - }; + FuzzCommand::Add => { + let mut generator = TestGenerator::new_with_root(root); generator.add_fuzz_test().await?; } }; diff --git a/crates/cli/src/command/init.rs b/crates/cli/src/command/init.rs index e862e41a..182f081d 100644 --- a/crates/cli/src/command/init.rs +++ b/crates/cli/src/command/init.rs @@ -13,14 +13,9 @@ pub enum TestsType { Fuzz, Poc, } -#[derive(ValueEnum, Clone)] -pub enum SnapshotsType { - Macro, - File, -} #[throws] -pub async fn init(tests_type: TestsType, snapshots_type: SnapshotsType) { +pub async fn init(tests_type: TestsType) { // look for Anchor.toml let root = if let Some(r) = _discover(ANCHOR_TOML)? { r @@ -28,10 +23,7 @@ pub async fn init(tests_type: TestsType, snapshots_type: SnapshotsType) { bail!("It does not seem that Anchor is initialized because the Anchor.toml file was not found in any parent directory!"); }; - let mut generator: TestGenerator = match snapshots_type { - SnapshotsType::Macro => TestGenerator::new_with_root(root, false), - SnapshotsType::File => TestGenerator::new_with_root(root, true), - }; + let mut generator: TestGenerator = TestGenerator::new_with_root(root); match tests_type { TestsType::Poc => { diff --git a/crates/cli/src/lib.rs b/crates/cli/src/lib.rs index f1addc70..fbc48799 100644 --- a/crates/cli/src/lib.rs +++ b/crates/cli/src/lib.rs @@ -1,7 +1,7 @@ use anyhow::Error; use anyhow::{Context, Result}; use clap::{Parser, Subcommand}; -use command::{SnapshotsType, TestsType}; +use command::TestsType; use fehler::throws; // subcommand functions to call and nested subcommands @@ -50,9 +50,6 @@ enum Command { /// Specifies the types of tests for which the frameworks should be initialized. #[clap(default_value = "fuzz")] tests_type: TestsType, - /// Specifies type of Accounts Snapshots, i.e used derive macro or generated file - #[clap(default_value = "file")] - snapshots_type: SnapshotsType, }, /// Removes target contents except for KeyPair and removes hfuzz_target folder Clean, @@ -67,10 +64,7 @@ pub async fn start() { Command::KeyPair { subcmd } => command::keypair(subcmd)?, Command::Test { root } => command::test(root).await?, Command::Fuzz { root, subcmd } => command::fuzz(root, subcmd).await?, - Command::Init { - tests_type, - snapshots_type, - } => command::init(tests_type, snapshots_type).await?, + Command::Init { tests_type } => command::init(tests_type).await?, Command::Clean => command::clean().await?, } } diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 0a951805..8af9bc6c 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -27,8 +27,9 @@ trident-fuzz = { path = "../fuzz", version = "0.1.0" } # INFO: Anchor-spl is here as dependency only to activate the idl-build feature, so that # users do not have to do it manually in their program's Cargo.toml anchor-lang = { workspace = true, features = ["init-if-needed"] } -anchor-syn = { workspace = true } anchor-client = { workspace = true, features = ["async"] } +anchor-syn = { workspace = true } +anchor-lang-idl-spec = { workspace = true } # SOLANA solana-sdk = { workspace = true } @@ -71,3 +72,4 @@ quinn-proto = { version = "0.10.6", features = ["arbitrary"] } pathdiff = "0.2.1" indicatif = "0.17.8" regex = "1.10.3" +convert_case = "0.6.0" diff --git a/crates/client/src/anchor_idl.rs b/crates/client/src/anchor_idl.rs new file mode 100644 index 00000000..9dd397cb --- /dev/null +++ b/crates/client/src/anchor_idl.rs @@ -0,0 +1,60 @@ +use anchor_lang_idl_spec::Idl; +use cargo_metadata::Package; +use convert_case::{Case, Casing}; + +use std::error::Error; +use std::fs::{self, File}; +use std::io::Read; +use std::path::PathBuf; + +pub fn load_idls( + dir_path: PathBuf, + program_packages: &[Package], +) -> Result, Box> { + let mut idls = Vec::new(); + + let package_names: Vec = program_packages + .iter() + .map(|package| { + let name = &package.name; + name.to_case(Case::Snake) + }) + .collect(); + + // Read the directory and iterate over each entry + for entry in fs::read_dir(dir_path)? { + let entry = entry?; + let path = entry.path(); + let idl_name = entry.file_name(); + let idl_name_str = idl_name.to_str().unwrap(); + + // Only process .json files + if path.is_file() && path.extension().and_then(|ext| ext.to_str()) == Some("json") { + // Remove the .json extension to get the package name + let package_name = idl_name_str.trim_end_matches(".json"); + + // Check if the package name is in the list of known packages + if package_names.iter().any(|name| name == package_name) { + // Open the file in read-only mode + let mut file = File::open(&path)?; + + // Read the file contents into a string + let mut json_content = String::new(); + file.read_to_string(&mut json_content)?; + + // Parse the string of data into an Idl struct + match serde_json::from_str::(&json_content) { + Ok(parsed_idl) => { + idls.push(parsed_idl); + } + Err(e) => { + eprintln!("Failed to parse {}: {}", path.display(), e); + // Continue to the next file on failure + } + } + } + } + } + + Ok(idls) +} diff --git a/crates/client/src/commander.rs b/crates/client/src/commander.rs index 1219fbcb..bf65a0e3 100644 --- a/crates/client/src/commander.rs +++ b/crates/client/src/commander.rs @@ -1,7 +1,5 @@ use crate::___private::Client; use crate::config::Config; -use crate::idl::{self}; -use crate::test_generator::ProgramData; use fehler::{throw, throws}; use log::debug; use solana_sdk::signer::keypair::Keypair; @@ -37,8 +35,6 @@ pub enum Error { #[error("read program code failed: '{0}'")] ReadProgramCodeFailed(String), #[error("{0:?}")] - Idl(#[from] idl::Error), - #[error("{0:?}")] TomlDeserialize(#[from] toml::de::Error), #[error("parsing Cargo.toml dependencies failed")] ParsingCargoTomlDependenciesFailed, @@ -446,141 +442,7 @@ impl Commander { packages } } - /// Displays a progress spinner for a package expansion process. - /// - /// This function creates and manages a spinner-style progress bar using the `indicatif` - /// crate to visually represent the progress of expanding a specified package. - /// The progress bar continues to spin as long as a shared atomic boolean, wrapped in an `Arc`, - /// is set to `true`. Once the boolean is flipped to `false`, indicating the expansion process is complete, - /// the spinner is cleared from the terminal. - /// - /// # Parameters - /// - `package_name`: A string slice (`&str`) representing the name of the package being expanded. - /// This name is displayed within the progress bar's message to indicate which package is currently being processed. - /// - `mutex`: A reference to an `Arc` that acts as a flag for the progress bar's activity. - fn expand_progress_bar( - package_name: &str, - mutex: &std::sync::Arc, - ) { - let progress_bar = indicatif::ProgressBar::new_spinner(); - progress_bar.set_style( - indicatif::ProgressStyle::default_spinner() - .template("{spinner} {wide_msg}") - .unwrap(), - ); - - let msg = format!("{EXPANDING_PROGRESS_BAR} [{package_name}] ... this may take a while"); - progress_bar.set_message(msg); - while mutex.load(std::sync::atomic::Ordering::SeqCst) { - progress_bar.inc(1); - std::thread::sleep(std::time::Duration::from_millis(100)); - } - - progress_bar.finish_and_clear(); - } - /// Expands program packages, extracting IDL and codes_libs pairs. - /// - /// This function iterates over a slice of `cargo_metadata::Package` objects, - /// initiating an expansion process for each. - /// The expansion involves parsing the package to extract IDL and determining the path to the code. - /// It utilizes multithreading to handle package expansions and concurrently progress bar. - /// - /// # Parameters - /// - `packages`: A slice of `cargo_metadata::Package`, representing the packages to be processed. - /// - /// # Returns - /// A tuple containing: - /// - An `Idl` object aggregating all IDL programs extracted from the packages. - /// - A vector of tuples, each consisting of a `String` (representing code) and a `cargo_metadata::camino::Utf8PathBuf` - /// (representing the path to the library code) for each package. - /// - /// # Errors - /// Returns an error if: - /// - The library path for a package cannot be found (`Error::ReadProgramCodeFailed`). - /// - The expansion of a package fails due to issues in processing its code or IDL (`Error::ReadProgramCodeFailed`). - /// - No programs are found after processing all packages (`Error::NoProgramsFound`). - #[throws] - pub async fn expand_program_packages(packages: &[cargo_metadata::Package]) -> Vec { - let shared_mutex_data = std::sync::Arc::new(std::sync::Mutex::new(Vec::new())); - - for package in packages.iter() { - let mutex = std::sync::Arc::new(std::sync::atomic::AtomicBool::new(true)); - let c_mutex = std::sync::Arc::clone(&mutex); - - let name = package.name.clone(); - - let mut libs = package.targets.iter().filter(|&t| t.is_lib()); - let path = libs - .next() - .ok_or(Error::ReadProgramCodeFailed( - "Cannot find program library path.".into(), - ))? - .src_path - .clone(); - - let c_shared_mutex_data = std::sync::Arc::clone(&shared_mutex_data); - - let cargo_thread = std::thread::spawn(move || -> Result<(), Error> { - let output = Self::expand_package(&name); - // release progress bar loop here as the expansion is the longest part - // further we cannot release after parsing as parsing can panic which will not - // release the lock - c_mutex.store(false, std::sync::atomic::Ordering::SeqCst); - let output = output.expect("Program expansion failed"); - - if output.status.success() { - let code = String::from_utf8(output.stdout).expect("Reading stdout failed"); - - let program_idl = idl::parse_to_idl_program(name, &code)?; - let mut programs_data = c_shared_mutex_data - .lock() - .expect("Acquire Programs Data lock failed"); - - let program_data = ProgramData { - code, - path, - program_idl, - }; - - programs_data.push(program_data); - - Ok(()) - } else { - let error_text = - String::from_utf8(output.stderr).expect("Reading stderr failed"); - Err(Error::ReadProgramCodeFailed(error_text)) - } - }); - Self::expand_progress_bar(&package.name, &mutex); - cargo_thread.join().unwrap()?; - } - let programs_data = shared_mutex_data.lock().unwrap().to_vec(); - programs_data - } - /// Executes a cargo command to expand the Rust source code of a specified package. - /// - /// This function leverages the `cargo +nightly` command to compile a given package with the `rustc` compiler, - /// specifically using the `-Zunpretty=expanded` option to output the expanded form of the Rust source code. - /// This operation is performed under the `check` profile, which checks the code for errors without producing - /// executable artifacts. The function is designed to provide insights into the macro-expanded source code - /// - /// # Parameters - /// - `package_name`: A string slice (`&str`) representing the name of the package to be expanded. - /// - /// # Returns - /// - Returns a `std::process::Output` object containing the outcome of the cargo command execution. This includes - /// the expanded source code in the command's stdout, along with any stderr output and the exit status. - fn expand_package(package_name: &str) -> std::io::Result { - std::process::Command::new("cargo") - .arg("+nightly") - .arg("rustc") - .args(["--package", package_name]) - .arg("--profile=check") - .arg("--") - .arg("-Zunpretty=expanded") - .output() - } #[throws] pub fn get_use_statements(code: &str, use_modules: &mut Vec) { for item in syn::parse_file(code).unwrap().items.into_iter() { @@ -616,6 +478,24 @@ impl Commander { String::from_utf8(output.stdout)? } + /// Formats program code - nightly. + #[throws] + pub async fn format_program_code_nightly(code: &str) -> String { + let mut rustfmt = Command::new("rustfmt") + .arg("+nightly") + .arg("--config") + .arg("blank_lines_upper_bound=1,blank_lines_lower_bound=1") + .kill_on_drop(true) + .stdin(Stdio::piped()) + .stdout(Stdio::piped()) + .spawn()?; + if let Some(stdio) = &mut rustfmt.stdin { + stdio.write_all(code.as_bytes()).await?; + } + let output = rustfmt.wait_with_output().await?; + String::from_utf8(output.stdout)? + } + /// Starts the localnet (Solana validator). #[throws] pub async fn start_localnet(&self) -> LocalnetHandle { diff --git a/crates/client/src/idl.rs b/crates/client/src/idl.rs deleted file mode 100644 index 02339d01..00000000 --- a/crates/client/src/idl.rs +++ /dev/null @@ -1,689 +0,0 @@ -//! The `idl` module contains structs and functions for Anchor program code parsing. -//! -//! [Idl] example: -//! -//! ```rust,ignore -//! Idl { -//! programs: [ -//! IdlProgram { -//! name: IdlName { -//! snake_case: "turnstile", -//! upper_camel_case: "Turnstile", -//! }, -//! id: "[216u8 , 55u8 , 200u8 , 93u8 , 189u8 , 81u8 , 94u8 , 109u8 , 14u8 , 249u8 , 244u8 , 106u8 , 68u8 , 214u8 , 222u8 , 190u8 , 9u8 , 25u8 , 199u8 , 75u8 , 79u8 , 230u8 , 94u8 , 137u8 , 51u8 , 187u8 , 193u8 , 48u8 , 87u8 , 222u8 , 175u8 , 163u8]", -//! instruction_account_pairs: [ -//! ( -//! IdlInstruction { -//! name: IdlName { -//! snake_case: "initialize", -//! upper_camel_case: "Initialize", -//! }, -//! parameters: [], -//! }, -//! IdlAccountGroup { -//! name: IdlName { -//! snake_case: "initialize", -//! upper_camel_case: "Initialize", -//! }, -//! accounts: [ -//! ( -//! "state", -//! "anchor_lang :: solana_program :: pubkey :: Pubkey", -//! ), -//! ( -//! "user", -//! "anchor_lang :: solana_program :: pubkey :: Pubkey", -//! ), -//! ( -//! "system_program", -//! "anchor_lang :: solana_program :: pubkey :: Pubkey", -//! ), -//! ], -//! }, -//! ), -//! ( -//! IdlInstruction { -//! name: IdlName { -//! snake_case: "coin", -//! upper_camel_case: "Coin", -//! }, -//! parameters: [ -//! ( -//! "dummy_arg", -//! "String", -//! ), -//! ], -//! }, -//! IdlAccountGroup { -//! name: IdlName { -//! snake_case: "update_state", -//! upper_camel_case: "UpdateState", -//! }, -//! accounts: [ -//! ( -//! "state", -//! "anchor_lang :: solana_program :: pubkey :: Pubkey", -//! ), -//! ], -//! }, -//! ), -//! ( -//! IdlInstruction { -//! name: IdlName { -//! snake_case: "push", -//! upper_camel_case: "Push", -//! }, -//! parameters: [], -//! }, -//! IdlAccountGroup { -//! name: IdlName { -//! snake_case: "update_state", -//! upper_camel_case: "UpdateState", -//! }, -//! accounts: [ -//! ( -//! "state", -//! "anchor_lang :: solana_program :: pubkey :: Pubkey", -//! ), -//! ], -//! }, -//! ), -//! ], -//! }, -//! ], -//! } -//! ``` - -use crate::constants::*; -use heck::{ToSnakeCase, ToUpperCamelCase}; -use quote::ToTokens; -use syn::{visit::Visit, File}; -use thiserror::Error; - -const ACCOUNT_MOD_PREFIX: &str = "__client_accounts_"; -const MOD_PRIVATE: &str = "__private"; -const MOD_INSTRUCTION: &str = "instruction"; -const MOD_GLOBAL: &str = "__global"; -const ID_IDENT: &str = "ID"; -const ACCOUNTS_IDENT: &str = "__accounts"; - -#[derive(Error, Debug)] -pub enum Error { - #[error("{0:?}")] - RustParsingError(#[from] syn::Error), - #[error("missing or invalid program item: '{0}'")] - MissingOrInvalidProgramItems(String), -} - -struct ModPub { - pub mod_name: String, - pub is_pub: bool, -} - -struct FullPathFinder { - target_item_name: String, - current_module: String, - found_path: Option, - module_pub: Vec, -} - -pub fn find_item_path(target_item_name: &str, syn_file: &File) -> Option { - let mut finder = FullPathFinder { - target_item_name: target_item_name.to_string(), - current_module: "".to_string(), - found_path: None, - module_pub: vec![], - }; - finder.visit_file(syn_file); - finder.found_path -} - -impl<'ast> syn::visit::Visit<'ast> for FullPathFinder { - fn visit_item(&mut self, item: &'ast syn::Item) { - if let Some(_found_path) = &self.found_path { - return; - } - - // INFO this will only look for enum or struct - match item { - syn::Item::Enum(syn::ItemEnum { ident, .. }) - | syn::Item::Struct(syn::ItemStruct { ident, .. }) => { - if *ident == self.target_item_name { - // Found the target item, construct the full path. - self.found_path = Some(format!("{}::{}", self.current_module, ident)); - for x in &self.module_pub { - if !x.is_pub { - println!( - "{WARNING} {} is private. Prefix with pub to access via fully qualified path of {}", - x.mod_name,ident - ); - } - } - return; - } - } - - _ => {} - } - - syn::visit::visit_item(self, item); - } - - fn visit_item_mod(&mut self, module: &'ast syn::ItemMod) { - let old_module = self.current_module.clone(); - self.current_module = format!("{}::{}", self.current_module, module.ident); - - let is_pub = matches!(module.vis, syn::Visibility::Public(_)); - - self.module_pub.push(ModPub { - mod_name: module.ident.to_string(), - is_pub, - }); - - syn::visit::visit_item_mod(self, module); - - self.module_pub.pop(); - self.current_module = old_module; - } -} - -#[derive(Debug, Default)] -pub struct Idl { - pub programs: Vec, -} - -#[derive(Debug, Clone)] -pub struct IdlName { - pub snake_case: String, - pub upper_camel_case: String, -} - -#[derive(Debug, Clone)] -pub struct IdlProgram { - pub name: IdlName, - pub id: String, - pub instruction_account_pairs: Vec<(IdlInstruction, IdlAccountGroup)>, -} - -#[derive(Debug, Clone)] -pub struct IdlInstruction { - pub name: IdlName, - pub parameters: Vec<(String, String)>, -} - -#[derive(Debug, Clone)] -pub struct IdlAccountGroup { - pub name: IdlName, - pub accounts: Vec<(String, String)>, -} - -pub fn parse_to_idl_program(name: String, code: &str) -> Result { - let mut static_program_id = None::; - let mut mod_private = None::; - let mut mod_instruction = None::; - let mut account_mods = Vec::::new(); - - let syn_file = syn::parse_file(code)?; - - for item in syn_file.items.iter() { - match item { - syn::Item::Static(item_static) if item_static.ident == ID_IDENT => { - static_program_id = Some(item_static.clone()); - } - syn::Item::Mod(item_mod) => match item_mod.ident.to_string().as_str() { - MOD_PRIVATE => mod_private = Some(item_mod.clone()), - MOD_INSTRUCTION => mod_instruction = Some(item_mod.clone()), - _ => set_account_modules(&mut account_mods, item_mod), - }, - _ => (), - } - } - - let static_program_id = static_program_id.ok_or(Error::MissingOrInvalidProgramItems( - "missing static ID".to_string(), - ))?; - let mod_private = mod_private.ok_or(Error::MissingOrInvalidProgramItems( - "missing mod private".to_string(), - ))?; - let mod_instruction = mod_instruction.ok_or(Error::MissingOrInvalidProgramItems( - "missing mod instruction".to_string(), - ))?; - - // ------ get program id ------ - // Obtain Program ID - // - // input example: - // - // ``` - // - // pub static ID: anchor_lang::solana_program::pubkey::Pubkey = - // anchor_lang::solana_program::pubkey::Pubkey::new_from_array([ - // 222u8, 219u8, 96u8, 222u8, 150u8, 129u8, 32u8, 71u8, 184u8, 221u8, 54u8, 221u8, 224u8, - // 97u8, 103u8, 133u8, 11u8, 126u8, 234u8, 11u8, 186u8, 25u8, 119u8, 161u8, 48u8, 137u8, 77u8, - // 249u8, 144u8, 153u8, 133u8, 92u8, - // ]); - // - // ``` - - let program_id_bytes = { - let new_pubkey_call = match *static_program_id.expr { - syn::Expr::Call(new_pubkey_call) => new_pubkey_call, - _ => { - return Err(Error::MissingOrInvalidProgramItems( - "static ID: new pubkey call not found".to_string(), - )) - } - }; - match new_pubkey_call.args.into_iter().next() { - Some(syn::Expr::Array(pubkey_bytes)) => pubkey_bytes, - _ => { - return Err(Error::MissingOrInvalidProgramItems( - "static ID: pubkey bytes not found".to_string(), - )) - } - } - }; - - // ------ get instruction_item_fns ------ - // Obtain Instructions as whole, parse at next step - // - // input example: - // - // ``` - // - // mod __private { - // use super::*; - // #[doc = r" __global mod defines wrapped handlers for global instructions."] - // pub mod __global { - // use super::*; - // #[inline(never)] - // pub fn init_vesting( - // __program_id: &Pubkey, - // __accounts: &[AccountInfo], - // __ix_data: &[u8], - // ) -> anchor_lang::Result<()> { - // ::solana_program::log::sol_log("Instruction: InitVesting"); - // let ix = instruction::InitVesting::deserialize(&mut &__ix_data[..]) - // .map_err(|_| anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - // let instruction::InitVesting { - // recipient, - // amount, - // start_at, - // end_at, - // interval, - // input_option, - // } = ix; - // let mut __bumps = std::collections::BTreeMap::new(); - // let mut __reallocs = std::collections::BTreeSet::new(); - // let mut __remaining_accounts: &[AccountInfo] = __accounts; - // let mut __accounts = InitVesting::try_accounts( - // __program_id, - // &mut __remaining_accounts, - // __ix_data, - // &mut __bumps, - // &mut __reallocs, - // )?; - // let result = fuzz_example3::init_vesting( - // anchor_lang::context::Context::new( - // __program_id, - // &mut __accounts, - // __remaining_accounts, - // __bumps, - // ), - // recipient, - // amount, - // start_at, - // end_at, - // interval, - // input_option, - // )?; - // __accounts.exit(__program_id) - // } - // } - // } - // - // ``` - - let instruction_item_fns = { - let items = mod_private - .content - .map(|(_, items)| items) - .unwrap_or_default(); - let item_mod_global = items - .into_iter() - .find_map(|item| match item { - syn::Item::Mod(item_mod) if item_mod.ident == MOD_GLOBAL => Some(item_mod), - _ => None?, - }) - .ok_or(Error::MissingOrInvalidProgramItems( - "mod private: mod global not found".to_string(), - ))?; - let items = item_mod_global - .content - .map(|(_, items)| items) - .unwrap_or_default(); - items.into_iter().filter_map(|item| match item { - syn::Item::Fn(item_fn) => Some(item_fn), - _ => None, - }) - }; - - // ------ get instruction + account group names ------ - // This will obtain: - // IdlInstruction - // - name - // - empty parameters vector - // IdlAccountGroup (Which is actually Context from Anchor perspective) - // - name - // - empty accounts vector - // input example: - // - // ``` - // - // pub fn init_vesting( - // __program_id: &Pubkey, - // __accounts: &[AccountInfo], - // __ix_data: &[u8], - // ) -> anchor_lang::Result<()> { - // ::solana_program::log::sol_log("Instruction: InitVesting"); - // let ix = instruction::InitVesting::deserialize(&mut &__ix_data[..]) - // .map_err(|_| anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - // let instruction::InitVesting { - // recipient, - // amount, - // start_at, - // end_at, - // interval, - // input_option, - // } = ix; - // let mut __bumps = std::collections::BTreeMap::new(); - // let mut __reallocs = std::collections::BTreeSet::new(); - // let mut __remaining_accounts: &[AccountInfo] = __accounts; - // - // *** we are looking for this part *** - // - // let mut __accounts = InitVesting::try_accounts( - // __program_id, - // &mut __remaining_accounts, - // __ix_data, - // &mut __bumps, - // &mut __reallocs, - // )?; - // ************************************* - // let result = fuzz_example3::init_vesting( - // anchor_lang::context::Context::new( - // __program_id, - // &mut __accounts, - // __remaining_accounts, - // __bumps, - // ), - // recipient, - // amount, - // start_at, - // end_at, - // interval, - // input_option, - // )?; - // __accounts.exit(__program_id) - // } - // - // ``` - - let mut instruction_account_pairs = Vec::new(); - instruction_item_fns - .into_iter() - .map(|item_fn| { - // stmt example: `let mut accounts = UpdateState::try_accounts(program_id, &mut remaining_accounts, ix_data)?;` - let account_group_name = item_fn.block.stmts.into_iter().find_map(|stmt| { - let local = if let syn::Stmt::Local(local) = stmt { - local - } else { - None? - }; - if !matches!(&local.pat, syn::Pat::Ident(pat_ident) if pat_ident.ident == ACCOUNTS_IDENT) { - None? - } - let init_expr = *local.init?.1; - let expr_try_expr = match init_expr { - syn::Expr::Try(expr_try) => *expr_try.expr, - _ => None?, - }; - let expr_call_func = match expr_try_expr { - syn::Expr::Call(expr_call) => *expr_call.func, - _ => None?, - }; - let account_group_name = match expr_call_func { - syn::Expr::Path(expr_path) => expr_path.path.segments.into_iter().next()?.ident, - _ => None?, - }; - Some(account_group_name.to_string()) - })?; - - let instruction_name = item_fn.sig.ident.to_string(); - let idl_instruction = IdlInstruction { - name: IdlName { - upper_camel_case: instruction_name.to_upper_camel_case(), - snake_case: instruction_name, - }, - parameters: Vec::new(), - }; - let idl_account = IdlAccountGroup { - name: IdlName { - snake_case: account_group_name.to_snake_case(), - upper_camel_case: account_group_name, - }, - accounts: Vec::new(), - }; - Some((idl_instruction, idl_account)) - }) - .try_for_each(|pair| { - if let Some(pair) = pair { - instruction_account_pairs.push(pair); - Ok(()) - } else { - Err(Error::MissingOrInvalidProgramItems( - "statement with `accounts` not found".to_string(), - )) - } - })?; - - // ------ get instruction parameters ------ - // This will obtain input parameters for every instruction - // For custom types such as Struct or Enum, which can be also at instruction - // input, we look for fully qualified path such as: - // fuzz_example3::instructions::initialize::CustomInputOption - // - // input example: - // - // ``` - // - // pub mod instruction { - // use super::*; - // #[doc = r" Instruction."] - // pub struct InitVesting { - // pub recipient: Pubkey, - // pub amount: u64, - // pub start_at: u64, - // pub end_at: u64, - // pub interval: u64, - // pub input_option: CustomInputOption, - // } - // ... - // ... - // ... - // pub struct WithdrawUnlocked; - // ... - // ... - // ... - // } - // - // ``` - - let mut instruction_mod_items = mod_instruction - .content - .ok_or(Error::MissingOrInvalidProgramItems( - "instruction mod: empty content".to_string(), - ))? - .1 - .into_iter(); - - for (idl_instruction, _) in &mut instruction_account_pairs { - let instruction_struct_name = &idl_instruction.name.upper_camel_case; - - let instruction_item_struct_fields = instruction_mod_items - .find_map(|item| { - let instruction_item_struct = match item { - syn::Item::Struct(item_struct) - if item_struct.ident == instruction_struct_name => - { - item_struct - } - _ => None?, - }; - let fields = match instruction_item_struct.fields { - syn::Fields::Named(fields_named) => fields_named.named, - syn::Fields::Unit => syn::punctuated::Punctuated::new(), - syn::Fields::Unnamed(_) => None?, - }; - Some(fields.into_iter()) - }) - .ok_or(Error::MissingOrInvalidProgramItems(format!( - "instruction struct: missing struct for item {}", - instruction_struct_name, - )))?; - - idl_instruction.parameters = instruction_item_struct_fields - .map(|field| { - let parameter_name = field.ident.unwrap().to_string(); - let parameter_id_type = field.ty.into_token_stream().to_string(); - - let type_name = parameter_id_type - .clone() - .replace(' ', "") - .split("::") - .last() - .unwrap_or(¶meter_id_type) - .to_string(); - - if let Some(path) = find_item_path(&type_name, &syn_file) { - let name = name.to_snake_case(); - let tmp_final_path = format!("{name}{path}"); - (parameter_name, tmp_final_path) - } else { - (parameter_name, parameter_id_type) - } - }) - .collect(); - } - - // ------ get accounts ------ - // This will obtain corresponding Context for every Instruction - // input example: - // - // ``` - // - // pub(crate) mod __client_accounts_init_vesting { - // use super::*; - // use anchor_lang::prelude::borsh; - // #[doc = " Generated client accounts for [`InitVesting`]."] - // pub struct InitVesting { - // pub sender: anchor_lang::solana_program::pubkey::Pubkey, - // pub sender_token_account: anchor_lang::solana_program::pubkey::Pubkey, - // pub escrow: anchor_lang::solana_program::pubkey::Pubkey, - // pub escrow_token_account: anchor_lang::solana_program::pubkey::Pubkey, - // pub mint: anchor_lang::solana_program::pubkey::Pubkey, - // pub token_program: anchor_lang::solana_program::pubkey::Pubkey, - // pub system_program: anchor_lang::solana_program::pubkey::Pubkey, - // } - // } - // - // ``` - - for account_mod_item in account_mods { - let account_struct_name = account_mod_item - .ident - .to_string() - .strip_prefix(ACCOUNT_MOD_PREFIX) - .unwrap() - .to_upper_camel_case(); - - let account_item_struct = account_mod_item - .content - .ok_or(Error::MissingOrInvalidProgramItems(format!( - "account mod: empty content for item {}", - account_mod_item.ident - )))? - .1 - .into_iter() - .find_map(|item| match item { - syn::Item::Struct(item_struct) if item_struct.ident == account_struct_name => { - Some(item_struct) - } - _ => None?, - }) - .ok_or(Error::MissingOrInvalidProgramItems(format!( - "account mod: struct with name {} not found", - account_struct_name - )))?; - - let account_item_struct_fields = match account_item_struct.fields { - syn::Fields::Named(fields_named) => fields_named.named, - syn::Fields::Unit => syn::punctuated::Punctuated::new(), - syn::Fields::Unnamed(_) => { - return Err(Error::MissingOrInvalidProgramItems( - "account struct: unnamed fields not allowed".to_string(), - )) - } - }; - - let accounts = account_item_struct_fields - .into_iter() - .map(|field| { - let account_name = field.ident.unwrap().to_string(); - let account_id_type = field.ty.into_token_stream().to_string(); - (account_name, account_id_type) - }) - .collect::>(); - - for (_, idl_account_group) in &mut instruction_account_pairs { - if idl_account_group.name.upper_camel_case == account_struct_name { - idl_account_group.accounts = accounts.clone(); - } - } - } - - // ------ // ------ - - Ok(IdlProgram { - name: IdlName { - upper_camel_case: name.to_upper_camel_case(), - snake_case: name.to_snake_case(), - }, - id: program_id_bytes.into_token_stream().to_string(), - instruction_account_pairs, - }) -} - -fn set_account_modules(account_modules: &mut Vec, item_module: &syn::ItemMod) { - if item_module - .ident - .to_string() - .starts_with(ACCOUNT_MOD_PREFIX) - { - account_modules.push(item_module.clone()); - return; - } - let modules = &item_module - .content - .as_ref() - .ok_or(Error::MissingOrInvalidProgramItems( - "account mod: empty content".to_string(), - )) - .unwrap() - .1; - for module in modules.iter() { - if let syn::Item::Mod(nested_module) = module { - set_account_modules(account_modules, nested_module); - } - } -} diff --git a/crates/client/src/lib.rs b/crates/client/src/lib.rs index 68d2aded..96ca8a9d 100644 --- a/crates/client/src/lib.rs +++ b/crates/client/src/lib.rs @@ -68,6 +68,7 @@ pub mod test { pub use super::error_reporter::report_error; pub use super::keys::*; pub use super::tester::Tester; + pub use anchor_lang::pubkey; pub use anyhow::{self, Error, Result}; pub use futures::{self, FutureExt}; pub use rstest::*; @@ -91,12 +92,12 @@ pub mod prelude { pub use solana_sdk::signer::Signer; } +mod anchor_idl; mod cleaner; mod client; mod commander; mod config; mod error_reporter; -mod idl; mod keys; mod reader; mod source_code_generators; @@ -105,21 +106,19 @@ mod test_generator; mod tester; pub mod ___private { + pub use super::anchor_idl::*; pub use super::cleaner::*; pub use super::client::*; pub use super::commander::Commander; pub use super::commander::Error; pub use super::commander::LocalnetHandle; pub use super::error_reporter::*; - pub use super::idl::*; pub use super::keys::*; pub use super::reader::*; pub use super::source_code_generators::*; pub use super::temp_clone::TempClone; - pub use super::test_generator::ProgramData; pub use super::test_generator::TestGenerator; pub use super::tester::*; - // pub use trident_fuzz_test::fuzz_trident; } mod constants { @@ -142,7 +141,6 @@ mod constants { pub const POC_TEST: &str = "test.rs"; // fuzz - pub const ACCOUNTS_SNAPSHOTS_FILE_NAME: &str = "accounts_snapshots.rs"; pub const FUZZ_INSTRUCTIONS_FILE_NAME: &str = "fuzz_instructions.rs"; pub const FUZZ_TEST_DIRECTORY: &str = "fuzz_tests"; pub const FUZZING: &str = "fuzzing"; @@ -165,7 +163,4 @@ mod constants { pub const WARNING: &str = "\x1b[1;93mWarning\x1b[0m"; pub const FINISH: &str = "\x1b[92mFinished\x1b[0m"; pub const ERROR: &str = "\x1b[31mError\x1b[0m"; - - // special message for the progress bar - pub const EXPANDING_PROGRESS_BAR: &str = "\x1b[92mExpanding\x1b[0m"; } diff --git a/crates/client/src/source_code_generators/fuzz_instructions_generator.rs b/crates/client/src/source_code_generators/fuzz_instructions_generator.rs new file mode 100644 index 00000000..9321adf6 --- /dev/null +++ b/crates/client/src/source_code_generators/fuzz_instructions_generator.rs @@ -0,0 +1,382 @@ +use std::collections::HashMap; + +use syn::{parse_quote, parse_str}; + +use convert_case::{Case, Casing}; +use quote::{format_ident, ToTokens}; + +use anchor_lang_idl_spec::{Idl, IdlInstruction, IdlInstructionAccountItem, IdlType}; + +pub fn generate_source_code(idls: &[Idl]) -> String { + let code = idls + .iter() + .map(|idl| { + let program_name = idl.metadata.name.to_case(Case::Snake); + let fuzz_instructions_module_name = format_ident!("{}_fuzz_instructions", program_name); + + let instructions = idl.instructions.iter().map(|instruction| { + let instruction_name = instruction.name.to_case(Case::UpperCamel); + let instruction_struct_name: syn::Ident = parse_str(&instruction_name).unwrap(); + + // Generate enum variant for the instruction + let enum_variant: syn::Variant = parse_quote! { + #instruction_struct_name(#instruction_struct_name) + }; + + enum_variant + }); + + let instruction_inputs = get_instruction_inputs(&idl.instructions); + let instructions_ixops_impls = get_instruction_ixops(&idl.instructions, program_name); + let fuzz_accounts = get_fuzz_accounts(&idl.instructions); + let snapshot_types = get_snapshot_types(&idl.instructions); + + let module_definition: syn::ItemMod = parse_quote! { + pub mod #fuzz_instructions_module_name { + use trident_client::fuzzing::*; + + #(#snapshot_types)* + + #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] + pub enum FuzzInstruction { + #(#instructions),* + } + + #(#instruction_inputs)* + + #(#instructions_ixops_impls)* + + // FIX this is just a workaround to propagate a comment to the source code easily + /// Use AccountsStorage where T can be one of: + /// Keypair, PdaStore, TokenStore, MintStore, ProgramStore + #[derive(Default)] + pub struct FuzzAccounts { + #(#fuzz_accounts),* + } + + } + }; + + module_definition.into_token_stream().to_string() + }) + .collect::(); + + code +} + +fn get_snapshot_types(instructions: &[IdlInstruction]) -> Vec { + instructions + .iter() + .fold(Vec::new(), |mut snapshot_types, instruction| { + let instruction_name = instruction.name.to_case(Case::UpperCamel); + + let ix_snapshot: syn::Ident = format_ident!("{}Snapshot", &instruction_name); + let ix_alias: syn::Ident = format_ident!("{}Alias", &instruction_name); + + let snapshot_type: syn::ItemType = + parse_quote!(type #ix_snapshot<'info> = #ix_alias<'info>;); + + snapshot_types.push(snapshot_type); + snapshot_types + }) +} + +fn get_instruction_inputs(instructions: &[IdlInstruction]) -> Vec { + instructions + .iter() + .fold(Vec::new(), |mut instructions_data, instruction| { + let instruction_name = instruction.name.to_case(Case::UpperCamel); + + let instruction_name_ident: syn::Ident = format_ident!("{}", &instruction_name); + + let instruction_data_name: syn::Ident = format_ident!("{}Data", &instruction_name); + + let instruction_accounts_name: syn::Ident = + format_ident!("{}Accounts", &instruction_name); + + let accounts = instruction + .accounts + .iter() + .map(|account| match account { + IdlInstructionAccountItem::Composite(_composite) => { + panic!("Composite Accounts are not supported yet!") + } + IdlInstructionAccountItem::Single(single) => { + let name = format_ident!("{}", single.name); + let account: syn::FnArg = parse_quote!(#name: AccountId); + account + } + }) + .collect::>(); + + let parameters = instruction + .args + .iter() + .map(|arg| { + let arg_name = format_ident!("{}", arg.name); + + let arg_type = idl_type_to_syn_type(&arg.ty); + + let parameter: syn::FnArg = parse_quote!(#arg_name: #arg_type); + parameter + }) + .collect::>(); + + let instructions_inputs: syn::ItemStruct = parse_quote! { + #[derive(Arbitrary, Debug)] + pub struct #instruction_name_ident { + pub accounts: #instruction_accounts_name, + pub data: #instruction_data_name + } + + }; + + let instructions_input_accounts: syn::ItemStruct = parse_quote! { + #[derive(Arbitrary, Debug)] + pub struct #instruction_accounts_name { + #(pub #accounts),* + } + + }; + + let instructions_input_data: syn::ItemStruct = parse_quote! { + #[derive(Arbitrary, Debug)] + pub struct #instruction_data_name { + #(pub #parameters),* + } + + }; + + instructions_data.push(instructions_inputs); + instructions_data.push(instructions_input_accounts); + instructions_data.push(instructions_input_data); + instructions_data + }) +} + +fn get_instruction_ixops( + instructions: &[IdlInstruction], + program_name: String, +) -> Vec { + let module_name: syn::Ident = parse_str(&program_name).unwrap(); + + instructions + .iter() + .fold(Vec::new(), |mut instructions_ixops_impl, instruction| { + let instruction_name = instruction.name.to_case(Case::UpperCamel); + + let instruction_ident_name: syn::Ident = format_ident!("{}", &instruction_name); + + let ix_snapshot: syn::Ident = format_ident!("{}Snapshot", &instruction_name); + + let parameters = instruction + .args + .iter() + .map(|arg| { + let arg_name = format_ident!("{}", arg.name); + + let parameter: syn::FieldValue = match arg.ty { + IdlType::Pubkey => parse_quote!(#arg_name: todo!()), + IdlType::String => { + let arg_value: syn::Expr = parse_quote!(self.data.#arg_name.clone()); + parse_quote!(#arg_name: #arg_value) + } + IdlType::Bytes => { + let arg_value: syn::Expr = parse_quote!(self.data.#arg_name.clone()); + parse_quote!(#arg_name: #arg_value) + } + IdlType::Vec(_) => { + let arg_value: syn::Expr = parse_quote!(self.data.#arg_name.clone()); + parse_quote!(#arg_name: #arg_value) + } + IdlType::Defined { + name: _, + generics: _, + } => parse_quote!(#arg_name: todo!()), + _ => { + let arg_value: syn::Expr = parse_quote!(self.data.#arg_name); + parse_quote!(#arg_name: #arg_value) + } + }; + + parameter + }) + .collect::>(); + + let ix_impl: syn::ItemImpl = parse_quote! { + impl<'info> IxOps<'info> for #instruction_ident_name { + type IxData = #module_name::instruction::#instruction_ident_name; + type IxAccounts = FuzzAccounts; + type IxSnapshot = #ix_snapshot<'info>; + + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = #module_name::instruction::#instruction_ident_name { + #(#parameters),* + }; + Ok(data) + } + + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let signers = vec![todo!()]; + let acc_meta = todo!(); + + Ok((signers, acc_meta)) + } + } + + }; + + instructions_ixops_impl.push(ix_impl); + instructions_ixops_impl + }) +} + +fn get_fuzz_accounts(instructions: &[IdlInstruction]) -> Vec { + let fuzz_accounts = instructions.iter().fold( + HashMap::new(), + |mut fuzz_accounts: HashMap, instruction| { + instruction + .accounts + .iter() + .fold(&mut fuzz_accounts, |fuzz_accounts, account| { + match account { + IdlInstructionAccountItem::Composite(_composite) => { + panic!("Composite Accounts are not supported yet!") + } + IdlInstructionAccountItem::Single(single) => { + let name: syn::Ident = format_ident!("{}", &single.name); + let account = match single.pda { + Some(_) => parse_quote! { #name: AccountsStorage }, + None => parse_quote! { #name: AccountsStorage }, + }; + fuzz_accounts.entry(name).or_insert(account); + } + }; + fuzz_accounts + }); + fuzz_accounts + }, + ); + let mut sorted_accounts: Vec<_> = fuzz_accounts.into_iter().collect(); + + sorted_accounts.sort_by(|(k1, _), (k2, _)| k1.cmp(k2)); + + // Extract the FnArg values into a Vec + sorted_accounts.into_iter().map(|(_, v)| v).collect() +} + +/// Converts an `IdlType` to a corresponding Rust `syn::Type`. +fn idl_type_to_syn_type(idl_type: &IdlType) -> syn::Type { + match idl_type { + IdlType::Bool => parse_quote!(bool), + IdlType::U8 => parse_quote!(u8), + IdlType::I8 => parse_quote!(i8), + IdlType::U16 => parse_quote!(u16), + IdlType::I16 => parse_quote!(i16), + IdlType::U32 => parse_quote!(u32), + IdlType::I32 => parse_quote!(i32), + IdlType::F32 => parse_quote!(f32), + IdlType::U64 => parse_quote!(u64), + IdlType::I64 => parse_quote!(i64), + IdlType::F64 => parse_quote!(f64), + IdlType::U128 => parse_quote!(u128), + IdlType::I128 => parse_quote!(i128), + IdlType::U256 => parse_quote!(u256), // Assuming custom type for u256 + IdlType::I256 => parse_quote!(i256), // Assuming custom type for i256 + IdlType::Bytes => parse_quote!(Vec), + IdlType::String => parse_quote!(String), + IdlType::Pubkey => parse_quote!(AccountId), // Replace with AccountId if needed + IdlType::Option(inner) => { + let inner_type = get_inner_type(inner, 0); + parse_quote!(Option<#inner_type>) + } + IdlType::Vec(inner) => { + let inner_type = get_inner_type(inner, 0); + parse_quote!(Vec<#inner_type>) + } + IdlType::Array(inner, len) => { + let inner_type = get_inner_type(inner, 0); + + let len = match len { + anchor_lang_idl_spec::IdlArrayLen::Generic(_generic) => { + panic!("Generic within Array len not supported") + } + anchor_lang_idl_spec::IdlArrayLen::Value(len) => len, + }; + parse_quote!([#inner_type;#len]) + } + // TODO try to automatically generate the struct so we can simply + // derive arbitrary + IdlType::Defined { name, generics: _ } => { + let name_ident: syn::Ident = format_ident!("{}", &name); + parse_quote!(#name_ident) + } + IdlType::Generic(_name) => { + panic!("Generic currently not supported") + } + _ => todo!(), + } +} + +fn get_inner_type(idl_type: &IdlType, nestings: u8) -> syn::Type { + if nestings >= 5 { + panic!("No more than 5 nestings allowed"); + } + match idl_type { + IdlType::Bool => parse_quote!(bool), + IdlType::U8 => parse_quote!(u8), + IdlType::I8 => parse_quote!(i8), + IdlType::U16 => parse_quote!(u16), + IdlType::I16 => parse_quote!(i16), + IdlType::U32 => parse_quote!(u32), + IdlType::I32 => parse_quote!(i32), + IdlType::F32 => parse_quote!(f32), + IdlType::U64 => parse_quote!(u64), + IdlType::I64 => parse_quote!(i64), + IdlType::F64 => parse_quote!(f64), + IdlType::U128 => parse_quote!(u128), + IdlType::I128 => parse_quote!(i128), + IdlType::U256 => parse_quote!(u256), + IdlType::I256 => parse_quote!(i256), + IdlType::Bytes => parse_quote!(Vec), + IdlType::String => parse_quote!(String), + IdlType::Pubkey => parse_quote!(AccountId), + IdlType::Option(inner) => { + let inner_type = get_inner_type(inner, nestings + 1); + parse_quote!(Option<#inner_type>) + } + IdlType::Vec(inner) => { + let inner_type = get_inner_type(inner, nestings + 1); + parse_quote!(Vec<#inner_type>) + } + IdlType::Array(inner, len) => { + let inner_type = get_inner_type(inner, nestings + 1); + + let len = match len { + anchor_lang_idl_spec::IdlArrayLen::Generic(_generic) => { + panic!("Generic within Array len not supported") + } + anchor_lang_idl_spec::IdlArrayLen::Value(len) => len, + }; + parse_quote!([#inner_type;#len]) + } + IdlType::Defined { + name: _, + generics: _, + } => { + panic!("Defined not supported") + } + IdlType::Generic(_name) => { + panic!("Generic not supported") + } + _ => todo!(), + } +} diff --git a/crates/client/src/source_code_generators/fuzzer_generator.rs b/crates/client/src/source_code_generators/fuzzer_generator.rs deleted file mode 100644 index 744724a8..00000000 --- a/crates/client/src/source_code_generators/fuzzer_generator.rs +++ /dev/null @@ -1,241 +0,0 @@ -use std::collections::HashMap; - -use crate::test_generator::ProgramData; -use proc_macro2::Ident; -use quote::{format_ident, ToTokens}; -use syn::{parse_quote, parse_str}; - -/// Generates `fuzz_instructions.rs` from [Idl] created from Anchor programs. -pub fn generate_source_code(programs_data: &[ProgramData]) -> String { - let code = programs_data - .iter() - .map(|program_data| { - let program_name = &program_data.program_idl.name.snake_case; - let fuzz_instructions_module_name = format_ident!("{}_fuzz_instructions", program_name); - let module_name: syn::Ident = parse_str(program_name).unwrap(); - - let instructions = program_data - .program_idl - .instruction_account_pairs - .iter() - .fold( - Vec::new(), - |mut instructions, (idl_instruction, _idl_account_group)| { - let instruction_struct_name: syn::Ident = - parse_str(&idl_instruction.name.upper_camel_case).unwrap(); - - let instruction: syn::Variant = parse_quote! { - #instruction_struct_name(#instruction_struct_name) - }; - - instructions.push(instruction); - instructions - }, - ) - .into_iter(); - - let instructions_data = program_data - .program_idl - .instruction_account_pairs - .iter() - .fold( - Vec::new(), - |mut instructions_data, (idl_instruction, idl_account_group)| { - let instruction_name: syn::Ident = - format_ident!("{}", &idl_instruction.name.upper_camel_case); - - let instruction_data_name: syn::Ident = - format_ident!("{}Data", &idl_instruction.name.upper_camel_case); - - let instruction_accounts_name: syn::Ident = - format_ident!("{}Accounts", &idl_instruction.name.upper_camel_case); - - let parameters = idl_instruction - .parameters - .iter() - .map(|(name, ty)| { - let name_ident = format_ident!("{name}"); - // Replace Pubkey type by AccountId, so the fuzzer will generate only Account indices - // a not always unique Pubkeys - let ty: syn::Type = if ty == "Pubkey" - || ty.replace(' ', "").ends_with("::Pubkey") - { - parse_str("AccountId").expect("Unable to parse AccountId") - } else { - parse_str(ty).expect("Unable to parse ty") - }; - let parameter: syn::FnArg = parse_quote!(#name_ident: #ty); - parameter - }) - .collect::>(); - - let accounts = idl_account_group - .accounts - .iter() - .map(|(name, _ty)| { - let name = format_ident!("{name}"); - let account: syn::FnArg = parse_quote!(#name: AccountId); - account - }) - .collect::>(); - - let ix_enum_variant: syn::ItemStruct = parse_quote! { - #[derive(Arbitrary, Debug)] - pub struct #instruction_name { - pub accounts: #instruction_accounts_name, - pub data: #instruction_data_name - } - - }; - - let ix_accounts: syn::ItemStruct = parse_quote! { - #[derive(Arbitrary, Debug)] - pub struct #instruction_accounts_name { - #(pub #accounts),* - } - - }; - let ix_data: syn::ItemStruct = parse_quote! { - #[derive(Arbitrary, Debug)] - pub struct #instruction_data_name { - #(pub #parameters),* - } - - }; - - instructions_data.push(ix_enum_variant); - instructions_data.push(ix_accounts); - instructions_data.push(ix_data); - instructions_data - }, - ) - .into_iter(); - - let instructions_ixops_impls = program_data - .program_idl - .instruction_account_pairs - .iter() - .fold( - Vec::new(), - |mut instructions_ixops_impl, (idl_instruction, idl_account_group)| { - let instruction_name: syn::Ident = - format_ident!("{}", &idl_instruction.name.upper_camel_case); - let ctx_name: syn::Ident = - format_ident!("{}", &idl_account_group.name.upper_camel_case); - - let ix_snapshot: syn::Ident = - format_ident!("{}Snapshot", &idl_instruction.name.upper_camel_case); - - let parameters = idl_instruction - .parameters - .iter() - .map(|(name, _ty)| { - let name = format_ident!("{name}"); - let parameter: syn::FnArg = parse_quote!(#name: todo!()); - parameter - }) - .collect::>(); - - let accounts = idl_account_group - .accounts - .iter() - .map(|(name, _ty)| { - let name = format_ident!("{name}"); - let account: syn::FnArg = parse_quote!(#name: todo!()); - account - }) - .collect::>(); - - let ix_impl: syn::ItemImpl = parse_quote! { - impl<'info> IxOps<'info> for #instruction_name { - type IxData = #module_name::instruction::#instruction_name; - type IxAccounts = FuzzAccounts; - type IxSnapshot = #ix_snapshot<'info>; - - fn get_data( - &self, - _client: &mut impl FuzzClient, - _fuzz_accounts: &mut FuzzAccounts, - ) -> Result { - let data = #module_name::instruction::#instruction_name { - #(#parameters),* - }; - Ok(data) - } - - fn get_accounts( - &self, - client: &mut impl FuzzClient, - fuzz_accounts: &mut FuzzAccounts, - ) -> Result<(Vec, Vec), FuzzingError> { - let signers = vec![todo!()]; - let acc_meta = #module_name::accounts::#ctx_name { - #(#accounts),* - } - .to_account_metas(None); - - Ok((signers, acc_meta)) - } - } - - }; - - instructions_ixops_impl.push(ix_impl); - instructions_ixops_impl - }, - ) - .into_iter(); - - let fuzz_accounts = program_data - .program_idl - .instruction_account_pairs - .iter() - .fold( - HashMap::new(), - |mut fuzz_accounts: HashMap, - (_idl_instruction, idl_account_group)| { - idl_account_group.accounts.iter().fold( - &mut fuzz_accounts, - |fuzz_accounts, (name, _ty)| { - let name = format_ident!("{name}"); - fuzz_accounts.entry(name).or_default(); - fuzz_accounts - }, - ); - fuzz_accounts - }, - ); - - // this ensures that the order of accounts is deterministic - // so we can use expected generated template within tests - let mut sorted_fuzz_accounts: Vec<_> = fuzz_accounts.keys().collect(); - sorted_fuzz_accounts.sort(); - - let fuzzer_module: syn::ItemMod = parse_quote! { - pub mod #fuzz_instructions_module_name { - use trident_client::fuzzing::*; - use crate::accounts_snapshots::*; - - #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] - pub enum FuzzInstruction { - #(#instructions),* - } - - #(#instructions_data)* - - #(#instructions_ixops_impls)* - - // FIX this is just a workaround to propagate a comment to the source code easily - /// Use AccountsStorage where T can be one of: - /// Keypair, PdaStore, TokenStore, MintStore, ProgramStore - #[derive(Default)] - pub struct FuzzAccounts { - #(#sorted_fuzz_accounts: AccountsStorage),* - } - } - }; - fuzzer_module.into_token_stream().to_string() - }) - .collect::(); - code -} diff --git a/crates/client/src/source_code_generators/mod.rs b/crates/client/src/source_code_generators/mod.rs index 1877329d..933510e5 100644 --- a/crates/client/src/source_code_generators/mod.rs +++ b/crates/client/src/source_code_generators/mod.rs @@ -1,3 +1,3 @@ -pub mod fuzzer_generator; +pub mod fuzz_instructions_generator; pub mod program_client_generator; -pub mod snapshot_generator; +pub mod test_fuzz_generator; diff --git a/crates/client/src/source_code_generators/program_client_generator.rs b/crates/client/src/source_code_generators/program_client_generator.rs index b4471bd4..35037ae0 100644 --- a/crates/client/src/source_code_generators/program_client_generator.rs +++ b/crates/client/src/source_code_generators/program_client_generator.rs @@ -1,145 +1,140 @@ -use crate::test_generator::ProgramData; +use convert_case::{Case, Casing}; use quote::{format_ident, ToTokens}; use syn::{parse_quote, parse_str}; -/// Generates `program_client`'s `lib.rs` from [Idl] created from Anchor programs. -/// Disable regenerating the `use` statements with a used imports `use_modules` -/// -/// _Note_: See the crate's tests for output example. -pub fn generate_source_code(programs_data: &[ProgramData], use_modules: &[syn::ItemUse]) -> String { +use anchor_lang_idl_spec::{Idl, IdlInstructionAccountItem, IdlType}; + +pub fn generate_source_code(idl_instructions: &[Idl], use_modules: &[syn::ItemUse]) -> String { let mut output = "// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module\n".to_owned(); - // let code = code_path.into_iter().map(|(_, _, idl_program)| {}); - let code = programs_data + let code = idl_instructions .iter() - .map(|program_data| { - let program_name = &program_data.program_idl.name.snake_case; + .map(|idl| { + let program_name = &idl.metadata.name.to_case(Case::Snake); + let program_id = &idl.address; + let instruction_module_name = format_ident!("{}_instruction", program_name); let module_name: syn::Ident = parse_str(program_name).unwrap(); - let pubkey_bytes: syn::ExprArray = parse_str(&program_data.program_idl.id).unwrap(); - let instructions = program_data - .program_idl - .instruction_account_pairs + let instructions = idl + .instructions .iter() - .fold( - Vec::new(), - |mut instructions, (idl_instruction, idl_account_group)| { - let instruction_fn_name: syn::Ident = - parse_str(&idl_instruction.name.snake_case).unwrap(); - let instruction_struct_name: syn::Ident = - parse_str(&idl_instruction.name.upper_camel_case).unwrap(); - let account_struct_name: syn::Ident = - parse_str(&idl_account_group.name.upper_camel_case).unwrap(); - let instruction_name: syn::Ident = - parse_str(&(idl_instruction.name.snake_case.clone() + "_ix")).unwrap(); - - let parameters = idl_instruction - .parameters - .iter() - .map(|(name, ty)| { - let name = format_ident!("i_{name}"); - let ty: syn::Type = parse_str(ty).unwrap(); - let parameter: syn::FnArg = parse_quote!(#name: #ty); - parameter - }) - .collect::>(); - - let accounts = idl_account_group - .accounts - .iter() - .map(|(name, ty)| { - let name = format_ident!("a_{name}"); - // do not use fully qualified type for Pubkey - let ty = parse_str(ty).unwrap(); - let ty: syn::Type = match &ty { - syn::Type::Path(tp) => { - let last_type = - &tp.path.segments.last().unwrap().ident.to_string(); - if last_type == "Pubkey" { - let t: syn::Type = parse_str(last_type).unwrap(); - t - } else { - // we expect only Pubkey, but if it is something different, than return fully qualified type - ty - } - } - _ => ty, - }; - let account: syn::FnArg = parse_quote!(#name: #ty); - account - }) - .collect::>(); - - let field_parameters = idl_instruction - .parameters - .iter() - .map(|(name, _)| { - let name: syn::Ident = parse_str(name).unwrap(); - let value = format_ident!("i_{name}"); - let parameter: syn::FieldValue = parse_quote!(#name: #value); - parameter - }) - .collect::>(); - - let field_accounts = idl_account_group - .accounts - .iter() - .map(|(name, _)| { - let name: syn::Ident = parse_str(name).unwrap(); - let value = format_ident!("a_{name}"); - let account: syn::FieldValue = parse_quote!(#name: #value); - account - }) - .collect::>(); - - let instruction: syn::ItemFn = parse_quote! { - pub async fn #instruction_fn_name( - client: &Client, - #(#parameters,)* - #(#accounts,)* - signers: impl IntoIterator + Send + 'static, - ) -> Result { - client.send_instruction( - PROGRAM_ID, - #module_name::instruction::#instruction_struct_name { - #(#field_parameters,)* - }, - #module_name::accounts::#account_struct_name { - #(#field_accounts,)* - }, - signers, - ).await - } - }; - - let instruction_raw: syn::ItemFn = parse_quote! { - pub fn #instruction_name( - #(#parameters,)* - #(#accounts,)* - ) -> Instruction { - Instruction{ - program_id: PROGRAM_ID, - data: #module_name::instruction::#instruction_struct_name { - #(#field_parameters,)* - }.data(), - accounts: #module_name::accounts::#account_struct_name { - #(#field_accounts,)* - }.to_account_metas(None), + .fold(Vec::new(), |mut instructions, instruction| { + let instruction_fn_name: syn::Ident = + parse_str(&instruction.name.to_case(Case::Snake)).unwrap(); + let instruction_struct_name: syn::Ident = + parse_str(&instruction.name.to_case(Case::UpperCamel)).unwrap(); + let account_struct_name: syn::Ident = + parse_str(&instruction.name.to_case(Case::UpperCamel)).unwrap(); + let instruction_name: syn::Ident = + parse_str(&(instruction.name.to_case(Case::Snake) + "_ix")).unwrap(); + + let parameters = instruction + .args + .iter() + .map(|arg| { + let name = format_ident!("i_{}", arg.name); + let arg_type = idl_type_to_syn_type(&arg.ty); + let parameter: syn::FnArg = parse_quote!(#name: #arg_type); + parameter + }) + .collect::>(); + + let accounts = instruction + .accounts + .iter() + .map(|account| { + let inner_account = match account { + IdlInstructionAccountItem::Composite(_composite) => { + panic!("Composite Accounts are not supported yet!") } + IdlInstructionAccountItem::Single(single) => single, + }; + + let name = format_ident!("a_{}", inner_account.name); + let ty: syn::Type = parse_str("Pubkey").unwrap(); + let account: syn::FnArg = parse_quote!(#name: #ty); + account + }) + .collect::>(); + + let field_parameters = instruction + .args + .iter() + .map(|arg| { + let name: syn::Ident = parse_str(&arg.name).unwrap(); + let value = format_ident!("i_{name}"); + let parameter: syn::FieldValue = parse_quote!(#name: #value); + parameter + }) + .collect::>(); + + let field_accounts = instruction + .accounts + .iter() + .map(|account| { + let inner_account = match account { + IdlInstructionAccountItem::Composite(_composite) => { + panic!("Composite Accounts are not supported yet!") + } + IdlInstructionAccountItem::Single(single) => single, + }; + + let name: syn::Ident = parse_str(&inner_account.name).unwrap(); + let value = format_ident!("a_{name}"); + let account: syn::FieldValue = parse_quote!(#name: #value); + account + }) + .collect::>(); + + let instruction: syn::ItemFn = parse_quote! { + pub async fn #instruction_fn_name( + client: &Client, + #(#parameters,)* + #(#accounts,)* + signers: impl IntoIterator + Send + 'static, + ) -> Result { + client.send_instruction( + PROGRAM_ID, + #module_name::instruction::#instruction_struct_name { + #(#field_parameters,)* + }, + #module_name::accounts::#account_struct_name { + #(#field_accounts,)* + }, + signers, + ).await + } + }; + + let instruction_raw: syn::ItemFn = parse_quote! { + pub fn #instruction_name( + #(#parameters,)* + #(#accounts,)* + ) -> Instruction { + Instruction{ + program_id: PROGRAM_ID, + data: #module_name::instruction::#instruction_struct_name { + #(#field_parameters,)* + }.data(), + accounts: #module_name::accounts::#account_struct_name { + #(#field_accounts,)* + }.to_account_metas(None), } - }; + } + }; - instructions.push(instruction); - instructions.push(instruction_raw); - instructions - }, - ) + instructions.push(instruction); + instructions.push(instruction_raw); + instructions + }) .into_iter(); let program_module: syn::ItemMod = parse_quote! { pub mod #instruction_module_name { #(#use_modules)* - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array(#pubkey_bytes); + pub const PROGRAM_ID: Pubkey = pubkey!(#program_id); + + // pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array(#pubkey_bytes); #(#instructions)* } }; @@ -149,3 +144,98 @@ pub fn generate_source_code(programs_data: &[ProgramData], use_modules: &[syn::I output.push_str(&code); output } + +/// Converts an `IdlType` to a corresponding Rust `syn::Type`. +fn idl_type_to_syn_type(idl_type: &IdlType) -> syn::Type { + match idl_type { + IdlType::Bool => parse_quote!(bool), + IdlType::U8 => parse_quote!(u8), + IdlType::I8 => parse_quote!(i8), + IdlType::U16 => parse_quote!(u16), + IdlType::I16 => parse_quote!(i16), + IdlType::U32 => parse_quote!(u32), + IdlType::I32 => parse_quote!(i32), + IdlType::F32 => parse_quote!(f32), + IdlType::U64 => parse_quote!(u64), + IdlType::I64 => parse_quote!(i64), + IdlType::F64 => parse_quote!(f64), + IdlType::U128 => parse_quote!(u128), + IdlType::I128 => parse_quote!(i128), + IdlType::U256 => parse_quote!(u256), // Assuming custom type for u256 + IdlType::I256 => parse_quote!(i256), // Assuming custom type for i256 + IdlType::Bytes => parse_quote!(Vec), + IdlType::String => parse_quote!(String), + IdlType::Pubkey => parse_quote!(Pubkey), // Replace with AccountId if needed + IdlType::Option(inner) => { + let inner_type = get_inner_type(inner); + parse_quote!(Option<#inner_type>) + } + IdlType::Vec(inner) => { + let inner_type = get_inner_type(inner); + parse_quote!(Vec<#inner_type>) + } + IdlType::Array(inner, len) => { + let inner_type = get_inner_type(inner); + + let len = match len { + anchor_lang_idl_spec::IdlArrayLen::Generic(_generic) => { + panic!("Generic within Array len not supported") + } + anchor_lang_idl_spec::IdlArrayLen::Value(len) => len, + }; + parse_quote!([#inner_type;#len]) + } + // TODO try to automatically generate the struct so we can simply + // derive arbitrary + IdlType::Defined { name, generics: _ } => { + let name_ident: syn::Ident = format_ident!("{}", &name); + parse_quote!(#name_ident) + } + IdlType::Generic(_name) => { + panic!("Generic currently not supported") + } + _ => todo!(), + } +} + +fn get_inner_type(idl_type: &IdlType) -> syn::Type { + match idl_type { + IdlType::Bool => parse_quote!(bool), + IdlType::U8 => parse_quote!(u8), + IdlType::I8 => parse_quote!(i8), + IdlType::U16 => parse_quote!(u16), + IdlType::I16 => parse_quote!(i16), + IdlType::U32 => parse_quote!(u32), + IdlType::I32 => parse_quote!(i32), + IdlType::F32 => parse_quote!(f32), + IdlType::U64 => parse_quote!(u64), + IdlType::I64 => parse_quote!(i64), + IdlType::F64 => parse_quote!(f64), + IdlType::U128 => parse_quote!(u128), + IdlType::I128 => parse_quote!(i128), + IdlType::U256 => parse_quote!(u256), + IdlType::I256 => parse_quote!(i256), + IdlType::Bytes => parse_quote!(Vec), + IdlType::String => parse_quote!(String), + IdlType::Pubkey => parse_quote!(Pubkey), + IdlType::Option(_inner) => { + panic!("Option within Option is not currently supported!"); + } + IdlType::Vec(_inner) => { + panic!("Vec not supported") + } + IdlType::Array(_inner, _len) => { + panic!("Array not supported") + } + IdlType::Defined { + name: _, + generics: _, + } => { + panic!("Defined not supported") + } + IdlType::Generic(_name) => { + panic!("Generic not supported") + } + _ => todo!(), + } +} diff --git a/crates/client/src/source_code_generators/snapshot_generator.rs b/crates/client/src/source_code_generators/snapshot_generator.rs deleted file mode 100644 index 1531916e..00000000 --- a/crates/client/src/source_code_generators/snapshot_generator.rs +++ /dev/null @@ -1,763 +0,0 @@ -// To generate the snapshot data types, we need to first find all context struct within the program and parse theirs accounts. -// The parsing of individual Anchor accounts is done using Anchor syn parser: -// https://github.com/coral-xyz/anchor/blob/master/lang/syn/src/parser/accounts/mod.rs - -use std::collections::HashMap; -use std::{error::Error, fs::File, io::Read}; - -use anchor_syn::{AccountField, Ty}; -use heck::ToUpperCamelCase; -use proc_macro2::{Ident, Span, TokenStream}; -use quote::{format_ident, quote, ToTokens}; -use syn::parse::{Error as ParseError, Result as ParseResult}; -use syn::spanned::Spanned; -use syn::{parse_quote, Attribute, Fields, GenericArgument, Item, ItemStruct, PathArguments, Type}; - -use anchor_syn::parser::accounts::parse_account_field; - -use regex::Regex; - -use crate::idl::find_item_path; - -use crate::constants::*; -use crate::test_generator::ProgramData; - -const ACCOUNT_STRUCT: &str = r"Account<'info,\s*(.*?)\s*>"; -const ACCOUNT_FN: &str = r"anchor_lang::accounts::account::Account<\s*(.*?)\s*>"; - -const ACCOUNT_LOADER_STRUCT: &str = r"AccountLoader<'info,\s*(.*?)\s*>"; -const ACCOUNT_LOADER_FN: &str = - r"anchor_lang::accounts::account_loader::AccountLoader<\s*(.*?)\s*>"; - -pub fn generate_snapshots_code(programs_data: &[ProgramData]) -> Result { - let code = programs_data.iter().map(|program_data| { - let mut mod_program = None::; - let mut file = File::open(&program_data.path).map_err(|e| e.to_string())?; - let mut content = String::new(); - file.read_to_string(&mut content) - .map_err(|e| e.to_string())?; - - let parse_result = syn::parse_file(&content).map_err(|e| e.to_string())?; - - // locate the program module to extract instructions and corresponding Context structs. - for item in parse_result.items.iter() { - if let Item::Mod(module) = item { - // Check if the module has the #[program] attribute - if has_program_attribute(&module.attrs) { - mod_program = Some(module.clone()) - } - } - } - - let mod_program = mod_program.ok_or("module with program attribute not found")?; - - let (_, items) = mod_program - .content - .ok_or("the content of program module is missing")?; - - let ix_ctx_pairs = get_ix_ctx_pairs(&items)?; - - let (structs, impls, type_aliases) = get_snapshot_structs_and_impls( - &program_data.code, - &ix_ctx_pairs, - &program_data.program_idl.name.snake_case, - )?; - - let use_statements = quote! { - use anchor_lang::prelude::*; - use trident_client::fuzzing::{anchor_lang, FuzzingError}; - } - .into_token_stream(); - Ok(format!( - "{}{}{}{}", - use_statements, structs, impls, type_aliases - )) - }); - - code.into_iter().collect() -} - -/// Creates new snapshot structs with fields wrapped in Option<_> if approriate and the -/// respective implementations with snapshot deserialization methods -fn get_snapshot_structs_and_impls( - code: &str, - ix_ctx_pairs: &[(Ident, GenericArgument)], - program_name: &String, -) -> Result<(String, String, String), String> { - let mut structs = String::new(); - let mut impls = String::new(); - let mut type_aliases = String::new(); - let parse_result = syn::parse_file(code).map_err(|e| e.to_string())?; - let mut unique_ctxs: HashMap = HashMap::new(); - for (ix, ctx) in ix_ctx_pairs { - let mut ctx_ident = None; - let ix_name = ix.to_string().to_upper_camel_case(); - if let GenericArgument::Type(syn::Type::Path(tp)) = ctx { - ctx_ident = tp.path.get_ident().cloned(); - } - let ctx_ident = - ctx_ident.ok_or(format!("malformed parameters of {} instruction", ix_name))?; - - // If ctx is in the HashMap, we do not need to generate deserialization code again, we can only create a type alias - match unique_ctxs.get(ctx) { - Some(base_ix_snapshot_name) => { - let snapshot_alias_name = format_ident!("{}Snapshot", ix_name); - let type_alias = - quote! {pub type #snapshot_alias_name<'info> = #base_ix_snapshot_name<'info>;}; - type_aliases = format!("{}{}", type_aliases, type_alias.into_token_stream()); - } - None => { - // recursively find the context struct and create a new version with wrapped fields into Option - if let Some(ctx_struct_item) = find_ctx_struct(&parse_result.items, &ctx_ident) { - let fields_parsed = if let Fields::Named(f) = ctx_struct_item.fields.clone() { - let field_deser: ParseResult> = - f.named.iter().map(parse_account_field).collect(); - field_deser - } else { - Err(ParseError::new( - ctx_struct_item.fields.span(), - "Context struct parse errror.", - )) - } - .map_err(|e| e.to_string())?; - - let ix_snapshot_name = format_ident!("{}Snapshot", ix_name); - let wrapped_struct = create_snapshot_struct( - &ix_snapshot_name, - ctx_struct_item, - &fields_parsed, - &parse_result, - program_name, - ) - .unwrap(); - let deser_code = deserialize_ctx_struct_anchor( - &ix_snapshot_name, - &fields_parsed, - &parse_result, - program_name, - ) - .map_err(|e| e.to_string())?; - structs = format!("{}{}", structs, wrapped_struct.into_token_stream()); - impls = format!("{}{}", impls, deser_code.into_token_stream()); - unique_ctxs.insert(ctx.clone(), ix_snapshot_name); - } else { - return Err(format!("The Context struct {} was not found", ctx_ident)); - } - } - }; - } - - Ok((structs, impls, type_aliases)) -} - -/// Iterates through items and finds functions with the Context<_> parameter. Returns pairs with the function name and the Context's inner type. -fn get_ix_ctx_pairs(items: &[Item]) -> Result, String> { - let mut ix_ctx_pairs = Vec::new(); - for item in items { - if let syn::Item::Fn(func) = item { - let func_name = &func.sig.ident; - let first_param_type = if let Some(param) = func.sig.inputs.iter().next() { - let mut ty = None::; - if let syn::FnArg::Typed(t) = param { - if let syn::Type::Path(tp) = *t.ty.clone() { - if let Some(seg) = tp.path.segments.iter().next() { - if let PathArguments::AngleBracketed(arg) = &seg.arguments { - ty = arg.args.first().cloned(); - } - } - } - } - ty - } else { - None - }; - - let first_param_type = first_param_type.ok_or(format!( - "The function {} does not have the Context parameter and is malformed.", - func_name - ))?; - - ix_ctx_pairs.push((func_name.clone(), first_param_type)); - } - } - Ok(ix_ctx_pairs) -} - -/// Recursively find a struct with a given `name` -fn find_ctx_struct<'a>(items: &'a Vec, name: &'a syn::Ident) -> Option<&'a ItemStruct> { - for item in items { - if let Item::Struct(struct_item) = item { - if struct_item.ident == *name { - return Some(struct_item); - } - } - } - - // if the ctx struct is not found on the first level, recursively continue to search in submodules - for item in items { - if let Item::Mod(mod_item) = item { - if let Some((_, items)) = &mod_item.content { - let r = find_ctx_struct(items, name); - if r.is_some() { - return r; - } - }; - } - } - - None -} - -fn is_boxed(ty: &anchor_syn::Ty) -> bool { - match ty { - Ty::Account(acc) => acc.boxed, - Ty::InterfaceAccount(acc) => acc.boxed, - _ => false, - } -} - -/// Determines if an Account should be wrapped into the `Option` type. -/// The function returns true if the account has the init or close constraints set -/// or if it is wrapped into the `Option` type. -fn is_optional(parsed_field: &AccountField) -> bool { - let is_optional = match parsed_field { - AccountField::Field(field) => field.is_optional, - AccountField::CompositeField(_) => false, - }; - let constraints = match parsed_field { - AccountField::Field(f) => &f.constraints, - AccountField::CompositeField(f) => &f.constraints, - }; - - constraints.init.is_some() || constraints.is_close() || is_optional || constraints.is_zeroed() -} - -/// Creates new Snapshot struct from the context struct. Removes Box<> types. -fn create_snapshot_struct( - snapshot_name: &Ident, - orig_struct: &ItemStruct, - parsed_fields: &[AccountField], - parsed_file: &syn::File, - program_name: &String, -) -> Result> { - let wrapped_fields = match orig_struct.fields.clone() { - Fields::Named(named) => { - let field_wrappers = - named - .named - .iter() - .zip(parsed_fields) - .map(|(field, parsed_field)| { - let field_name = &field.ident; - let mut field_type = &field.ty; - #[allow(unused_assignments)] - let mut is_account_info = false; - if let AccountField::Field(f) = parsed_field { - if f.is_optional { - // remove option - if let Some(ty) = extract_inner_type(field_type) { - field_type = ty; - } - } - if is_boxed(&f.ty) { - // remove box - if let Some(ty) = extract_inner_type(field_type) { - field_type = ty; - } - } - is_account_info = field_type - .to_token_stream() - .to_string() - .replace(' ', "") - .starts_with("AccountInfo<"); - } - else { - println!("{WARNING} The context `{}` has a field named `{}` of composite type `{}`. \ - The automatic deserialization of composite types is currently not supported. You will have \ - to implement it manually in the generated `accounts_snapshots.rs` file. The field deserialization \ - was replaced by a `todo!()` macro. Also, you might want to adapt the corresponding FuzzInstruction \ - variants in `fuzz_instructions.rs` file.", - orig_struct.ident, field_name.to_token_stream(), field_type.to_token_stream() - ); - } - - match (is_optional(parsed_field), is_account_info) { - (true, true) => { - Ok(quote! {pub #field_name: Option<&'info #field_type>,}) - } - (true, _) => { - let field_type = construct_full_path(&field_type.to_token_stream(), parsed_file, program_name).unwrap_or_else(|| field_type.clone()); - Ok(quote! {pub #field_name: Option<#field_type>,}) - }, - (_, true) => Ok(quote! {pub #field_name: &'info #field_type,}), - _ => { - let field_type = construct_full_path(&field_type.to_token_stream(), parsed_file, program_name).unwrap_or_else(|| field_type.clone()); - Ok(quote! {pub #field_name: #field_type,}) - }, - } - }); - - let field_wrappers: Result, Box> = - field_wrappers.into_iter().collect(); - let field_wrappers = field_wrappers?; - quote! { - { #(#field_wrappers)* } - } - } - - _ => return Err("Only structs with named fields are supported".into()), - }; - - // Generate the new struct with Option-wrapped fields - let generated_struct: syn::ItemStruct = parse_quote! { - pub struct #snapshot_name<'info> #wrapped_fields - }; - - Ok(generated_struct.to_token_stream()) -} - -fn extract_inner_type(field_type: &Type) -> Option<&Type> { - if let syn::Type::Path(type_path) = field_type { - let segment = type_path.path.segments.last()?; - let ident = &segment.ident; - - if ident == "Box" || ident == "Option" { - if let PathArguments::AngleBracketed(args) = &segment.arguments { - if let Some(syn::GenericArgument::Type(inner_type)) = args.args.first() { - return Some(inner_type); - } - } - } - } - - None -} - -/// Generates code to deserialize the snapshot structs. -fn deserialize_ctx_struct_anchor( - snapshot_name: &Ident, - parsed_fields: &[AccountField], - parse_result: &syn::File, - program_name: &String, -) -> Result> { - let names_deser_pairs: Vec<(TokenStream, TokenStream)> = parsed_fields - .iter() - .map(|parsed_f| match parsed_f { - AccountField::Field(f) => { - let field_name = f.ident.clone(); - let is_optional = is_optional(parsed_f); - let deser_tokens = match ty_to_tokens(&f.ty) { - Some((return_type, deser_method)) => deserialize_account_tokens( - &field_name, - is_optional, - return_type, - deser_method, - parse_result, - program_name, - ), - None if matches!(&f.ty, Ty::UncheckedAccount) => { - acc_unchecked_tokens(&field_name, is_optional) - } - None => acc_info_tokens(&field_name, is_optional), - }; - ( - quote! {#field_name}, - quote! { - #deser_tokens - }, - ) - } - AccountField::CompositeField(f) => { - let field_name = f.ident.clone(); - ( - quote! { #field_name }, - quote! { let #field_name = todo!(); }, - ) - } - }) - .collect(); - - let (names, fields_deser): (Vec<_>, Vec<_>) = names_deser_pairs.iter().cloned().unzip(); - - let generated_deser_impl: syn::Item = parse_quote! { - impl<'info> #snapshot_name<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - - #(#fields_deser)* - - Ok(Self { - #(#names),* - }) - } - } - }; - - Ok(generated_deser_impl.to_token_stream()) -} - -/// Get the identifier (name) of the passed sysvar type. -fn sysvar_to_ident(sysvar: &anchor_syn::SysvarTy) -> String { - let str = match sysvar { - anchor_syn::SysvarTy::Clock => "Clock", - anchor_syn::SysvarTy::Rent => "Rent", - anchor_syn::SysvarTy::EpochSchedule => "EpochSchedule", - anchor_syn::SysvarTy::Fees => "Fees", - anchor_syn::SysvarTy::RecentBlockhashes => "RecentBlockhashes", - anchor_syn::SysvarTy::SlotHashes => "SlotHashes", - anchor_syn::SysvarTy::SlotHistory => "SlotHistory", - anchor_syn::SysvarTy::StakeHistory => "StakeHistory", - anchor_syn::SysvarTy::Instructions => "Instructions", - anchor_syn::SysvarTy::Rewards => "Rewards", - }; - str.into() -} - -/// Converts passed account type to token streams. The function returns a pair of streams where the first -/// variable in the pair is the type itself and the second is a fully qualified function to deserialize -/// the given type. -pub fn ty_to_tokens(ty: &anchor_syn::Ty) -> Option<(TokenStream, TokenStream)> { - let (return_type, deser_method) = match ty { - Ty::AccountInfo | Ty::UncheckedAccount => return None, - Ty::SystemAccount => ( - quote! { SystemAccount<'_>}, - quote!(anchor_lang::accounts::system_account::SystemAccount::try_from), - ), - Ty::Sysvar(sysvar) => { - let id = syn::Ident::new(&sysvar_to_ident(sysvar), Span::call_site()); - ( - quote! { Sysvar<#id>}, - quote!(anchor_lang::accounts::sysvar::Sysvar::from_account_info), - ) - } - Ty::Signer => ( - quote! { Signer<'_>}, - quote!(anchor_lang::accounts::signer::Signer::try_from), - ), - Ty::Account(acc) => { - let path = &acc.account_type_path; - ( - quote! { anchor_lang::accounts::account::Account<#path>}, - quote! {anchor_lang::accounts::account::Account::try_from}, - ) - } - Ty::AccountLoader(acc) => { - let path = &acc.account_type_path; - ( - quote! { anchor_lang::accounts::account_loader::AccountLoader<#path>}, - quote! {anchor_lang::accounts::account_loader::AccountLoader::try_from}, - ) - } - Ty::Program(prog) => { - let path = &prog.account_type_path; - ( - quote! { anchor_lang::accounts::program::Program<#path>}, - quote!(anchor_lang::accounts::program::Program::try_from), - ) - } - Ty::Interface(interf) => { - let path = &interf.account_type_path; - ( - quote! { anchor_lang::accounts::interface::Interface<#path>}, - quote! {anchor_lang::accounts::interface::Interface::try_from}, - ) - } - Ty::InterfaceAccount(interf_acc) => { - let path = &interf_acc.account_type_path; - ( - quote! { anchor_lang::accounts::interface_account::InterfaceAccount<#path>}, - quote! {anchor_lang::accounts::interface_account::InterfaceAccount::try_from}, - ) - } - Ty::ProgramData => return None, - }; - Some((return_type, deser_method)) -} - -/// Generates the code necessary to deserialize an account -fn deserialize_account_tokens( - name: &syn::Ident, - is_optional: bool, - return_type: TokenStream, - deser_method: TokenStream, - parse_result: &syn::File, - program_name: &String, -) -> TokenStream { - let return_type = if let Some(with_full_path) = - construct_full_path(&return_type, parse_result, program_name) - { - with_full_path.to_token_stream() - } else { - return_type - }; - if is_optional { - let name_str = name.to_string(); - // TODO make this more idiomatic - quote! { - let #name:Option<#return_type> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts(#name_str.to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - #deser_method(acc).map_err(|_| FuzzingError::CannotDeserializeAccount(#name_str.to_string())) - } else {Err(FuzzingError::OptionalAccountNotProvided( - #name_str.to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - } - } else { - let name_str = name.to_string(); - quote! { - let #name: #return_type = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts(#name_str.to_string()))? - .as_ref() - .map(#deser_method) - .ok_or(FuzzingError::AccountNotFound(#name_str.to_string()))? - // TODO It would be helpful to do something like line below. - // where we propagate anchor error - // However I suggest that this is not possible right now as for - // fuzz_example3 the anchor_lang has version 0.28.0. However trident - // uses 0.29.0 I think this is the reason why the '?' operator cannot propagate - // the error even though I implemnted From trait - // that i - // .map_err(|e| e.with_account_name(#name_str).into())?; - .map_err(|_| FuzzingError::CannotDeserializeAccount(#name_str.to_string()))?; - } - } -} - -/// Generates the code used with raw accounts as AccountInfo -fn acc_info_tokens(name: &syn::Ident, is_optional: bool) -> TokenStream { - let name_str = name.to_string(); - if is_optional { - quote! { - let #name = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts(#name_str.to_string()))? - .as_ref(); - } - } else { - quote! { - let #name = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts(#name_str.to_string()))? - .as_ref() - .ok_or(FuzzingError::AccountNotFound(#name_str.to_string()))?; - } - } -} - -/// Generates the code used with Unchecked accounts -fn acc_unchecked_tokens(name: &syn::Ident, is_optional: bool) -> TokenStream { - let name_str = name.to_string(); - if is_optional { - quote! { - let #name = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts(#name_str.to_string()))? - .as_ref() - .map(anchor_lang::accounts::unchecked_account::UncheckedAccount::try_from); - } - } else { - quote! { - let #name = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts(#name_str.to_string()))? - .as_ref() - .map(anchor_lang::accounts::unchecked_account::UncheckedAccount::try_from) - .ok_or(FuzzingError::AccountNotFound(#name_str.to_string()))?; - } - } -} - -/// Checks if the program attribute is present -fn has_program_attribute(attrs: &Vec) -> bool { - for attr in attrs { - if attr.path.is_ident("program") { - return true; - } - } - false -} - -/// Constructs a full path for a given field type within the parsed syntax tree of a Rust file. -/// -/// This function is designed to work with the `Account` and `AccountLoader` structs from the -/// `anchor_lang` crate, resolving their types to fully qualified paths based on the syntax tree -/// provided. It utilizes regular expressions to match against the struct and function syntax for -/// these specific types. -/// -/// # Arguments -/// -/// * `field_type` - A reference to the token stream representing the type of a field. -/// * `parsed_file` - A reference to the parsed file (`syn::File`) containing the Rust source code. -/// * `program_name` - A reference to a string representing the name of the program. -/// -/// # Returns -/// -/// An `Option` which is: -/// - `Some(Type)` where `Type` is the modified type with its path fully qualified, if the type matches -/// the `Account` or `AccountLoader` struct syntax and a corresponding item is found. -/// - `None` if no matching type is found or the type cannot be parsed. -/// -/// # Example -/// -/// Suppose you have a field type `Account<'info, UserData>`, and `UserData` is defined within -/// the file being analyzed. This function will replace `UserData` with its fully qualified path -/// based on the analysis of `parsed_file`, helping with tasks like code generation or analysis -/// where fully qualified paths are required. -fn construct_full_path( - field_type: &TokenStream, - parsed_file: &syn::File, - program_name: &String, -) -> Option { - // Combine regex patterns to match both struct and function syntax for Account and AccountLoader - // this can be obviously extended if needed for further types. - let regex_patterns = [ - (ACCOUNT_STRUCT, ACCOUNT_FN), - (ACCOUNT_LOADER_STRUCT, ACCOUNT_LOADER_FN), - ]; - - // remove spaces in the field_type expression. - let type_as_string = field_type.to_token_stream().to_string().replace(' ', ""); - - regex_patterns - .iter() - .find_map(|(struct_pattern, fn_pattern)| { - // construct regular expressions - let struct_re = Regex::new(struct_pattern).unwrap(); - let fn_re = Regex::new(fn_pattern).unwrap(); - - // check if either of expression matches - struct_re - .captures(&type_as_string) - .or_else(|| fn_re.captures(&type_as_string)) - .and_then(|caps| { - let data_account = caps[1].to_string(); - // there may be inner data account specified as crate::abcd::XYZ - // so due to this we extract the last part, or use whole as default. - let data_account = data_account.split("::").last().unwrap_or(&data_account); - // try to obtain full path - find_item_path(data_account, parsed_file).map(|full_path| { - let full_final_path = format!("{program_name}{full_path}"); - let type_with_full_path = - type_as_string.replace(data_account, &full_final_path); - syn::parse_str::(&type_with_full_path).ok() - }) - }) - }) - .flatten() -} - -#[cfg(test)] -mod tests { - use regex::Regex; - fn extract_type(pattern: &str, text: &str) -> String { - let re = Regex::new(pattern).unwrap(); - match re.captures(text) { - Some(caps) => caps[1].to_string(), - None => String::default(), - } - } - #[test] - fn test_regexp_match1() { - let pattern = super::ACCOUNT_STRUCT; - assert_eq!(extract_type(pattern, "Account<'info, Escrow>,"), "Escrow"); - assert_eq!( - extract_type(pattern, "Option>,"), - "Escrow" - ); - assert_eq!( - extract_type(pattern, "account::Account<'info, abcd::efgh::xyz::Escrow>,"), - "abcd::efgh::xyz::Escrow" - ); - assert_eq!( - extract_type( - pattern, - "Account<'info, abcd::efgh::xyz::Escrow > ," - ), - "abcd::efgh::xyz::Escrow" - ); - } - #[test] - fn test_regexp_match2() { - let pattern = super::ACCOUNT_LOADER_STRUCT; - assert_eq!( - extract_type(pattern, "AccountLoader<'info, Escrow>,"), - "Escrow" - ); - assert_eq!( - extract_type(pattern, "account::AccountLoader<'info, Escrow>,"), - "Escrow" - ); - assert_eq!( - extract_type( - pattern, - "AccountLoader<'info, fuzz_example3::state::Escrow>," - ), - "fuzz_example3::state::Escrow" - ); - assert_eq!( - extract_type( - pattern, - "AccountLoader<'info, abcd::efgh::xyz::Escrow > ," - ), - "abcd::efgh::xyz::Escrow" - ); - } - #[test] - fn test_regexp_match3() { - let pattern = super::ACCOUNT_FN; - assert_eq!( - extract_type(pattern, "anchor_lang::accounts::account::Account,"), - "Escrow" - ); - assert_eq!( - extract_type( - pattern, - "anchor_lang::accounts::account::Account," - ), - "fuzz_example3::state::Escrow" - ); - assert_eq!( - extract_type( - pattern, - "some random text before:anchor_lang::accounts::account::Account< fuzz_example3::state::Escrow >,some random text after:" - ), - "fuzz_example3::state::Escrow" - ); - } - #[test] - fn test_regexp_match4() { - let pattern = super::ACCOUNT_LOADER_FN; - assert_eq!( - extract_type( - pattern, - "anchor_lang::accounts::account_loader::AccountLoader," - ), - "Escrow" - ); - assert_eq!( - extract_type( - pattern, - "anchor_lang::accounts::account_loader::AccountLoader," - ), - "fuzz_example3::state::Escrow" - ); - assert_eq!( - extract_type( - pattern, - "some random text before:anchor_lang::accounts::account_loader::AccountLoader< fuzz_example3::state::Escrow >,some random text after:" - ), - "fuzz_example3::state::Escrow" - ); - } -} diff --git a/crates/client/src/source_code_generators/test_fuzz_generator.rs b/crates/client/src/source_code_generators/test_fuzz_generator.rs new file mode 100644 index 00000000..a33c2675 --- /dev/null +++ b/crates/client/src/source_code_generators/test_fuzz_generator.rs @@ -0,0 +1,172 @@ +use anchor_lang_idl_spec::Idl; +use convert_case::{Case, Casing}; +use quote::{format_ident, ToTokens}; +use syn::parse_quote; + +pub fn generate_source_code(idl_instructions: &[Idl]) -> String { + let program_imports = get_program_imports(idl_instructions); + let program_names = get_program_names(idl_instructions); + let fuzz_instructions = get_fuzz_instructions(idl_instructions); + let (fuzzing_programs, programs_array) = get_fuzzing_programs(idl_instructions); + + let main_fuzz_instruction: syn::ItemType = match fuzz_instructions.len() { + 1 => { + let program_name = idl_instructions[0].metadata.name.to_case(Case::Snake); + let alias = format_ident!("fuzz_instruction_{}", program_name); + + parse_quote!( + pub type FuzzInstruction = #alias; + ) + } + _ => parse_quote!( + pub type FuzzInstruction = todo!(); + ), + }; + + let run_with_runtime: syn::Stmt = match fuzz_instructions.len() { + 1 => { + let program_name_upper = idl_instructions[0].metadata.name.to_case(Case::UpperSnake); + let program_id_name_ident = format_ident!("PROGRAM_ID_{}", program_name_upper); + + parse_quote!( + let _ = fuzz_data.run_with_runtime(#program_id_name_ident, &mut client); + ) + } + _ => parse_quote!( + let _ = fuzz_data.run_with_runtime(todo!(), &mut client); + ), + }; + + let test_fuzz_definition: syn::File = parse_quote! { + use trident_client::fuzzing::*; + mod fuzz_instructions; + + #(#program_imports)* + + #(#program_names)* + + #(#fuzz_instructions)* + + #main_fuzz_instruction + + struct MyFuzzData; + + impl FuzzDataBuilder for MyFuzzData {} + + fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + + + #(#fuzzing_programs)* + + let mut client = ProgramTestClientBlocking::new(&#programs_array).unwrap(); + + #run_with_runtime + + + } + + fn main() { + loop { + fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { + + + fuzz_iteration(fuzz_data); + + + }); + } + } + }; + + test_fuzz_definition.into_token_stream().to_string() +} + +fn get_fuzz_instructions(idl_instructions: &[Idl]) -> Vec { + idl_instructions.iter().map(|idl| { + let program_name = idl.metadata.name.to_case(Case::Snake); + let fuzz_instructions_program_ident = format_ident!("{}_fuzz_instructions", program_name); + let alias = format_ident!("fuzz_instruction_{}", program_name); + + parse_quote!(use fuzz_instructions::#fuzz_instructions_program_ident::FuzzInstruction as #alias;) + }).collect() +} + +fn get_program_names(idl_instructions: &[Idl]) -> Vec { + idl_instructions + .iter() + .map(|idl| { + let program_name = &idl.metadata.name; + let program_name_upper = idl.metadata.name.to_case(Case::UpperSnake); + let program_name_ident = format_ident!("PROGRAM_NAME_{}", program_name_upper); + + parse_quote!(const #program_name_ident: &str = #program_name;) + }) + .collect() +} + +fn get_program_imports(idl_instructions: &[Idl]) -> Vec { + idl_instructions + .iter() + .flat_map(|idl| { + let program_name = idl.metadata.name.to_case(Case::Snake); + let program_name_upper = idl.metadata.name.to_case(Case::UpperSnake); + let program_name_ident = format_ident!("{}", program_name); + let program_entry_ident = format_ident!("entry_{}", program_name); + let program_id_name_ident = format_ident!("PROGRAM_ID_{}", program_name_upper); + + vec![ + parse_quote!(use #program_name_ident::entry as #program_entry_ident;), + parse_quote!(use #program_name_ident::ID as #program_id_name_ident;), + ] + }) + .collect() +} + +fn get_fuzzing_programs(idl_instructions: &[Idl]) -> (Vec, syn::ExprArray) { + // Vector to collect the `fuzzing_program_name_ident` identifiers + let mut fuzzing_program_idents = Vec::new(); + + // Collect the statements and the identifiers for the `ExprArray` + let fuzzing_programs: Vec = idl_instructions + .iter() + .map(|idl| { + let program_name = idl.metadata.name.to_case(Case::Snake); + let program_name_upper = idl.metadata.name.to_case(Case::UpperSnake); + let fuzzing_program_name_ident = format_ident!("fuzzing_program_{}", program_name); + let program_id_name_ident = format_ident!("PROGRAM_ID_{}", program_name_upper); + let program_name_ident = format_ident!("PROGRAM_NAME_{}", program_name_upper); + let program_entry_ident = format_ident!("entry_{}", program_name); + + // Add the identifier to the vector + fuzzing_program_idents.push(fuzzing_program_name_ident.clone()); + + // Generate the statement + parse_quote! { + let #fuzzing_program_name_ident = FuzzingProgram::new( + #program_name_ident, + &#program_id_name_ident, + processor!(convert_entry!(#program_entry_ident)) + ); + } + }) + .collect(); + + // Create the ExprArray from the collected identifiers + let expr_array: syn::ExprArray = syn::ExprArray { + attrs: vec![], + bracket_token: syn::token::Bracket::default(), + elems: fuzzing_program_idents + .into_iter() + .map(|ident| { + syn::Expr::Path(syn::ExprPath { + attrs: vec![], + qself: None, + path: ident.into(), + }) + }) + .collect(), + }; + + // Return the vector of statements and the ExprArray + (fuzzing_programs, expr_array) +} diff --git a/crates/client/src/templates/trident-tests/accounts_snapshots.rs b/crates/client/src/templates/trident-tests/accounts_snapshots.rs deleted file mode 100644 index ed5d9aa6..00000000 --- a/crates/client/src/templates/trident-tests/accounts_snapshots.rs +++ /dev/null @@ -1,2 +0,0 @@ -// DO NOT EDIT - automatically generated file -// [content not yet generated] diff --git a/crates/client/src/templates/trident-tests/fuzz_instructions.rs b/crates/client/src/templates/trident-tests/fuzz_instructions.rs deleted file mode 100644 index ed5d9aa6..00000000 --- a/crates/client/src/templates/trident-tests/fuzz_instructions.rs +++ /dev/null @@ -1,2 +0,0 @@ -// DO NOT EDIT - automatically generated file -// [content not yet generated] diff --git a/crates/client/src/templates/trident-tests/test_fuzz.rs b/crates/client/src/templates/trident-tests/test_fuzz.rs deleted file mode 100644 index 238de666..00000000 --- a/crates/client/src/templates/trident-tests/test_fuzz.rs +++ /dev/null @@ -1,28 +0,0 @@ -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; - -pub type FuzzInstruction = todo!(); - -struct MyFuzzData; - -impl FuzzDataBuilder for MyFuzzData {} - -fn main() { - loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new(todo!(),todo!(),processor!(convert_entry!(todo!()))); - - let mut client = - ProgramTestClientBlocking::new(&[todo!()]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(todo!(), &mut client); - }); - } -} diff --git a/crates/client/src/test_generator.rs b/crates/client/src/test_generator.rs index 48d61307..7ab5f9d1 100644 --- a/crates/client/src/test_generator.rs +++ b/crates/client/src/test_generator.rs @@ -1,13 +1,11 @@ -use crate::{ - commander::{Commander, Error as CommanderError}, - idl::IdlProgram, -}; +use crate::___private::test_fuzz_generator; +use crate::commander::{Commander, Error as CommanderError}; -use crate::source_code_generators::fuzzer_generator; +use crate::source_code_generators::fuzz_instructions_generator; use crate::source_code_generators::program_client_generator; -use crate::source_code_generators::snapshot_generator; -use cargo_metadata::{camino::Utf8PathBuf, Package}; +use cargo_metadata::Package; +use convert_case::{Case, Casing}; use fehler::{throw, throws}; use std::{fs::File, io::prelude::*}; use std::{ @@ -22,6 +20,8 @@ use toml::{value::Table, Value}; use crate::constants::*; +use anchor_lang_idl_spec::Idl; + #[derive(Error, Debug)] pub enum Error { #[error("cannot parse Cargo.toml")] @@ -42,39 +42,6 @@ pub enum Error { ParsingCargoTomlDependenciesFailed, } -/// Constructs a `PathBuf` from a given root and a series of path components. -/// -/// This macro simplifies the creation of a `PathBuf` from multiple strings or string slices, -/// starting with a root path and appending each subsequent component in order. It's useful for -/// dynamically constructing file or directory paths in a more readable manner. -/// -/// # Syntax -/// `construct_path!(root, component1, component2, ..., componentN)` -/// -/// - `root`: The base path from which to start. Can be a `PathBuf` or any type that implements -/// `Into`, such as a string or string slice. -/// - `component1` to `componentN`: These are the components to be joined to the root path. Each -/// can be any type that implements `Into`, allowing for flexible path construction. -/// -/// # Returns -/// - Returns a `PathBuf` representing the combined path. -/// -/// # Examples -/// Basic usage: -/// -/// ``` -/// # #[macro_use] extern crate trident_client; -/// # fn main() { -/// use std::path::PathBuf; -/// -/// // Constructs a PathBuf from a series of string slices -/// let path = construct_path!(PathBuf::from("/tmp"), "my_project", "src", "main.rs"); -/// assert_eq!(path, PathBuf::from("/tmp/my_project/src/main.rs")); -/// # } -/// ``` -/// -/// Note: Replace `your_crate_name` with the name of your crate where this macro is defined. - #[macro_export] macro_rules! construct_path { ($root:expr, $($component:expr),*) => { @@ -86,190 +53,124 @@ macro_rules! construct_path { }; } -/// Includes a file as a string at compile time. macro_rules! load_template { ($file:expr) => { include_str!(concat!(env!("CARGO_MANIFEST_DIR"), $file)) }; } -#[derive(Clone)] -pub struct ProgramData { - pub code: String, - pub path: Utf8PathBuf, - pub program_idl: IdlProgram, -} - -/// Represents a generator for creating tests. -/// -/// This struct is designed to hold all necessary information for generating -/// test cases for a project. It includes paths to project components, -/// interface definitions, and additional configuration for code generation. -/// -/// # Fields -/// - `root`: A `PathBuf` indicating the root directory of the project for which tests are being generated. -/// This path is used as a base for any relative paths within the project. -/// - `programs_data`: A vector of tuples, each containing a `String`, `Utf8PathBuf` and IDL Program data. -/// Each tuple represents a pair of code and the package path associated with it. -/// - `packages`: A vector of `Package` structs, representing the different packages -/// that make up the project. -/// - `use_tokens`: A vector of `ItemUse` tokens from the Rust syntax, representing `use` statements that -/// should be included in the generated code for .program_client. pub struct TestGenerator { pub root: PathBuf, - pub programs_data: Vec, - pub packages: Vec, + pub program_packages: Vec, pub use_tokens: Vec, - pub with_snapshot_file: bool, + pub anchor_idls: Vec, } impl Default for TestGenerator { fn default() -> Self { - Self::new(false) + Self::new() } } impl TestGenerator { - /// Creates a new instance of `TestGenerator` with default values. - /// - /// # Returns - /// - /// A new `TestGenerator` instance. - pub fn new(with_snapshot_file: bool) -> Self { + pub fn new() -> Self { Self { root: Path::new("../../").to_path_buf(), - programs_data: Vec::default(), - packages: Vec::default(), + program_packages: Vec::default(), use_tokens: Vec::default(), - with_snapshot_file, + anchor_idls: Vec::default(), } } - /// Creates a new instance of `TestGenerator` with a specified root directory. - /// - /// # Arguments - /// - /// * `root` - A string slice that holds the path to the root directory. - /// - /// # Returns - /// - /// A new `TestGenerator` instance with the specified root directory. - pub fn new_with_root(root: String, with_snapshot_file: bool) -> Self { + pub fn new_with_root(root: String) -> Self { Self { root: Path::new(&root).to_path_buf(), - programs_data: Vec::default(), - packages: Vec::default(), + program_packages: Vec::default(), use_tokens: Vec::default(), - with_snapshot_file, + anchor_idls: Vec::default(), } } - /// Generates both proof of concept (POC) and fuzz tests along with the necessary setup. #[throws] pub async fn generate_both(&mut self) { let root_path = self.root.to_str().unwrap().to_string(); let commander = Commander::with_root(root_path); - // build first + commander.build_anchor_project().await?; - // expands programs within programs folder - self.expand_programs().await?; - // obtain use statements - // if program_client is not yet initialized - // use statements are set to default + + self.get_program_packages().await?; + self.load_idls()?; self.get_program_client_imports().await?; - // initialize program client if it is not yet initialized self.init_program_client().await?; - // initialize poc tests if thay are not yet initialized self.init_poc_tests().await?; - // initialize fuzz tests if thay are not yet initialized self.init_fuzz_tests().await?; - // add trident.toml self.create_trident_manifest().await?; - // update gitignore self.update_gitignore(CARGO_TARGET_DIR_DEFAULT)?; } - /// Generates fuzz tests along with the necessary setup. #[throws] pub async fn generate_fuzz(&mut self) { let root_path = self.root.to_str().unwrap().to_string(); let commander = Commander::with_root(root_path); - // build first + commander.build_anchor_project().await?; - // expand programs - self.expand_programs().await?; - // initialize fuzz tests if thay are not yet initialized + + self.get_program_packages().await?; + self.load_idls()?; self.init_fuzz_tests().await?; - // add trident.toml self.create_trident_manifest().await?; - // update gitignore self.update_gitignore(CARGO_TARGET_DIR_DEFAULT)?; } - /// Generates proof of concept (POC) tests along with the necessary setup. #[throws] pub async fn generate_poc(&mut self) { let root_path = self.root.to_str().unwrap().to_string(); let commander = Commander::with_root(root_path); - // build first + commander.build_anchor_project().await?; - // expand programs - self.expand_programs().await?; - // obtain use statements - // if program_client is not yet initialized - // use statements are set to default + + self.get_program_packages().await?; + self.load_idls()?; self.get_program_client_imports().await?; - // initialize program client if it is not yet initialized self.init_program_client().await?; - // initialize poc tests if thay are not yet initialized self.init_poc_tests().await?; - // add trident.toml self.create_trident_manifest().await?; } - /// Adds new fuzz test. This means create new directory within the - /// trident-tests/fuzz_tests directory, generate necessary files - /// for fuzzing (instructions and snapshots) and modify - /// trident-tests/fuzz_tests/Cargo.toml with the new generated - /// fuzz test binary. #[throws] pub async fn add_fuzz_test(&mut self) { let root_path = self.root.to_str().unwrap().to_string(); let commander = Commander::with_root(root_path); - // build first + commander.build_anchor_project().await?; - // expand programs - self.expand_programs().await?; - // initialize fuzz tests if thay are not yet initialized + + self.get_program_packages().await?; + self.load_idls()?; self.add_new_fuzz_test().await?; - // add trident.toml self.create_trident_manifest().await?; - // update gitignore self.update_gitignore(CARGO_TARGET_DIR_DEFAULT)?; } - /// Performs anchor build command and modify .program_client - /// folder based on the updated program contents. If the .program_client - /// is not yet generated, this will also generate the crate. #[throws] pub async fn build(&mut self) { let root_path = self.root.to_str().unwrap().to_string(); let commander = Commander::with_root(root_path); - // build first + commander.build_anchor_project().await?; - // expand programs - self.expand_programs().await?; - // obtain use statements - // if program_client is not yet initialized - // use statements are set to default + self.get_program_packages().await?; + self.load_idls()?; self.get_program_client_imports().await?; - // add/update program_client self.add_program_client().await?; } - /// Collect program packages within the programs folder. - /// Call rustc +nightly command in order to expand program macros, then parse - /// the expanded code and obtain necessary data for generating test files + #[throws] - async fn expand_programs(&mut self) { - self.packages = Commander::collect_program_packages().await?; - self.programs_data = Commander::expand_program_packages(&self.packages).await?; + fn load_idls(&mut self) { + let target_path: PathBuf = [self.root.as_ref(), Path::new("target/idl/")] + .iter() + .collect(); + self.anchor_idls = + crate::anchor_idl::load_idls(target_path, &self.program_packages).unwrap(); + } + + #[throws] + async fn get_program_packages(&mut self) { + self.program_packages = Commander::collect_program_packages().await?; } - /// Get user specified use statements from .program_client lib. #[throws] async fn get_program_client_imports(&mut self) { let lib_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, SRC_DIRECTORY, LIB); @@ -290,8 +191,6 @@ impl TestGenerator { } } - /// Checks if the whole folder structure for .program_client is already - /// present, if not create/update .program_client crate with the necessary files. #[throws] async fn init_program_client(&mut self) { let cargo_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, CARGO_TOML); @@ -306,9 +205,6 @@ impl TestGenerator { } } - // Checks if whole Fuzz Test folder structer is already initialized, - // and if fuzz_tests directory contains anything except Cargo.toml and fuzzing folder - // if so the function does not proceed with Fuzz inicialization #[throws] async fn init_fuzz_tests(&mut self) { // create reuqired paths @@ -341,8 +237,6 @@ impl TestGenerator { } } - // Checks if whole PoC Test folder structer is already initialized, if so - // the function does not proceed with PoC inicialization #[throws] async fn init_poc_tests(&mut self) { // create reuqired paths @@ -365,23 +259,11 @@ impl TestGenerator { } } - /// Adds new PoC Test (This will Generate only one PoC Test file). - /// If not present create trident-tests directory. - /// If not present create poc_tests directory. - /// If not present create tests directory. - /// If not present generate PoC test file. - /// If not present add program dependencies into the Cargo.toml file inside poc_tests folder - /// If not present add poc_tests into the workspace virtual manifest as member #[throws] async fn add_new_poc_test(&self) { - let program_name = if !&self.programs_data.is_empty() { - &self - .programs_data - .first() - .unwrap() - .program_idl - .name - .snake_case + let program_name = if !&self.anchor_idls.is_empty() { + let name = &self.anchor_idls.first().unwrap().metadata.name; + name.to_case(Case::Snake) } else { throw!(Error::NoProgramsFound) }; @@ -391,13 +273,12 @@ impl TestGenerator { let cargo_path = construct_path!(poc_dir_path, CARGO_TOML); let poc_test_path = construct_path!(new_poc_test_dir, POC_TEST); - // self.create_directory(&poc_dir_path).await?; self.create_directory_all(&new_poc_test_dir).await?; let cargo_toml_content = load_template!("/src/templates/trident-tests/Cargo_poc.toml.tmpl"); self.create_file(&cargo_path, cargo_toml_content).await?; let poc_test_content = load_template!("/src/templates/trident-tests/test.rs"); - let test_content = poc_test_content.replace("###PROGRAM_NAME###", program_name); + let test_content = poc_test_content.replace("###PROGRAM_NAME###", &program_name); let use_instructions = format!("use program_client::{}_instruction::*;\n", program_name); let template = format!("{use_instructions}{test_content}"); @@ -413,14 +294,6 @@ impl TestGenerator { .await?; } - /// Adds new Fuzz Test. - /// If not present create trident-tests directory. - /// If not present create fuzz_tests directory. - /// Obtain name for the new fuzz test and generate new fuzz test - /// directory inside fuzz_tests folder. - /// Generate fuzz test files and update Cargo.toml with the new Fuzz Test binary path. - /// If not present add program dependencies into the Cargo.toml file inside fuzz_tests folder - /// If not present add fuzz_tests into the workspace virtual manifest as member #[throws] pub async fn add_new_fuzz_test(&self) { let fuzz_dir_path = @@ -465,18 +338,11 @@ impl TestGenerator { self.create_directory(&new_fuzz_test_dir).await?; - // create fuzz file self.initialize_fuzz(&new_fuzz_test_dir).await?; - // create fuzz instructions file self.initialize_fuzz_instructions(&new_fuzz_test_dir) .await?; - // create accounts_snapshots file - if self.with_snapshot_file { - self.initialize_fuzz_snapshots(&new_fuzz_test_dir).await?; - } - let cargo_toml_content = load_template!("/src/templates/trident-tests/Cargo_fuzz.toml.tmpl"); @@ -485,8 +351,12 @@ impl TestGenerator { self.add_bin_target(&fuzz_tests_manifest_path, &new_fuzz_test, &new_bin_target) .await?; - self.add_program_dependencies(&fuzz_dir_path, "dependencies", None) - .await?; + self.add_program_dependencies( + &fuzz_dir_path, + "dependencies", + Some(vec!["trident-fuzzing"]), + ) + .await?; self.add_workspace_member(&format!( "{TESTS_WORKSPACE_DIRECTORY}/{FUZZ_TEST_DIRECTORY}", @@ -496,83 +366,26 @@ impl TestGenerator { #[throws] pub async fn initialize_fuzz(&self, new_fuzz_test_dir: &Path) { - if self.programs_data.is_empty() { - throw!(Error::NoProgramsFound) - } - let fuzz_test_path = new_fuzz_test_dir.join(FUZZ_TEST); - let fuzz_test_content = load_template!("/src/templates/trident-tests/test_fuzz.rs"); - - let mut entry_points: String = String::new(); - let mut program_ids: String = String::new(); - let mut program_names: String = String::new(); - let mut fuzz_instructions: String = String::new(); - - for x in self.programs_data.iter() { - let program_name = &x.program_idl.name.snake_case; - - let use_entry = format!("use {}::entry as entry_{};\n", program_name, program_name); - entry_points.push_str(&use_entry); - - let program_name_var = format!( - "const PROGRAM_NAME_{}: &str = \"{}\";\n", - program_name.to_uppercase(), - program_name, - ); - program_names.push_str(&program_name_var); - - let program_id = format!( - "use {}::ID as PROGRAM_ID_{};\n", - program_name, - program_name.to_uppercase() - ); - program_ids.push_str(&program_id); - - let use_fuzz_instructions = format!( - "use fuzz_instructions::{}_fuzz_instructions::FuzzInstruction as FuzzInstruction_{};\n", - program_name,program_name - ); - fuzz_instructions.push_str(&use_fuzz_instructions); - } + let program_fuzzer = test_fuzz_generator::generate_source_code(&self.anchor_idls); - let template = format!( - "{}{}{}{}{}", - entry_points, program_ids, program_names, fuzz_instructions, fuzz_test_content - ); + let program_fuzzer = Commander::format_program_code_nightly(&program_fuzzer).await?; - self.create_file(&fuzz_test_path, &template).await?; + self.create_file(&fuzz_test_path, &program_fuzzer).await?; } #[throws] pub async fn initialize_fuzz_instructions(&self, new_fuzz_test_dir: &Path) { let fuzz_instructions_path = new_fuzz_test_dir.join(FUZZ_INSTRUCTIONS_FILE_NAME); - let program_fuzzer = fuzzer_generator::generate_source_code(&self.programs_data); + let program_fuzzer = fuzz_instructions_generator::generate_source_code(&self.anchor_idls); + let program_fuzzer = Commander::format_program_code(&program_fuzzer).await?; self.create_file(&fuzz_instructions_path, &program_fuzzer) .await?; } - #[throws] - pub async fn initialize_fuzz_snapshots(&self, new_fuzz_test_dir: &Path) { - let accounts_snapshots_path = new_fuzz_test_dir.join(ACCOUNTS_SNAPSHOTS_FILE_NAME); - let fuzzer_snapshots = snapshot_generator::generate_snapshots_code(&self.programs_data) - .map_err(Error::ReadProgramCodeFailed)?; - let fuzzer_snapshots = Commander::format_program_code(&fuzzer_snapshots).await?; - - self.create_file(&accounts_snapshots_path, &fuzzer_snapshots) - .await?; - } - - /// Add/Update .program_client - /// If not present create .program_client directory. - /// If not present create src directory. - /// If not present create Cargo.toml file - /// If not present add program dependencies into the Cargo.toml file inside .program_client folder - /// Generate .program_client code. - /// If not present add .program_client code - /// If present update .program_client code #[throws] async fn add_program_client(&self) { let cargo_path = construct_path!(self.root, PROGRAM_CLIENT_DIRECTORY, CARGO_TOML); @@ -592,7 +405,7 @@ impl TestGenerator { .await?; let program_client = - program_client_generator::generate_source_code(&self.programs_data, &self.use_tokens); + program_client_generator::generate_source_code(&self.anchor_idls, &self.use_tokens); let program_client = Commander::format_program_code(&program_client).await?; if lib_path.exists() { @@ -602,7 +415,6 @@ impl TestGenerator { } } - /// If not present create Trident manifest with the templte. #[throws] async fn create_trident_manifest(&self) { let trident_toml_path = construct_path!(self.root, TRIDENT_TOML); @@ -610,26 +422,6 @@ impl TestGenerator { self.create_file(&trident_toml_path, trident_toml_content) .await?; } - /// Adds a new member to the Cargo workspace manifest (`Cargo.toml`). - /// - /// This function updates the `Cargo.toml` file located at the root of the Cargo workspace - /// by adding a new member to the `members` array within the `[workspace]` table. If the specified member - /// already exists in the `members` array, the function will skip the addition and print a message indicating - /// that the member is already present. Otherwise, it will add the new member and print a success message. - /// - /// # Parameters - /// - `&self`: A reference to the current instance of the TestGenerator struct that holds the workspace root path. - /// - `member`: A string slice (`&str`) representing the path to the new member to be added. This path should be - /// relative to the workspace root. - /// - /// # Errors - /// Returns an error if: - /// - The `Cargo.toml` file cannot be found, read, or is not properly formatted. - /// - The `Cargo.toml` file does not contain a `[workspace]` table or a `members` array within that table, - /// and it cannot be created. - /// - /// The function uses `Error::CannotParseCargoToml` to indicate failures related to parsing or updating the - /// `Cargo.toml` file. #[throws] async fn add_workspace_member(&self, member: &str) { let cargo = construct_path!(self.root, CARGO_TOML); @@ -660,8 +452,6 @@ impl TestGenerator { }; } - /// If not present creates a new directory and all missing - /// parent directories on the specified path #[throws] async fn create_directory_all(&self, path: &PathBuf) { match path.exists() { @@ -671,7 +461,6 @@ impl TestGenerator { } }; } - /// If not present creates directory with specified path #[throws] async fn create_directory(&self, path: &PathBuf) { match path.exists() { @@ -681,8 +470,6 @@ impl TestGenerator { } }; } - /// If not present creates a new file with a given content on the specified path - /// If file is present, skip #[throws] async fn create_file(&self, path: &PathBuf, content: &str) { let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); @@ -697,8 +484,6 @@ impl TestGenerator { } }; } - /// If present update a new file with a given content on the specified path - /// If file is not present, skip #[throws] async fn update_file(&self, path: &PathBuf, content: &str) { let file = path.strip_prefix(&self.root).unwrap().to_str().unwrap(); @@ -714,22 +499,6 @@ impl TestGenerator { }; } - /// Updates the `.gitignore` file by appending a specified path to ignore. - /// - /// This function checks if the given `ignored_path` is already listed in the `.gitignore` file at the root - /// of the repository. If the path is not found, it appends the `ignored_path` to the file, ensuring that it - /// is ignored by Git. If the `.gitignore` file does not exist or the path is already included, the function - /// will skip the addition and print a message. - /// - /// # Parameters - /// - `&self`: A reference to the current instance of the TestGenerator that holds the repository root path. - /// - `ignored_path`: A string slice (`&str`) representing the path to be ignored by Git. This path should be - /// relative to the repository root. - /// - /// # Errors - /// Returns an error if: - /// - The `.gitignore` file exists but cannot be opened or read. - /// - There is an error writing the new `ignored_path` to the `.gitignore` file. #[throws] fn update_gitignore(&self, ignored_path: &str) { let gitignore_path = construct_path!(self.root, GIT_IGNORE); @@ -763,25 +532,6 @@ impl TestGenerator { println!("{SKIP} [{GIT_IGNORE}], not found") } } - /// Adds a new binary target to a Cargo.toml file. - /// - /// This function reads the existing `Cargo.toml` file from the specified path, adds a new binary target - /// configuration to it, and writes the updated content back to the file. It handles the creation of a new - /// `[[bin]]` section if one does not already exist or appends the new binary target to the existing `[[bin]]` - /// array. The new binary target is specified by its name and the path to its source file. - /// - /// # Parameters - /// - `&self`: A reference to the current instance of the TestGenerator, not used directly in this function but - /// necessary for method calls on the instance. - /// - `cargo_path`: A reference to a `PathBuf` that specifies the path to the `Cargo.toml` file to be updated. - /// - `name`: A string slice (`&str`) representing the name of the binary target to be added. - /// - `path`: A string slice (`&str`) representing the path to the source file of the binary target, relative - /// to the Cargo package's root. - /// - /// # Errors - /// This function returns an error if: - /// - The `Cargo.toml` file cannot be read or written to. - /// - The content of `Cargo.toml` cannot be parsed into a `toml::Value` or manipulated as expected. #[throws] async fn add_bin_target(&self, cargo_path: &PathBuf, name: &str, path: &str) { // Read the existing Cargo.toml file @@ -810,28 +560,6 @@ impl TestGenerator { // Write the updated Cargo.toml file fs::write(cargo_path, cargo_toml.to_string()).await?; } - /// Adds program dependencies to a specified Cargo.toml file. - /// - /// This function updates the Cargo.toml file located in the given directory by adding new dependencies - /// specified by the `deps` parameter. It supports adding dependencies with or without features. The - /// dependencies are added based on the packages found in the `self.packages` collection of the TestGenerator, - /// where each package's path is adjusted to be relative to the specified `cargo_dir`. If no packages are - /// found in `self.packages`, the function will return an error. - /// - /// # Parameters - /// - `&self`: A reference to the current instance of the TestGenerator, which contains a collection of packages - /// to be added as dependencies. - /// - `cargo_dir`: A reference to a `PathBuf` indicating the directory where the `Cargo.toml` file to be updated is located. - /// - `deps`: A string slice (`&str`) specifying the section under which the dependencies should be added - /// (e.g., `dependencies`, `dev-dependencies`, etc.). - /// - `features`: An optional vector of string slices (`Vec<&str>`) specifying the features that should be - /// enabled for the dependencies being added. If `None`, no features are specified. - /// - /// # Errors - /// This function can return errors in several cases, including: - /// - If the specified `Cargo.toml` file cannot be read or written to. - /// - If parsing of the `Cargo.toml` file or the dependencies fails. - /// - If no packages are found in `self.packages`. #[throws] async fn add_program_dependencies( &self, @@ -848,10 +576,10 @@ impl TestGenerator { .and_then(toml::Value::as_table_mut) .ok_or(Error::ParsingCargoTomlDependenciesFailed)?; - if self.packages.is_empty() { + if self.program_packages.is_empty() { throw!(Error::NoProgramsFound) } - for package in self.packages.iter() { + for package in self.program_packages.iter() { let manifest_path = package.manifest_path.parent().unwrap().as_std_path(); // INFO this will obtain relative path let relative_path = pathdiff::diff_paths(manifest_path, cargo_dir).unwrap(); diff --git a/crates/client/tests/anchor_idl/example.json b/crates/client/tests/anchor_idl/example.json new file mode 100644 index 00000000..e76207f1 --- /dev/null +++ b/crates/client/tests/anchor_idl/example.json @@ -0,0 +1,241 @@ +{ + "address": "ETC9SS2iTY8xFF6etnvsFaxDz9WhLryXR2Z6k81Z43U4", + "metadata": { + "name": "dummy_example", + "version": "0.1.0", + "spec": "0.1.0", + "description": "Created with Anchor" + }, + "instructions": [ + { + "name": "initialize_ix", + "discriminator": [ + 150, + 84, + 235, + 128, + 82, + 59, + 240, + 136 + ], + "accounts": [ + { + "name": "account", + "pda": { + "seeds": [ + { + "kind": "const", + "value": [ + 104, + 101, + 108, + 108, + 111 + ] + } + ] + } + }, + { + "name": "account_info" + }, + { + "name": "account_loader" + }, + { + "name": "boxed" + }, + { + "name": "interace" + }, + { + "name": "interface_account" + }, + { + "name": "option", + "optional": true + }, + { + "name": "program", + "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb" + }, + { + "name": "signer", + "signer": true + }, + { + "name": "system_account" + }, + { + "name": "sysvar", + "address": "SysvarC1ock11111111111111111111111111111111" + }, + { + "name": "unchecked_account" + } + ], + "args": [ + { + "name": "_var1", + "type": "bool" + }, + { + "name": "_var2", + "type": "u8" + }, + { + "name": "_var3", + "type": "i8" + }, + { + "name": "_var4", + "type": "u16" + }, + { + "name": "_var5", + "type": "i16" + }, + { + "name": "_var6", + "type": "u32" + }, + { + "name": "_var7", + "type": "i32" + }, + { + "name": "_var8", + "type": "u64" + }, + { + "name": "_var9", + "type": "i32" + }, + { + "name": "_var10", + "type": "f64" + }, + { + "name": "_var11", + "type": "u128" + }, + { + "name": "_var12", + "type": "i128" + }, + { + "name": "_ver13", + "type": "bytes" + }, + { + "name": "_var14", + "type": "string" + }, + { + "name": "_var15", + "type": "pubkey" + }, + { + "name": "_var16", + "type": { + "option": "i16" + } + }, + { + "name": "_var17", + "type": { + "vec": "u32" + } + }, + { + "name": "_var18", + "type": { + "array": [ + "i128", + 5 + ] + } + }, + { + "name": "_var19", + "type": { + "defined": { + "name": "InputParameter" + } + } + } + ] + } + ], + "accounts": [ + { + "name": "DataAccount", + "discriminator": [ + 85, + 240, + 182, + 158, + 76, + 7, + 18, + 233 + ] + }, + { + "name": "DataAccountZeroCopy", + "discriminator": [ + 254, + 68, + 35, + 162, + 195, + 219, + 248, + 239 + ] + } + ], + "types": [ + { + "name": "DataAccount", + "type": { + "kind": "struct", + "fields": [ + { + "name": "field1", + "type": "pubkey" + } + ] + } + }, + { + "name": "DataAccountZeroCopy", + "serialization": "bytemuck", + "repr": { + "kind": "c" + }, + "type": { + "kind": "struct", + "fields": [ + { + "name": "field1", + "type": "pubkey" + } + ] + } + }, + { + "name": "InputParameter", + "type": { + "kind": "struct", + "fields": [ + { + "name": "field1", + "type": "u8" + } + ] + } + } + ] +} diff --git a/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs b/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs new file mode 100644 index 00000000..8ffb09a7 --- /dev/null +++ b/crates/client/tests/expected_source_codes/expected_fuzz_instructions.rs @@ -0,0 +1,109 @@ +pub mod dummy_example_fuzz_instructions { + use trident_client::fuzzing::*; + type InitializeIxSnapshot<'info> = InitializeIxAlias<'info>; + #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] + pub enum FuzzInstruction { + InitializeIx(InitializeIx), + } + #[derive(Arbitrary, Debug)] + pub struct InitializeIx { + pub accounts: InitializeIxAccounts, + pub data: InitializeIxData, + } + #[derive(Arbitrary, Debug)] + pub struct InitializeIxAccounts { + pub account: AccountId, + pub account_info: AccountId, + pub account_loader: AccountId, + pub boxed: AccountId, + pub interace: AccountId, + pub interface_account: AccountId, + pub option: AccountId, + pub program: AccountId, + pub signer: AccountId, + pub system_account: AccountId, + pub sysvar: AccountId, + pub unchecked_account: AccountId, + } + #[derive(Arbitrary, Debug)] + pub struct InitializeIxData { + pub _var1: bool, + pub _var2: u8, + pub _var3: i8, + pub _var4: u16, + pub _var5: i16, + pub _var6: u32, + pub _var7: i32, + pub _var8: u64, + pub _var9: i32, + pub _var10: f64, + pub _var11: u128, + pub _var12: i128, + pub _ver13: Vec, + pub _var14: String, + pub _var15: AccountId, + pub _var16: Option, + pub _var17: Vec, + pub _var18: [i128; 5usize], + pub _var19: InputParameter, + } + impl<'info> IxOps<'info> for InitializeIx { + type IxData = dummy_example::instruction::InitializeIx; + type IxAccounts = FuzzAccounts; + type IxSnapshot = InitializeIxSnapshot<'info>; + fn get_data( + &self, + _client: &mut impl FuzzClient, + _fuzz_accounts: &mut FuzzAccounts, + ) -> Result { + let data = dummy_example::instruction::InitializeIx { + _var1: self.data._var1, + _var2: self.data._var2, + _var3: self.data._var3, + _var4: self.data._var4, + _var5: self.data._var5, + _var6: self.data._var6, + _var7: self.data._var7, + _var8: self.data._var8, + _var9: self.data._var9, + _var10: self.data._var10, + _var11: self.data._var11, + _var12: self.data._var12, + _ver13: self.data._ver13.clone(), + _var14: self.data._var14.clone(), + _var15: todo!(), + _var16: self.data._var16, + _var17: self.data._var17.clone(), + _var18: self.data._var18, + _var19: todo!(), + }; + Ok(data) + } + fn get_accounts( + &self, + client: &mut impl FuzzClient, + fuzz_accounts: &mut FuzzAccounts, + ) -> Result<(Vec, Vec), FuzzingError> { + let signers = vec![todo!()]; + let acc_meta = todo!(); + Ok((signers, acc_meta)) + } + } + #[doc = r" Use AccountsStorage where T can be one of:"] + #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] + #[derive(Default)] + pub struct FuzzAccounts { + account: AccountsStorage, + account_info: AccountsStorage, + account_loader: AccountsStorage, + boxed: AccountsStorage, + interace: AccountsStorage, + interface_account: AccountsStorage, + option: AccountsStorage, + program: AccountsStorage, + signer: AccountsStorage, + system_account: AccountsStorage, + sysvar: AccountsStorage, + unchecked_account: AccountsStorage, + } +} diff --git a/crates/client/tests/expected_source_codes/expected_program_client_code.rs b/crates/client/tests/expected_source_codes/expected_program_client_code.rs new file mode 100644 index 00000000..631c4728 --- /dev/null +++ b/crates/client/tests/expected_source_codes/expected_program_client_code.rs @@ -0,0 +1,157 @@ +// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module +pub mod dummy_example_instruction { + use trident_client::prelude::*; + use trident_client::test::*; + pub const PROGRAM_ID: Pubkey = pubkey!("ETC9SS2iTY8xFF6etnvsFaxDz9WhLryXR2Z6k81Z43U4"); + pub async fn initialize_ix( + client: &Client, + i__var1: bool, + i__var2: u8, + i__var3: i8, + i__var4: u16, + i__var5: i16, + i__var6: u32, + i__var7: i32, + i__var8: u64, + i__var9: i32, + i__var10: f64, + i__var11: u128, + i__var12: i128, + i__ver13: Vec, + i__var14: String, + i__var15: Pubkey, + i__var16: Option, + i__var17: Vec, + i__var18: [i128; 5usize], + i__var19: InputParameter, + a_account: Pubkey, + a_account_info: Pubkey, + a_account_loader: Pubkey, + a_boxed: Pubkey, + a_interace: Pubkey, + a_interface_account: Pubkey, + a_option: Pubkey, + a_program: Pubkey, + a_signer: Pubkey, + a_system_account: Pubkey, + a_sysvar: Pubkey, + a_unchecked_account: Pubkey, + signers: impl IntoIterator + Send + 'static, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + dummy_example::instruction::InitializeIx { + _var1: i__var1, + _var2: i__var2, + _var3: i__var3, + _var4: i__var4, + _var5: i__var5, + _var6: i__var6, + _var7: i__var7, + _var8: i__var8, + _var9: i__var9, + _var10: i__var10, + _var11: i__var11, + _var12: i__var12, + _ver13: i__ver13, + _var14: i__var14, + _var15: i__var15, + _var16: i__var16, + _var17: i__var17, + _var18: i__var18, + _var19: i__var19, + }, + dummy_example::accounts::InitializeIx { + account: a_account, + account_info: a_account_info, + account_loader: a_account_loader, + boxed: a_boxed, + interace: a_interace, + interface_account: a_interface_account, + option: a_option, + program: a_program, + signer: a_signer, + system_account: a_system_account, + sysvar: a_sysvar, + unchecked_account: a_unchecked_account, + }, + signers, + ) + .await + } + pub fn initialize_ix_ix( + i__var1: bool, + i__var2: u8, + i__var3: i8, + i__var4: u16, + i__var5: i16, + i__var6: u32, + i__var7: i32, + i__var8: u64, + i__var9: i32, + i__var10: f64, + i__var11: u128, + i__var12: i128, + i__ver13: Vec, + i__var14: String, + i__var15: Pubkey, + i__var16: Option, + i__var17: Vec, + i__var18: [i128; 5usize], + i__var19: InputParameter, + a_account: Pubkey, + a_account_info: Pubkey, + a_account_loader: Pubkey, + a_boxed: Pubkey, + a_interace: Pubkey, + a_interface_account: Pubkey, + a_option: Pubkey, + a_program: Pubkey, + a_signer: Pubkey, + a_system_account: Pubkey, + a_sysvar: Pubkey, + a_unchecked_account: Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: dummy_example::instruction::InitializeIx { + _var1: i__var1, + _var2: i__var2, + _var3: i__var3, + _var4: i__var4, + _var5: i__var5, + _var6: i__var6, + _var7: i__var7, + _var8: i__var8, + _var9: i__var9, + _var10: i__var10, + _var11: i__var11, + _var12: i__var12, + _ver13: i__ver13, + _var14: i__var14, + _var15: i__var15, + _var16: i__var16, + _var17: i__var17, + _var18: i__var18, + _var19: i__var19, + } + .data(), + accounts: dummy_example::accounts::InitializeIx { + account: a_account, + account_info: a_account_info, + account_loader: a_account_loader, + boxed: a_boxed, + interace: a_interace, + interface_account: a_interface_account, + option: a_option, + program: a_program, + signer: a_signer, + system_account: a_system_account, + sysvar: a_sysvar, + unchecked_account: a_unchecked_account, + } + .to_account_metas(None), + } + } +} diff --git a/crates/client/tests/expected_source_codes/expected_test_fuzz.rs b/crates/client/tests/expected_source_codes/expected_test_fuzz.rs new file mode 100644 index 00000000..7f755819 --- /dev/null +++ b/crates/client/tests/expected_source_codes/expected_test_fuzz.rs @@ -0,0 +1,37 @@ +use trident_client::fuzzing::*; + +mod fuzz_instructions; + +use dummy_example::entry as entry_dummy_example; +use dummy_example::ID as PROGRAM_ID_DUMMY_EXAMPLE; + +const PROGRAM_NAME_DUMMY_EXAMPLE: &str = "dummy_example"; + +use fuzz_instructions::dummy_example_fuzz_instructions::FuzzInstruction as fuzz_instruction_dummy_example; + +pub type FuzzInstruction = fuzz_instruction_dummy_example; + +struct MyFuzzData; + +impl FuzzDataBuilder for MyFuzzData {} + +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + + let fuzzing_program_dummy_example = FuzzingProgram::new( + PROGRAM_NAME_DUMMY_EXAMPLE, + &PROGRAM_ID_DUMMY_EXAMPLE, + processor!(convert_entry!(entry_dummy_example)), + ); + + let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_dummy_example]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_DUMMY_EXAMPLE, &mut client); +} + +fn main() { + + loop { + + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); + } +} diff --git a/crates/client/tests/test_data/expanded_source_codes/expanded_escrow.rs b/crates/client/tests/test_data/expanded_source_codes/expanded_escrow.rs deleted file mode 100644 index 9102df22..00000000 --- a/crates/client/tests/test_data/expanded_source_codes/expanded_escrow.rs +++ /dev/null @@ -1,3315 +0,0 @@ -#![feature(prelude_import)] -//! An example of an escrow program, inspired by PaulX tutorial seen here -//! https://paulx.dev/blog/2021/01/14/programming-on-solana-an-introduction/ -//! This example has some changes to implementation, but more or less should be the same overall -//! Also gives examples on how to use some newer anchor features and CPI -//! -//! User (Initializer) constructs an escrow deal: -//! - SPL token (X) they will offer and amount -//! - SPL token (Y) count they want in return and amount -//! - Program will take ownership of initializer's token X account -//! -//! Once this escrow is initialised, either: -//! 1. User (Taker) can call the exchange function to exchange their Y for X -//! - This will close the escrow account and no longer be usable -//! OR -//! 2. If no one has exchanged, the initializer can close the escrow account -//! - Initializer will get back ownership of their token X account -#[prelude_import] -use std::prelude::rust_2021::*; -#[macro_use] -extern crate std; - -use anchor_lang::prelude::*; -use anchor_spl::token::{ - self, spl_token::instruction::AuthorityType, SetAuthority, Token, - TokenAccount, Transfer, -}; - -pub mod innerstate { - use super::*; - - pub enum EnumInputInner { - Variant1, - Variant2, - Variant3, - Variant4, - Variant5, - } - impl borsh::de::BorshDeserialize for EnumInputInner { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - let tag = - ::deserialize_reader(reader)?; - ::deserialize_variant(reader, tag) - } - } - impl borsh::de::EnumExt for EnumInputInner { - fn deserialize_variant(reader: &mut R, - variant_idx: u8) - -> ::core::result::Result { - let mut return_value = - match variant_idx { - 0u8 => EnumInputInner::Variant1, - 1u8 => EnumInputInner::Variant2, - 2u8 => EnumInputInner::Variant3, - 3u8 => EnumInputInner::Variant4, - 4u8 => EnumInputInner::Variant5, - _ => - return Err(borsh::maybestd::io::Error::new(borsh::maybestd::io::ErrorKind::InvalidInput, - - - - - - - - - - - // Transferring from initializer to taker - - - - - - - - - - - - - - - { - let res = - ::alloc::fmt::format(format_args!("Unexpected variant index: {0:?}", - variant_idx)); - res - })), - }; - Ok(return_value) - } - } - impl borsh::ser::BorshSerialize for EnumInputInner { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - let variant_idx: u8 = - match self { - EnumInputInner::Variant1 => 0u8, - EnumInputInner::Variant2 => 1u8, - EnumInputInner::Variant3 => 2u8, - EnumInputInner::Variant4 => 3u8, - EnumInputInner::Variant5 => 4u8, - }; - writer.write_all(&variant_idx.to_le_bytes())?; - match self { - EnumInputInner::Variant1 => {} - EnumInputInner::Variant2 => {} - EnumInputInner::Variant3 => {} - EnumInputInner::Variant4 => {} - EnumInputInner::Variant5 => {} - } - Ok(()) - } - } -} -pub use crate::innerstate::*; -pub mod state { - use anchor_lang::prelude::*; - pub enum EnumInput { Variant1, Variant2, Variant3, Variant4, Variant5, } - impl borsh::de::BorshDeserialize for EnumInput { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - let tag = - ::deserialize_reader(reader)?; - ::deserialize_variant(reader, tag) - } - } - impl borsh::de::EnumExt for EnumInput { - fn deserialize_variant(reader: &mut R, - variant_idx: u8) - -> ::core::result::Result { - let mut return_value = - match variant_idx { - 0u8 => EnumInput::Variant1, - 1u8 => EnumInput::Variant2, - 2u8 => EnumInput::Variant3, - 3u8 => EnumInput::Variant4, - 4u8 => EnumInput::Variant5, - _ => - return Err(borsh::maybestd::io::Error::new(borsh::maybestd::io::ErrorKind::InvalidInput, - { - let res = - ::alloc::fmt::format(format_args!("Unexpected variant index: {0:?}", - variant_idx)); - res - })), - }; - Ok(return_value) - } - } - impl borsh::ser::BorshSerialize for EnumInput { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - let variant_idx: u8 = - match self { - EnumInput::Variant1 => 0u8, - EnumInput::Variant2 => 1u8, - EnumInput::Variant3 => 2u8, - EnumInput::Variant4 => 3u8, - EnumInput::Variant5 => 4u8, - }; - writer.write_all(&variant_idx.to_le_bytes())?; - match self { - EnumInput::Variant1 => {} - EnumInput::Variant2 => {} - EnumInput::Variant3 => {} - EnumInput::Variant4 => {} - EnumInput::Variant5 => {} - } - Ok(()) - } - } - pub struct StructInput { - pub field1: u8, - pub field2: String, - pub field3: StructInputInner, - } - impl borsh::de::BorshDeserialize for StructInput where - u8: borsh::BorshDeserialize, String: borsh::BorshDeserialize, - StructInputInner: borsh::BorshDeserialize { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self { - field1: borsh::BorshDeserialize::deserialize_reader(reader)?, - field2: borsh::BorshDeserialize::deserialize_reader(reader)?, - field3: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - impl borsh::ser::BorshSerialize for StructInput where - u8: borsh::ser::BorshSerialize, String: borsh::ser::BorshSerialize, - StructInputInner: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.field1, writer)?; - borsh::BorshSerialize::serialize(&self.field2, writer)?; - borsh::BorshSerialize::serialize(&self.field3, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl ::core::default::Default for StructInput { - #[inline] - fn default() -> StructInput { - StructInput { - field1: ::core::default::Default::default(), - field2: ::core::default::Default::default(), - field3: ::core::default::Default::default(), - } - } - } - pub struct StructInputInner { - pub field1: Pubkey, - pub field2: String, - } - impl borsh::de::BorshDeserialize for StructInputInner where - Pubkey: borsh::BorshDeserialize, String: borsh::BorshDeserialize { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self { - field1: borsh::BorshDeserialize::deserialize_reader(reader)?, - field2: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - impl borsh::ser::BorshSerialize for StructInputInner where - Pubkey: borsh::ser::BorshSerialize, String: borsh::ser::BorshSerialize - { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.field1, writer)?; - borsh::BorshSerialize::serialize(&self.field2, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl ::core::default::Default for StructInputInner { - #[inline] - fn default() -> StructInputInner { - StructInputInner { - field1: ::core::default::Default::default(), - field2: ::core::default::Default::default(), - } - } - } -} -pub use crate::state::*; -#[doc = r" The static program ID"] -pub static ID: anchor_lang::solana_program::pubkey::Pubkey = - anchor_lang::solana_program::pubkey::Pubkey::new_from_array([5u8, 214u8, - 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, - 106u8, 230u8, 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, - 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, 68u8, 170u8, - 153u8, 74u8, 59u8]); -#[doc = r" Confirms that a given pubkey is equivalent to the program ID"] -pub fn check_id(id: &anchor_lang::solana_program::pubkey::Pubkey) -> bool { - id == &ID -} -#[doc = r" Returns the program ID"] -pub fn id() -> anchor_lang::solana_program::pubkey::Pubkey { ID } -use self::escrow::*; -/// # Safety -#[no_mangle] -pub unsafe extern "C" fn entrypoint(input: *mut u8) -> u64 { - let (program_id, accounts, instruction_data) = - unsafe { ::solana_program::entrypoint::deserialize(input) }; - match entry(&program_id, &accounts, &instruction_data) { - Ok(()) => ::solana_program::entrypoint::SUCCESS, - Err(error) => error.into(), - } -} -#[doc = -r" The Anchor codegen exposes a programming model where a user defines"] -#[doc = r" a set of methods inside of a `#[program]` module in a way similar"] -#[doc = -r" to writing RPC request handlers. The macro then generates a bunch of"] -#[doc = -r" code wrapping these user defined methods into something that can be"] -#[doc = r" executed on Solana."] -#[doc = r""] -#[doc = r" These methods fall into one categorie for now."] -#[doc = r""] -#[doc = r" Global methods - regular methods inside of the `#[program]`."] -#[doc = r""] -#[doc = r" Care must be taken by the codegen to prevent collisions between"] -#[doc = -r" methods in these different namespaces. For this reason, Anchor uses"] -#[doc = r" a variant of sighash to perform method dispatch, rather than"] -#[doc = r" something like a simple enum variant discriminator."] -#[doc = r""] -#[doc = r" The execution flow of the generated code can be roughly outlined:"] -#[doc = r""] -#[doc = r" * Start program via the entrypoint."] -#[doc = -r" * Strip method identifier off the first 8 bytes of the instruction"] -#[doc = r" data and invoke the identified method. The method identifier"] -#[doc = -r" is a variant of sighash. See docs.rs for `anchor_lang` for details."] -#[doc = r" * If the method identifier is an IDL identifier, execute the IDL"] -#[doc = r" instructions, which are a special set of hardcoded instructions"] -#[doc = r" baked into every Anchor program. Then exit."] -#[doc = r" * Otherwise, the method identifier is for a user defined"] -#[doc = r" instruction, i.e., one of the methods in the user defined"] -#[doc = r" `#[program]` module. Perform method dispatch, i.e., execute the"] -#[doc = r" big match statement mapping method identifier to method handler"] -#[doc = r" wrapper."] -#[doc = r" * Run the method handler wrapper. This wraps the code the user"] -#[doc = r" actually wrote, deserializing the accounts, constructing the"] -#[doc = r" context, invoking the user's code, and finally running the exit"] -#[doc = r" routine, which typically persists account changes."] -#[doc = r""] -#[doc = r" The `entry` function here, defines the standard entry to a Solana"] -#[doc = r" program, where execution begins."] -pub fn entry(program_id: &Pubkey, accounts: &[AccountInfo], data: &[u8]) - -> anchor_lang::solana_program::entrypoint::ProgramResult { - try_entry(program_id, accounts, data).map_err(|e| { e.log(); e.into() }) -} -fn try_entry(program_id: &Pubkey, accounts: &[AccountInfo], data: &[u8]) - -> anchor_lang::Result<()> { - if *program_id != ID { - return Err(anchor_lang::error::ErrorCode::DeclaredProgramIdMismatch.into()); - } - if data.len() < 8 { - return Err(anchor_lang::error::ErrorCode::InstructionMissing.into()); - } - dispatch(program_id, accounts, data) -} -#[doc = r" Module representing the program."] -pub mod program { - use super::*; - #[doc = r" Type representing the program."] - pub struct Escrow; - #[automatically_derived] - impl ::core::clone::Clone for Escrow { - #[inline] - fn clone(&self) -> Escrow { Escrow } - } - impl anchor_lang::Id for Escrow { - fn id() -> Pubkey { ID } - } -} -#[doc = r" Performs method dispatch."] -#[doc = r""] -#[doc = -r" Each method in an anchor program is uniquely defined by a namespace"] -#[doc = r" and a rust identifier (i.e., the name given to the method). These"] -#[doc = r" two pieces can be combined to creater a method identifier,"] -#[doc = r" specifically, Anchor uses"] -#[doc = r""] -#[doc = r#" Sha256(":")[..8],"#] -#[doc = r""] -#[doc = r#" where the namespace can be one type. "global" for a"#] -#[doc = r" regular instruction."] -#[doc = r""] -#[doc = r" With this 8 byte identifier, Anchor performs method dispatch,"] -#[doc = r" matching the given 8 byte identifier to the associated method"] -#[doc = -r" handler, which leads to user defined code being eventually invoked."] -fn dispatch(program_id: &Pubkey, accounts: &[AccountInfo], data: &[u8]) - -> anchor_lang::Result<()> { - let mut ix_data: &[u8] = data; - let sighash: [u8; 8] = - { - let mut sighash: [u8; 8] = [0; 8]; - sighash.copy_from_slice(&ix_data[..8]); - ix_data = &ix_data[8..]; - sighash - }; - use anchor_lang::Discriminator; - match sighash { - instruction::InitializeEscrow::DISCRIMINATOR => { - __private::__global::initialize_escrow(program_id, accounts, - ix_data) - } - instruction::CancelEscrow::DISCRIMINATOR => { - __private::__global::cancel_escrow(program_id, accounts, ix_data) - } - instruction::Exchange::DISCRIMINATOR => { - __private::__global::exchange(program_id, accounts, ix_data) - } - anchor_lang::idl::IDL_IX_TAG_LE => { - - #[cfg(not(feature = "no-idl"))] - { - __private::__idl::__idl_dispatch(program_id, accounts, - &ix_data) - } - } - anchor_lang::event::EVENT_IX_TAG_LE => { - Err(anchor_lang::error::ErrorCode::EventInstructionStub.into()) - } - _ => { - Err(anchor_lang::error::ErrorCode::InstructionFallbackNotFound.into()) - } - } -} -#[doc = r" Create a private module to not clutter the program's namespace."] -#[doc = r" Defines an entrypoint for each individual instruction handler"] -#[doc = r" wrapper."] -mod __private { - use super::*; - #[doc = - r" __idl mod defines handlers for injected Anchor IDL instructions."] - pub mod __idl { - use super::*; - #[inline(never)] - #[cfg(not(feature = "no-idl"))] - pub fn __idl_dispatch(program_id: &Pubkey, accounts: &[AccountInfo], - idl_ix_data: &[u8]) -> anchor_lang::Result<()> { - let mut accounts = accounts; - let mut data: &[u8] = idl_ix_data; - let ix = - anchor_lang::idl::IdlInstruction::deserialize(&mut data).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - match ix { - anchor_lang::idl::IdlInstruction::Create { data_len } => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlCreateAccounts::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_create_account(program_id, &mut accounts, data_len)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::Resize { data_len } => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlResizeAccount::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_resize_account(program_id, &mut accounts, data_len)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::Close => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlCloseAccount::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_close_account(program_id, &mut accounts)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::CreateBuffer => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlCreateBuffer::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_create_buffer(program_id, &mut accounts)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::Write { data } => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlAccounts::try_accounts(program_id, &mut accounts, &[], - &mut bumps, &mut reallocs)?; - __idl_write(program_id, &mut accounts, data)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::SetAuthority { new_authority - } => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlAccounts::try_accounts(program_id, &mut accounts, &[], - &mut bumps, &mut reallocs)?; - __idl_set_authority(program_id, &mut accounts, - new_authority)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::SetBuffer => { - let mut bumps = std::collections::BTreeMap::new(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlSetBuffer::try_accounts(program_id, &mut accounts, &[], - &mut bumps, &mut reallocs)?; - __idl_set_buffer(program_id, &mut accounts)?; - accounts.exit(program_id)?; - } - } - Ok(()) - } - use anchor_lang::idl::ERASED_AUTHORITY; - pub struct IdlAccount { - pub authority: Pubkey, - pub data_len: u32, - } - #[automatically_derived] - impl ::core::fmt::Debug for IdlAccount { - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish(f, - "IdlAccount", "authority", &self.authority, "data_len", - &&self.data_len) - } - } - impl borsh::ser::BorshSerialize for IdlAccount where - Pubkey: borsh::ser::BorshSerialize, - u32: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.authority, writer)?; - borsh::BorshSerialize::serialize(&self.data_len, writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for IdlAccount where - Pubkey: borsh::BorshDeserialize, u32: borsh::BorshDeserialize { - fn deserialize_reader(reader: - &mut R) - -> ::core::result::Result { - Ok(Self { - authority: borsh::BorshDeserialize::deserialize_reader(reader)?, - data_len: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - #[automatically_derived] - impl ::core::clone::Clone for IdlAccount { - #[inline] - fn clone(&self) -> IdlAccount { - IdlAccount { - authority: ::core::clone::Clone::clone(&self.authority), - data_len: ::core::clone::Clone::clone(&self.data_len), - } - } - } - #[automatically_derived] - impl anchor_lang::AccountSerialize for IdlAccount { - fn try_serialize(&self, writer: &mut W) - -> anchor_lang::Result<()> { - if writer.write_all(&[24, 70, 98, 191, 58, 144, 123, - 158]).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - if AnchorSerialize::serialize(self, writer).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::AccountDeserialize for IdlAccount { - fn try_deserialize(buf: &mut &[u8]) -> anchor_lang::Result { - if buf.len() < [24, 70, 98, 191, 58, 144, 123, 158].len() { - return Err(anchor_lang::error::ErrorCode::AccountDiscriminatorNotFound.into()); - } - let given_disc = &buf[..8]; - if &[24, 70, 98, 191, 58, 144, 123, 158] != given_disc { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.name(), - error_code_number: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.into(), - error_msg: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/escrow/src/lib.rs", - line: 42u32, - })), - compared_values: None, - }).with_account_name("IdlAccount")); - } - Self::try_deserialize_unchecked(buf) - } - fn try_deserialize_unchecked(buf: &mut &[u8]) - -> anchor_lang::Result { - let mut data: &[u8] = &buf[8..]; - AnchorDeserialize::deserialize(&mut data).map_err(|_| - anchor_lang::error::ErrorCode::AccountDidNotDeserialize.into()) - } - } - #[automatically_derived] - impl anchor_lang::Discriminator for IdlAccount { - const DISCRIMINATOR: [u8; 8] = - [24, 70, 98, 191, 58, 144, 123, 158]; - } - impl IdlAccount { - pub fn address(program_id: &Pubkey) -> Pubkey { - let program_signer = - Pubkey::find_program_address(&[], program_id).0; - Pubkey::create_with_seed(&program_signer, IdlAccount::seed(), - program_id).expect("Seed is always valid") - } - pub fn seed() -> &'static str { "anchor:idl" } - } - impl anchor_lang::Owner for IdlAccount { - fn owner() -> Pubkey { crate::ID } - } - pub struct IdlCreateAccounts<'info> { - #[account(signer)] - pub from: AccountInfo<'info>, - #[account(mut)] - pub to: AccountInfo<'info>, - #[account(seeds = [], bump)] - pub base: AccountInfo<'info>, - pub system_program: Program<'info, System>, - #[account(executable)] - pub program: AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info> for IdlCreateAccounts<'info> - where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let from: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("from"))?; - let to: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("to"))?; - let base: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("base"))?; - let system_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - let program: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("program"))?; - if !from.is_signer { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSigner).with_account_name("from")); - } - if !to.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("to")); - } - let (__pda_address, __bump) = - Pubkey::find_program_address(&[], &__program_id); - __bumps.insert("base".to_string(), __bump); - if base.key() != __pda_address { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSeeds).with_account_name("base").with_pubkeys((base.key(), - __pda_address))); - } - if !program.to_account_info().executable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintExecutable).with_account_name("program")); - } - Ok(IdlCreateAccounts { - from, - to, - base, - system_program, - program, - }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateAccounts<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.from.to_account_infos()); - account_infos.extend(self.to.to_account_infos()); - account_infos.extend(self.base.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos.extend(self.program.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCreateAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.from.to_account_metas(Some(true))); - account_metas.extend(self.to.to_account_metas(None)); - account_metas.extend(self.base.to_account_metas(None)); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas.extend(self.program.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlCreateAccounts<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.to, - program_id).map_err(|e| e.with_account_name("to"))?; - Ok(()) - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_create_accounts { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlCreateAccounts`]."] - pub struct IdlCreateAccounts { - pub from: anchor_lang::solana_program::pubkey::Pubkey, - pub to: anchor_lang::solana_program::pubkey::Pubkey, - pub base: anchor_lang::solana_program::pubkey::Pubkey, - pub system_program: anchor_lang::solana_program::pubkey::Pubkey, - pub program: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for IdlCreateAccounts where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.from, writer)?; - borsh::BorshSerialize::serialize(&self.to, writer)?; - borsh::BorshSerialize::serialize(&self.base, writer)?; - borsh::BorshSerialize::serialize(&self.system_program, - writer)?; - borsh::BorshSerialize::serialize(&self.program, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlCreateAccounts { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.from, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.to, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.base, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.program, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_create_accounts { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlCreateAccounts`]."] - pub struct IdlCreateAccounts<'info> { - pub from: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub to: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub base: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for - IdlCreateAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.from), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.to), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.base), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateAccounts<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.from)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.to)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.base)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.program)); - account_infos - } - } - } - pub struct IdlAccounts<'info> { - #[account(mut, has_one = authority)] - pub idl: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info> for IdlAccounts<'info> where - 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let idl: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("idl"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - if !idl.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("idl")); - } - { - let my_key = idl.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("idl").with_pubkeys((my_key, - target_key))); - } - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlAccounts { idl, authority }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for IdlAccounts<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.idl.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.idl.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for IdlAccounts<'info> - where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.idl, - program_id).map_err(|e| e.with_account_name("idl"))?; - Ok(()) - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_accounts { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlAccounts`]."] - pub struct IdlAccounts { - pub idl: anchor_lang::solana_program::pubkey::Pubkey, - pub authority: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for IdlAccounts where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.idl, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlAccounts { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.idl, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_accounts { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlAccounts`]."] - pub struct IdlAccounts<'info> { - pub idl: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.idl), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlAccounts<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.idl)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos - } - } - } - pub struct IdlResizeAccount<'info> { - #[account(mut, has_one = authority)] - pub idl: Account<'info, IdlAccount>, - #[account(mut, constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - pub system_program: Program<'info, System>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info> for IdlResizeAccount<'info> - where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let idl: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("idl"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - let system_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - if !idl.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("idl")); - } - { - let my_key = idl.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("idl").with_pubkeys((my_key, - target_key))); - } - } - if !authority.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("authority")); - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlResizeAccount { idl, authority, system_program }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlResizeAccount<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.idl.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlResizeAccount<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.idl.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlResizeAccount<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.idl, - program_id).map_err(|e| e.with_account_name("idl"))?; - anchor_lang::AccountsExit::exit(&self.authority, - program_id).map_err(|e| e.with_account_name("authority"))?; - Ok(()) - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_resize_account { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlResizeAccount`]."] - pub struct IdlResizeAccount { - pub idl: anchor_lang::solana_program::pubkey::Pubkey, - pub authority: anchor_lang::solana_program::pubkey::Pubkey, - pub system_program: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for IdlResizeAccount where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.idl, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - borsh::BorshSerialize::serialize(&self.system_program, - writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlResizeAccount { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.idl, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.authority, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_resize_account { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlResizeAccount`]."] - pub struct IdlResizeAccount<'info> { - pub idl: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for - IdlResizeAccount<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.idl), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.authority), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlResizeAccount<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.idl)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos - } - } - } - pub struct IdlCreateBuffer<'info> { - #[account(zero)] - pub buffer: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info> for IdlCreateBuffer<'info> - where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - if __accounts.is_empty() { - return Err(anchor_lang::error::ErrorCode::AccountNotEnoughKeys.into()); - } - let buffer = &__accounts[0]; - *__accounts = &__accounts[1..]; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - let __anchor_rent = Rent::get()?; - let buffer: - anchor_lang::accounts::account::Account = - { - let mut __data: &[u8] = &buffer.try_borrow_data()?; - let mut __disc_bytes = [0u8; 8]; - __disc_bytes.copy_from_slice(&__data[..8]); - let __discriminator = u64::from_le_bytes(__disc_bytes); - if __discriminator != 0 { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintZero).with_account_name("buffer")); - } - match anchor_lang::accounts::account::Account::try_from_unchecked(&buffer) - { - Ok(val) => val, - Err(e) => return Err(e.with_account_name("buffer")), - } - }; - if !buffer.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("buffer")); - } - if !__anchor_rent.is_exempt(buffer.to_account_info().lamports(), - buffer.to_account_info().try_data_len()?) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRentExempt).with_account_name("buffer")); - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlCreateBuffer { buffer, authority }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateBuffer<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.buffer.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCreateBuffer<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.buffer.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlCreateBuffer<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.buffer, - program_id).map_err(|e| e.with_account_name("buffer"))?; - Ok(()) - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_create_buffer { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlCreateBuffer`]."] - pub struct IdlCreateBuffer { - pub buffer: anchor_lang::solana_program::pubkey::Pubkey, - pub authority: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for IdlCreateBuffer where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.buffer, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlCreateBuffer { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.buffer, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_create_buffer { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlCreateBuffer`]."] - pub struct IdlCreateBuffer<'info> { - pub buffer: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCreateBuffer<'info> - { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.buffer), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateBuffer<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.buffer)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos - } - } - } - pub struct IdlSetBuffer<'info> { - #[account(mut, constraint = buffer.authority == idl.authority)] - pub buffer: Account<'info, IdlAccount>, - #[account(mut, has_one = authority)] - pub idl: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info> for IdlSetBuffer<'info> where - 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let buffer: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("buffer"))?; - let idl: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("idl"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - if !buffer.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("buffer")); - } - if !(buffer.authority == idl.authority) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("buffer")); - } - if !idl.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("idl")); - } - { - let my_key = idl.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("idl").with_pubkeys((my_key, - target_key))); - } - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlSetBuffer { buffer, idl, authority }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for IdlSetBuffer<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.buffer.to_account_infos()); - account_infos.extend(self.idl.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlSetBuffer<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.buffer.to_account_metas(None)); - account_metas.extend(self.idl.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for IdlSetBuffer<'info> - where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.buffer, - program_id).map_err(|e| e.with_account_name("buffer"))?; - anchor_lang::AccountsExit::exit(&self.idl, - program_id).map_err(|e| e.with_account_name("idl"))?; - Ok(()) - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_set_buffer { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlSetBuffer`]."] - pub struct IdlSetBuffer { - pub buffer: anchor_lang::solana_program::pubkey::Pubkey, - pub idl: anchor_lang::solana_program::pubkey::Pubkey, - pub authority: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for IdlSetBuffer where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.buffer, writer)?; - borsh::BorshSerialize::serialize(&self.idl, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlSetBuffer { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.buffer, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.idl, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_set_buffer { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlSetBuffer`]."] - pub struct IdlSetBuffer<'info> { - pub buffer: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub idl: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlSetBuffer<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.buffer), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.idl), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlSetBuffer<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.buffer)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.idl)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos - } - } - } - pub struct IdlCloseAccount<'info> { - #[account(mut, has_one = authority, close = sol_destination)] - pub account: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - #[account(mut)] - pub sol_destination: AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info> for IdlCloseAccount<'info> - where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("account"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - let sol_destination: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("sol_destination"))?; - if !account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("account")); - } - { - let my_key = account.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("account").with_pubkeys((my_key, - target_key))); - } - } - { - if account.key() == sol_destination.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintClose).with_account_name("account")); - } - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - if !sol_destination.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("sol_destination")); - } - Ok(IdlCloseAccount { account, authority, sol_destination }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCloseAccount<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.account.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos.extend(self.sol_destination.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCloseAccount<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.account.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas.extend(self.sol_destination.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlCloseAccount<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - { - let sol_destination = &self.sol_destination; - anchor_lang::AccountsClose::close(&self.account, - sol_destination.to_account_info()).map_err(|e| - e.with_account_name("account"))?; - } - anchor_lang::AccountsExit::exit(&self.sol_destination, - program_id).map_err(|e| - e.with_account_name("sol_destination"))?; - Ok(()) - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_close_account { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlCloseAccount`]."] - pub struct IdlCloseAccount { - pub account: anchor_lang::solana_program::pubkey::Pubkey, - pub authority: anchor_lang::solana_program::pubkey::Pubkey, - pub sol_destination: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for IdlCloseAccount where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.account, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - borsh::BorshSerialize::serialize(&self.sol_destination, - writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlCloseAccount { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.sol_destination, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_close_account { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlCloseAccount`]."] - pub struct IdlCloseAccount<'info> { - pub account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub sol_destination: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCloseAccount<'info> - { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.sol_destination), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCloseAccount<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.sol_destination)); - account_infos - } - } - } - use std::cell::{Ref, RefMut}; - pub trait IdlTrailingData<'info> { - fn trailing_data(self) - -> Ref<'info, [u8]>; - fn trailing_data_mut(self) - -> RefMut<'info, [u8]>; - } - impl<'a, 'info: 'a> IdlTrailingData<'a> for - &'a Account<'info, IdlAccount> { - fn trailing_data(self) -> Ref<'a, [u8]> { - let info: &AccountInfo<'info> = self.as_ref(); - Ref::map(info.try_borrow_data().unwrap(), |d| &d[44..]) - } - fn trailing_data_mut(self) -> RefMut<'a, [u8]> { - let info: &AccountInfo<'info> = self.as_ref(); - RefMut::map(info.try_borrow_mut_data().unwrap(), - |d| &mut d[44..]) - } - } - #[inline(never)] - pub fn __idl_create_account(program_id: &Pubkey, - accounts: &mut IdlCreateAccounts, data_len: u64) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlCreateAccount"); - if program_id != accounts.program.key { - return Err(anchor_lang::error::ErrorCode::IdlInstructionInvalidProgram.into()); - } - let from = accounts.from.key; - let (base, nonce) = Pubkey::find_program_address(&[], program_id); - let seed = IdlAccount::seed(); - let owner = accounts.program.key; - let to = Pubkey::create_with_seed(&base, seed, owner).unwrap(); - let space = std::cmp::min(8 + 32 + 4 + data_len as usize, 10_000); - let rent = Rent::get()?; - let lamports = rent.minimum_balance(space); - let seeds = &[&[nonce][..]]; - let ix = - anchor_lang::solana_program::system_instruction::create_account_with_seed(from, - &to, &base, seed, lamports, space as u64, owner); - anchor_lang::solana_program::program::invoke_signed(&ix, - &[accounts.from.clone(), accounts.to.clone(), - accounts.base.clone(), - accounts.system_program.to_account_info().clone()], - &[seeds])?; - let mut idl_account = - { - let mut account_data = accounts.to.try_borrow_data()?; - let mut account_data_slice: &[u8] = &account_data; - IdlAccount::try_deserialize_unchecked(&mut account_data_slice)? - }; - idl_account.authority = *accounts.from.key; - let mut data = accounts.to.try_borrow_mut_data()?; - let dst: &mut [u8] = &mut data; - let mut cursor = std::io::Cursor::new(dst); - idl_account.try_serialize(&mut cursor)?; - Ok(()) - } - #[inline(never)] - pub fn __idl_resize_account(program_id: &Pubkey, - accounts: &mut IdlResizeAccount, data_len: u64) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlResizeAccount"); - let data_len: usize = data_len as usize; - if accounts.idl.data_len != 0 { - return Err(anchor_lang::error::ErrorCode::IdlAccountNotEmpty.into()); - } - let new_account_space = - accounts.idl.to_account_info().data_len().checked_add(std::cmp::min(data_len.checked_sub(accounts.idl.to_account_info().data_len()).expect("data_len should always be >= the current account space"), - 10_000)).unwrap(); - if new_account_space > accounts.idl.to_account_info().data_len() { - let sysvar_rent = Rent::get()?; - let new_rent_minimum = - sysvar_rent.minimum_balance(new_account_space); - anchor_lang::system_program::transfer(anchor_lang::context::CpiContext::new(accounts.system_program.to_account_info(), - anchor_lang::system_program::Transfer { - from: accounts.authority.to_account_info(), - to: accounts.idl.to_account_info().clone(), - }), - new_rent_minimum.checked_sub(accounts.idl.to_account_info().lamports()).unwrap())?; - accounts.idl.to_account_info().realloc(new_account_space, - false)?; - } - Ok(()) - } - #[inline(never)] - pub fn __idl_close_account(program_id: &Pubkey, - accounts: &mut IdlCloseAccount) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlCloseAccount"); - Ok(()) - } - #[inline(never)] - pub fn __idl_create_buffer(program_id: &Pubkey, - accounts: &mut IdlCreateBuffer) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlCreateBuffer"); - let mut buffer = &mut accounts.buffer; - buffer.authority = *accounts.authority.key; - Ok(()) - } - #[inline(never)] - pub fn __idl_write(program_id: &Pubkey, accounts: &mut IdlAccounts, - idl_data: Vec) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlWrite"); - let prev_len: usize = - ::std::convert::TryInto::::try_into(accounts.idl.data_len).unwrap(); - let new_len: usize = - prev_len.checked_add(idl_data.len()).unwrap() as usize; - accounts.idl.data_len = - accounts.idl.data_len.checked_add(::std::convert::TryInto::::try_into(idl_data.len()).unwrap()).unwrap(); - use IdlTrailingData; - let mut idl_bytes = accounts.idl.trailing_data_mut(); - let idl_expansion = &mut idl_bytes[prev_len..new_len]; - if idl_expansion.len() != idl_data.len() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::RequireEqViolated.name(), - error_code_number: anchor_lang::error::ErrorCode::RequireEqViolated.into(), - error_msg: anchor_lang::error::ErrorCode::RequireEqViolated.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/escrow/src/lib.rs", - line: 42u32, - })), - compared_values: None, - }).with_values((idl_expansion.len(), idl_data.len()))); - }; - idl_expansion.copy_from_slice(&idl_data[..]); - Ok(()) - } - #[inline(never)] - pub fn __idl_set_authority(program_id: &Pubkey, - accounts: &mut IdlAccounts, new_authority: Pubkey) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlSetAuthority"); - accounts.idl.authority = new_authority; - Ok(()) - } - #[inline(never)] - pub fn __idl_set_buffer(program_id: &Pubkey, - accounts: &mut IdlSetBuffer) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlSetBuffer"); - accounts.idl.data_len = accounts.buffer.data_len; - use IdlTrailingData; - let buffer_len = - ::std::convert::TryInto::::try_into(accounts.buffer.data_len).unwrap(); - let mut target = accounts.idl.trailing_data_mut(); - let source = &accounts.buffer.trailing_data()[..buffer_len]; - if target.len() < buffer_len { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::RequireGteViolated.name(), - error_code_number: anchor_lang::error::ErrorCode::RequireGteViolated.into(), - error_msg: anchor_lang::error::ErrorCode::RequireGteViolated.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/escrow/src/lib.rs", - line: 42u32, - })), - compared_values: None, - }).with_values((target.len(), buffer_len))); - }; - target[..buffer_len].copy_from_slice(source); - Ok(()) - } - } - #[doc = - r" __global mod defines wrapped handlers for global instructions."] - pub mod __global { - use super::*; - #[inline(never)] - pub fn initialize_escrow(__program_id: &Pubkey, - __accounts: &[AccountInfo], __ix_data: &[u8]) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: InitializeEscrow"); - let ix = - instruction::InitializeEscrow::deserialize(&mut &__ix_data[..]).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let instruction::InitializeEscrow { - initializer_amount, - taker_amount, - _enum_variant, - _enum_variant_inner, - _struct_variant_inner } = ix; - let mut __bumps = std::collections::BTreeMap::new(); - let mut __reallocs = std::collections::BTreeSet::new(); - let mut __remaining_accounts: &[AccountInfo] = __accounts; - let mut __accounts = - InitializeEscrow::try_accounts(__program_id, - &mut __remaining_accounts, __ix_data, &mut __bumps, - &mut __reallocs)?; - let result = - escrow::initialize_escrow(anchor_lang::context::Context::new(__program_id, - &mut __accounts, __remaining_accounts, __bumps), - initializer_amount, taker_amount, _enum_variant, - _enum_variant_inner, _struct_variant_inner)?; - __accounts.exit(__program_id) - } - #[inline(never)] - pub fn cancel_escrow(__program_id: &Pubkey, - __accounts: &[AccountInfo], __ix_data: &[u8]) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: CancelEscrow"); - let ix = - instruction::CancelEscrow::deserialize(&mut &__ix_data[..]).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let instruction::CancelEscrow = ix; - let mut __bumps = std::collections::BTreeMap::new(); - let mut __reallocs = std::collections::BTreeSet::new(); - let mut __remaining_accounts: &[AccountInfo] = __accounts; - let mut __accounts = - CancelEscrow::try_accounts(__program_id, - &mut __remaining_accounts, __ix_data, &mut __bumps, - &mut __reallocs)?; - let result = - escrow::cancel_escrow(anchor_lang::context::Context::new(__program_id, - &mut __accounts, __remaining_accounts, __bumps))?; - __accounts.exit(__program_id) - } - #[inline(never)] - pub fn exchange(__program_id: &Pubkey, __accounts: &[AccountInfo], - __ix_data: &[u8]) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: Exchange"); - let ix = - instruction::Exchange::deserialize(&mut &__ix_data[..]).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let instruction::Exchange = ix; - let mut __bumps = std::collections::BTreeMap::new(); - let mut __reallocs = std::collections::BTreeSet::new(); - let mut __remaining_accounts: &[AccountInfo] = __accounts; - let mut __accounts = - Exchange::try_accounts(__program_id, - &mut __remaining_accounts, __ix_data, &mut __bumps, - &mut __reallocs)?; - let result = - escrow::exchange(anchor_lang::context::Context::new(__program_id, - &mut __accounts, __remaining_accounts, __bumps))?; - __accounts.exit(__program_id) - } - } -} -pub mod escrow { - use super::*; - const ESCROW_PDA_SEED: &[u8] = b"escrow"; - pub fn initialize_escrow(ctx: Context, - initializer_amount: u64, taker_amount: u64, _enum_variant: EnumInput, - _enum_variant_inner: EnumInputInner, - _struct_variant_inner: StructInput) -> Result<()> { - ctx.accounts.escrow_account.initializer_key = - *ctx.accounts.initializer.key; - ctx.accounts.escrow_account.initializer_deposit_token_account = - *ctx.accounts.initializer_deposit_token_account.to_account_info().key; - ctx.accounts.escrow_account.initializer_receive_token_account = - *ctx.accounts.initializer_receive_token_account.to_account_info().key; - ctx.accounts.escrow_account.initializer_amount = initializer_amount; - ctx.accounts.escrow_account.taker_amount = taker_amount; - let (pda, _bump_seed) = - Pubkey::find_program_address(&[ESCROW_PDA_SEED], ctx.program_id); - token::set_authority(ctx.accounts.into(), AuthorityType::AccountOwner, - Some(pda))?; - Ok(()) - } - pub fn cancel_escrow(ctx: Context) -> Result<()> { - let (_pda, bump_seed) = - Pubkey::find_program_address(&[ESCROW_PDA_SEED], ctx.program_id); - let seeds = &[&ESCROW_PDA_SEED[..], &[bump_seed]]; - token::set_authority(ctx.accounts.into_set_authority_context().with_signer(&[&seeds[..]]), - AuthorityType::AccountOwner, - Some(ctx.accounts.escrow_account.initializer_key))?; - Ok(()) - } - pub fn exchange(ctx: Context) -> Result<()> { - let (_pda, bump_seed) = - Pubkey::find_program_address(&[ESCROW_PDA_SEED], ctx.program_id); - let seeds = &[&ESCROW_PDA_SEED[..], &[bump_seed]]; - token::transfer(ctx.accounts.into_transfer_to_taker_context().with_signer(&[&seeds[..]]), - ctx.accounts.escrow_account.initializer_amount)?; - token::transfer(ctx.accounts.into_transfer_to_initializer_context(), - ctx.accounts.escrow_account.taker_amount)?; - token::set_authority(ctx.accounts.into_set_authority_context().with_signer(&[&seeds[..]]), - AuthorityType::AccountOwner, - Some(ctx.accounts.escrow_account.initializer_key))?; - Ok(()) - } -} -#[doc = r" An Anchor generated module containing the program's set of"] -#[doc = -r" instructions, where each method handler in the `#[program]` mod is"] -#[doc = r" associated with a struct defining the input arguments to the"] -#[doc = -r" method. These should be used directly, when one wants to serialize"] -#[doc = r" Anchor instruction data, for example, when speciying"] -#[doc = r" instructions on a client."] -pub mod instruction { - use super::*; - #[doc = r" Instruction."] - pub struct InitializeEscrow { - pub initializer_amount: u64, - pub taker_amount: u64, - pub _enum_variant: EnumInput, - pub _enum_variant_inner: EnumInputInner, - pub _struct_variant_inner: StructInput, - } - impl borsh::ser::BorshSerialize for InitializeEscrow where - u64: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize, - EnumInput: borsh::ser::BorshSerialize, - EnumInputInner: borsh::ser::BorshSerialize, - StructInput: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.initializer_amount, - writer)?; - borsh::BorshSerialize::serialize(&self.taker_amount, writer)?; - borsh::BorshSerialize::serialize(&self._enum_variant, writer)?; - borsh::BorshSerialize::serialize(&self._enum_variant_inner, - writer)?; - borsh::BorshSerialize::serialize(&self._struct_variant_inner, - writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for InitializeEscrow where - u64: borsh::BorshDeserialize, u64: borsh::BorshDeserialize, - EnumInput: borsh::BorshDeserialize, - EnumInputInner: borsh::BorshDeserialize, - StructInput: borsh::BorshDeserialize { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self { - initializer_amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - taker_amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - _enum_variant: borsh::BorshDeserialize::deserialize_reader(reader)?, - _enum_variant_inner: borsh::BorshDeserialize::deserialize_reader(reader)?, - _struct_variant_inner: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - impl anchor_lang::Discriminator for InitializeEscrow { - const DISCRIMINATOR: [u8; 8] = [243, 160, 77, 153, 11, 92, 48, 209]; - } - impl anchor_lang::InstructionData for InitializeEscrow {} - impl anchor_lang::Owner for InitializeEscrow { - fn owner() -> Pubkey { ID } - } - #[doc = r" Instruction."] - pub struct CancelEscrow; - impl borsh::ser::BorshSerialize for CancelEscrow { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - Ok(()) - } - } - impl borsh::de::BorshDeserialize for CancelEscrow { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self {}) - } - } - impl anchor_lang::Discriminator for CancelEscrow { - const DISCRIMINATOR: [u8; 8] = [156, 203, 54, 179, 38, 72, 33, 21]; - } - impl anchor_lang::InstructionData for CancelEscrow {} - impl anchor_lang::Owner for CancelEscrow { - fn owner() -> Pubkey { ID } - } - #[doc = r" Instruction."] - pub struct Exchange; - impl borsh::ser::BorshSerialize for Exchange { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - Ok(()) - } - } - impl borsh::de::BorshDeserialize for Exchange { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self {}) - } - } - impl anchor_lang::Discriminator for Exchange { - const DISCRIMINATOR: [u8; 8] = [47, 3, 27, 97, 215, 236, 219, 144]; - } - impl anchor_lang::InstructionData for Exchange {} - impl anchor_lang::Owner for Exchange { - fn owner() -> Pubkey { ID } - } -} -#[doc = r" An Anchor generated module, providing a set of structs"] -#[doc = r" mirroring the structs deriving `Accounts`, where each field is"] -#[doc = r" a `Pubkey`. This is useful for specifying accounts for a client."] -pub mod accounts { - pub use crate::__client_accounts_initialize_escrow::*; - pub use crate::__client_accounts_exchange::*; - pub use crate::__client_accounts_cancel_escrow::*; -} -#[instruction(initializer_amount : u64)] -pub struct InitializeEscrow<'info> { - #[account(mut)] - pub initializer: Signer<'info>, - #[account(mut, constraint = initializer_deposit_token_account.amount >= - initializer_amount)] - pub initializer_deposit_token_account: Account<'info, TokenAccount>, - pub initializer_receive_token_account: Account<'info, TokenAccount>, - #[account(init, payer = initializer, space = 8 + EscrowAccount :: LEN)] - pub escrow_account: Account<'info, EscrowAccount>, - pub system_program: Program<'info, System>, - pub token_program: Program<'info, Token>, -} -#[automatically_derived] -impl<'info> anchor_lang::Accounts<'info> for InitializeEscrow<'info> where - 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let mut __ix_data = __ix_data; - struct __Args { - initializer_amount: u64, - } - impl borsh::ser::BorshSerialize for __Args where - u64: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.initializer_amount, - writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for __Args where - u64: borsh::BorshDeserialize { - fn deserialize_reader(reader: - &mut R) - -> ::core::result::Result { - Ok(Self { - initializer_amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - let __Args { initializer_amount } = - __Args::deserialize(&mut __ix_data).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let initializer: Signer = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("initializer"))?; - let initializer_deposit_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("initializer_deposit_token_account"))?; - let initializer_receive_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("initializer_receive_token_account"))?; - if __accounts.is_empty() { - return Err(anchor_lang::error::ErrorCode::AccountNotEnoughKeys.into()); - } - let escrow_account = &__accounts[0]; - *__accounts = &__accounts[1..]; - let system_program: anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - let token_program: anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("token_program"))?; - let __anchor_rent = Rent::get()?; - let escrow_account = - { - let actual_field = escrow_account.to_account_info(); - let actual_owner = actual_field.owner; - let space = 8 + EscrowAccount::LEN; - let pa: - anchor_lang::accounts::account::Account = - if !false || - actual_owner == - &anchor_lang::solana_program::system_program::ID { - let __current_lamports = escrow_account.lamports(); - if __current_lamports == 0 { - let space = space; - let lamports = __anchor_rent.minimum_balance(space); - let cpi_accounts = - anchor_lang::system_program::CreateAccount { - from: initializer.to_account_info(), - to: escrow_account.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::create_account(cpi_context.with_signer(&[]), - lamports, space as u64, __program_id)?; - } else { - if initializer.key() == escrow_account.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::TryingToInitPayerAsProgramAccount.name(), - error_code_number: anchor_lang::error::ErrorCode::TryingToInitPayerAsProgramAccount.into(), - error_msg: anchor_lang::error::ErrorCode::TryingToInitPayerAsProgramAccount.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/escrow/src/lib.rs", - line: 123u32, - })), - compared_values: None, - }).with_pubkeys((initializer.key(), escrow_account.key()))); - }; - let required_lamports = - __anchor_rent.minimum_balance(space).max(1).saturating_sub(__current_lamports); - if required_lamports > 0 { - let cpi_accounts = - anchor_lang::system_program::Transfer { - from: initializer.to_account_info(), - to: escrow_account.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::transfer(cpi_context, - required_lamports)?; - } - let cpi_accounts = - anchor_lang::system_program::Allocate { - account_to_allocate: escrow_account.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::allocate(cpi_context.with_signer(&[]), - space as u64)?; - let cpi_accounts = - anchor_lang::system_program::Assign { - account_to_assign: escrow_account.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::assign(cpi_context.with_signer(&[]), - __program_id)?; - } - match anchor_lang::accounts::account::Account::try_from_unchecked(&escrow_account) - { - Ok(val) => val, - Err(e) => return Err(e.with_account_name("escrow_account")), - } - } else { - match anchor_lang::accounts::account::Account::try_from(&escrow_account) - { - Ok(val) => val, - Err(e) => return Err(e.with_account_name("escrow_account")), - } - }; - if false { - if space != actual_field.data_len() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSpace).with_account_name("escrow_account").with_values((space, - actual_field.data_len()))); - } - if actual_owner != __program_id { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintOwner).with_account_name("escrow_account").with_pubkeys((*actual_owner, - *__program_id))); - } - { - let required_lamports = - __anchor_rent.minimum_balance(space); - if pa.to_account_info().lamports() < required_lamports { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRentExempt).with_account_name("escrow_account")); - } - } - } - pa - }; - if !escrow_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow_account")); - } - if !escrow_account.to_account_info().is_signer { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSigner).with_account_name("escrow_account")); - } - if !__anchor_rent.is_exempt(escrow_account.to_account_info().lamports(), - escrow_account.to_account_info().try_data_len()?) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRentExempt).with_account_name("escrow_account")); - } - if !initializer.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("initializer")); - } - if !initializer_deposit_token_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("initializer_deposit_token_account")); - } - if !(initializer_deposit_token_account.amount >= initializer_amount) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("initializer_deposit_token_account")); - } - Ok(InitializeEscrow { - initializer, - initializer_deposit_token_account, - initializer_receive_token_account, - escrow_account, - system_program, - token_program, - }) - } -} -#[automatically_derived] -impl<'info> anchor_lang::ToAccountInfos<'info> for InitializeEscrow<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.initializer.to_account_infos()); - account_infos.extend(self.initializer_deposit_token_account.to_account_infos()); - account_infos.extend(self.initializer_receive_token_account.to_account_infos()); - account_infos.extend(self.escrow_account.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos.extend(self.token_program.to_account_infos()); - account_infos - } -} -#[automatically_derived] -impl<'info> anchor_lang::ToAccountMetas for InitializeEscrow<'info> { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.initializer.to_account_metas(None)); - account_metas.extend(self.initializer_deposit_token_account.to_account_metas(None)); - account_metas.extend(self.initializer_receive_token_account.to_account_metas(None)); - account_metas.extend(self.escrow_account.to_account_metas(Some(true))); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas.extend(self.token_program.to_account_metas(None)); - account_metas - } -} -#[automatically_derived] -impl<'info> anchor_lang::AccountsExit<'info> for InitializeEscrow<'info> where - 'info: 'info { - fn exit(&self, program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.initializer, - program_id).map_err(|e| - e.with_account_name("initializer"))?; - anchor_lang::AccountsExit::exit(&self.initializer_deposit_token_account, - program_id).map_err(|e| - e.with_account_name("initializer_deposit_token_account"))?; - anchor_lang::AccountsExit::exit(&self.escrow_account, - program_id).map_err(|e| - e.with_account_name("escrow_account"))?; - Ok(()) - } -} -#[doc = r" An internal, Anchor generated module. This is used (as an"] -#[doc = r" implementation detail), to generate a struct for a given"] -#[doc = -r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] -#[doc = r" instead of an `AccountInfo`. This is useful for clients that want"] -#[doc = r" to generate a list of accounts, without explicitly knowing the"] -#[doc = r" order all the fields should be in."] -#[doc = r""] -#[doc = r" To access the struct in this module, one should use the sibling"] -#[doc = r" `accounts` module (also generated), which re-exports this."] -pub(crate) mod __client_accounts_initialize_escrow { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`InitializeEscrow`]."] - pub struct InitializeEscrow { - pub initializer: anchor_lang::solana_program::pubkey::Pubkey, - pub initializer_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub initializer_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - pub system_program: anchor_lang::solana_program::pubkey::Pubkey, - pub token_program: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for InitializeEscrow where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.initializer, writer)?; - borsh::BorshSerialize::serialize(&self.initializer_deposit_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.initializer_receive_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.escrow_account, writer)?; - borsh::BorshSerialize::serialize(&self.system_program, writer)?; - borsh::BorshSerialize::serialize(&self.token_program, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for InitializeEscrow { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.initializer, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.initializer_deposit_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.initializer_receive_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow_account, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.token_program, - false)); - account_metas - } - } -} -#[doc = r" An internal, Anchor generated module. This is used (as an"] -#[doc = r" implementation detail), to generate a CPI struct for a given"] -#[doc = r" `#[derive(Accounts)]` implementation, where each field is an"] -#[doc = r" AccountInfo."] -#[doc = r""] -#[doc = r" To access the struct in this module, one should use the sibling"] -#[doc = r" [`cpi::accounts`] module (also generated), which re-exports this."] -pub(crate) mod __cpi_client_accounts_initialize_escrow { - use super::*; - #[doc = " Generated CPI struct of the accounts for [`InitializeEscrow`]."] - pub struct InitializeEscrow<'info> { - pub initializer: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub initializer_deposit_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub initializer_receive_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub token_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for InitializeEscrow<'info> { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.initializer), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.initializer_deposit_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.initializer_receive_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow_account), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.token_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for InitializeEscrow<'info> - { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.initializer)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.initializer_deposit_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.initializer_receive_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.token_program)); - account_infos - } - } -} -pub struct Exchange<'info> { - #[account(signer)] - /// CHECK: ... - pub taker: AccountInfo<'info>, - #[account(mut)] - pub taker_deposit_token_account: Account<'info, TokenAccount>, - #[account(mut)] - pub taker_receive_token_account: Account<'info, TokenAccount>, - #[account(mut)] - pub pda_deposit_token_account: Account<'info, TokenAccount>, - #[account(mut)] - pub initializer_receive_token_account: Account<'info, TokenAccount>, - #[account(mut)] - /// CHECK: ... - pub initializer_main_account: AccountInfo<'info>, - #[account(mut, constraint = escrow_account.taker_amount <= - taker_deposit_token_account.amount, constraint = - escrow_account.initializer_deposit_token_account == * - pda_deposit_token_account.to_account_info().key, constraint = - escrow_account.initializer_receive_token_account == * - initializer_receive_token_account.to_account_info().key, constraint = - escrow_account.initializer_key == * initializer_main_account.key, close = - initializer_main_account)] - pub escrow_account: Account<'info, EscrowAccount>, - /// CHECK: ... - pub pda_account: AccountInfo<'info>, - pub token_program: Program<'info, Token>, -} -#[automatically_derived] -impl<'info> anchor_lang::Accounts<'info> for Exchange<'info> where - 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let taker: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("taker"))?; - let taker_deposit_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("taker_deposit_token_account"))?; - let taker_receive_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("taker_receive_token_account"))?; - let pda_deposit_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("pda_deposit_token_account"))?; - let initializer_receive_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("initializer_receive_token_account"))?; - let initializer_main_account: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("initializer_main_account"))?; - let escrow_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("escrow_account"))?; - let pda_account: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("pda_account"))?; - let token_program: anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("token_program"))?; - if !taker.is_signer { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSigner).with_account_name("taker")); - } - if !taker_deposit_token_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("taker_deposit_token_account")); - } - if !taker_receive_token_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("taker_receive_token_account")); - } - if !pda_deposit_token_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("pda_deposit_token_account")); - } - if !initializer_receive_token_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("initializer_receive_token_account")); - } - if !initializer_main_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("initializer_main_account")); - } - if !escrow_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow_account")); - } - if !(escrow_account.taker_amount <= - taker_deposit_token_account.amount) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("escrow_account")); - } - if !(escrow_account.initializer_deposit_token_account == - *pda_deposit_token_account.to_account_info().key) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("escrow_account")); - } - if !(escrow_account.initializer_receive_token_account == - *initializer_receive_token_account.to_account_info().key) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("escrow_account")); - } - if !(escrow_account.initializer_key == *initializer_main_account.key) - { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("escrow_account")); - } - { - if escrow_account.key() == initializer_main_account.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintClose).with_account_name("escrow_account")); - } - } - Ok(Exchange { - taker, - taker_deposit_token_account, - taker_receive_token_account, - pda_deposit_token_account, - initializer_receive_token_account, - initializer_main_account, - escrow_account, - pda_account, - token_program, - }) - } -} -#[automatically_derived] -impl<'info> anchor_lang::ToAccountInfos<'info> for Exchange<'info> where - 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.taker.to_account_infos()); - account_infos.extend(self.taker_deposit_token_account.to_account_infos()); - account_infos.extend(self.taker_receive_token_account.to_account_infos()); - account_infos.extend(self.pda_deposit_token_account.to_account_infos()); - account_infos.extend(self.initializer_receive_token_account.to_account_infos()); - account_infos.extend(self.initializer_main_account.to_account_infos()); - account_infos.extend(self.escrow_account.to_account_infos()); - account_infos.extend(self.pda_account.to_account_infos()); - account_infos.extend(self.token_program.to_account_infos()); - account_infos - } -} -#[automatically_derived] -impl<'info> anchor_lang::ToAccountMetas for Exchange<'info> { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.taker.to_account_metas(Some(true))); - account_metas.extend(self.taker_deposit_token_account.to_account_metas(None)); - account_metas.extend(self.taker_receive_token_account.to_account_metas(None)); - account_metas.extend(self.pda_deposit_token_account.to_account_metas(None)); - account_metas.extend(self.initializer_receive_token_account.to_account_metas(None)); - account_metas.extend(self.initializer_main_account.to_account_metas(None)); - account_metas.extend(self.escrow_account.to_account_metas(None)); - account_metas.extend(self.pda_account.to_account_metas(None)); - account_metas.extend(self.token_program.to_account_metas(None)); - account_metas - } -} -#[automatically_derived] -impl<'info> anchor_lang::AccountsExit<'info> for Exchange<'info> where - 'info: 'info { - fn exit(&self, program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.taker_deposit_token_account, - program_id).map_err(|e| - e.with_account_name("taker_deposit_token_account"))?; - anchor_lang::AccountsExit::exit(&self.taker_receive_token_account, - program_id).map_err(|e| - e.with_account_name("taker_receive_token_account"))?; - anchor_lang::AccountsExit::exit(&self.pda_deposit_token_account, - program_id).map_err(|e| - e.with_account_name("pda_deposit_token_account"))?; - anchor_lang::AccountsExit::exit(&self.initializer_receive_token_account, - program_id).map_err(|e| - e.with_account_name("initializer_receive_token_account"))?; - anchor_lang::AccountsExit::exit(&self.initializer_main_account, - program_id).map_err(|e| - e.with_account_name("initializer_main_account"))?; - { - let initializer_main_account = &self.initializer_main_account; - anchor_lang::AccountsClose::close(&self.escrow_account, - initializer_main_account.to_account_info()).map_err(|e| - e.with_account_name("escrow_account"))?; - } - Ok(()) - } -} -#[doc = r" An internal, Anchor generated module. This is used (as an"] -#[doc = r" implementation detail), to generate a struct for a given"] -#[doc = -r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] -#[doc = r" instead of an `AccountInfo`. This is useful for clients that want"] -#[doc = r" to generate a list of accounts, without explicitly knowing the"] -#[doc = r" order all the fields should be in."] -#[doc = r""] -#[doc = r" To access the struct in this module, one should use the sibling"] -#[doc = r" `accounts` module (also generated), which re-exports this."] -pub(crate) mod __client_accounts_exchange { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`Exchange`]."] - pub struct Exchange { - pub taker: anchor_lang::solana_program::pubkey::Pubkey, - pub taker_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub taker_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub pda_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub initializer_receive_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub initializer_main_account: anchor_lang::solana_program::pubkey::Pubkey, - pub escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - pub pda_account: anchor_lang::solana_program::pubkey::Pubkey, - pub token_program: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for Exchange where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.taker, writer)?; - borsh::BorshSerialize::serialize(&self.taker_deposit_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.taker_receive_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.pda_deposit_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.initializer_receive_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.initializer_main_account, - writer)?; - borsh::BorshSerialize::serialize(&self.escrow_account, writer)?; - borsh::BorshSerialize::serialize(&self.pda_account, writer)?; - borsh::BorshSerialize::serialize(&self.token_program, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for Exchange { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.taker, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.taker_deposit_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.taker_receive_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.pda_deposit_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.initializer_receive_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.initializer_main_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.pda_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.token_program, - false)); - account_metas - } - } -} -#[doc = r" An internal, Anchor generated module. This is used (as an"] -#[doc = r" implementation detail), to generate a CPI struct for a given"] -#[doc = r" `#[derive(Accounts)]` implementation, where each field is an"] -#[doc = r" AccountInfo."] -#[doc = r""] -#[doc = r" To access the struct in this module, one should use the sibling"] -#[doc = r" [`cpi::accounts`] module (also generated), which re-exports this."] -pub(crate) mod __cpi_client_accounts_exchange { - use super::*; - #[doc = " Generated CPI struct of the accounts for [`Exchange`]."] - pub struct Exchange<'info> { - pub taker: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub taker_deposit_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub taker_receive_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub pda_deposit_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub initializer_receive_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub initializer_main_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub pda_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub token_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for Exchange<'info> { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.taker), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.taker_deposit_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.taker_receive_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.pda_deposit_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.initializer_receive_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.initializer_main_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.pda_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.token_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for Exchange<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.taker)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.taker_deposit_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.taker_receive_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.pda_deposit_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.initializer_receive_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.initializer_main_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.pda_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.token_program)); - account_infos - } - } -} -pub struct CancelEscrow<'info> { - /// CHECK: ... - #[account(mut)] - pub initializer: AccountInfo<'info>, - #[account(mut)] - pub pda_deposit_token_account: Account<'info, TokenAccount>, - /// CHECK: ... - pub pda_account: AccountInfo<'info>, - #[account(mut, constraint = escrow_account.initializer_key == * - initializer.key, constraint = - escrow_account.initializer_deposit_token_account == * - pda_deposit_token_account.to_account_info().key, close = initializer)] - pub escrow_account: Account<'info, EscrowAccount>, - pub token_program: Program<'info, Token>, -} -#[automatically_derived] -impl<'info> anchor_lang::Accounts<'info> for CancelEscrow<'info> where - 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &[anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], - __bumps: &mut std::collections::BTreeMap, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let initializer: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("initializer"))?; - let pda_deposit_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("pda_deposit_token_account"))?; - let pda_account: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("pda_account"))?; - let escrow_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("escrow_account"))?; - let token_program: anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, __accounts, - __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("token_program"))?; - if !initializer.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("initializer")); - } - if !pda_deposit_token_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("pda_deposit_token_account")); - } - if !escrow_account.to_account_info().is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow_account")); - } - if !(escrow_account.initializer_key == *initializer.key) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("escrow_account")); - } - if !(escrow_account.initializer_deposit_token_account == - *pda_deposit_token_account.to_account_info().key) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("escrow_account")); - } - { - if escrow_account.key() == initializer.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintClose).with_account_name("escrow_account")); - } - } - Ok(CancelEscrow { - initializer, - pda_deposit_token_account, - pda_account, - escrow_account, - token_program, - }) - } -} -#[automatically_derived] -impl<'info> anchor_lang::ToAccountInfos<'info> for CancelEscrow<'info> where - 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.initializer.to_account_infos()); - account_infos.extend(self.pda_deposit_token_account.to_account_infos()); - account_infos.extend(self.pda_account.to_account_infos()); - account_infos.extend(self.escrow_account.to_account_infos()); - account_infos.extend(self.token_program.to_account_infos()); - account_infos - } -} -#[automatically_derived] -impl<'info> anchor_lang::ToAccountMetas for CancelEscrow<'info> { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.initializer.to_account_metas(None)); - account_metas.extend(self.pda_deposit_token_account.to_account_metas(None)); - account_metas.extend(self.pda_account.to_account_metas(None)); - account_metas.extend(self.escrow_account.to_account_metas(None)); - account_metas.extend(self.token_program.to_account_metas(None)); - account_metas - } -} -#[automatically_derived] -impl<'info> anchor_lang::AccountsExit<'info> for CancelEscrow<'info> where - 'info: 'info { - fn exit(&self, program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.initializer, - program_id).map_err(|e| - e.with_account_name("initializer"))?; - anchor_lang::AccountsExit::exit(&self.pda_deposit_token_account, - program_id).map_err(|e| - e.with_account_name("pda_deposit_token_account"))?; - { - let initializer = &self.initializer; - anchor_lang::AccountsClose::close(&self.escrow_account, - initializer.to_account_info()).map_err(|e| - e.with_account_name("escrow_account"))?; - } - Ok(()) - } -} -#[doc = r" An internal, Anchor generated module. This is used (as an"] -#[doc = r" implementation detail), to generate a struct for a given"] -#[doc = -r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] -#[doc = r" instead of an `AccountInfo`. This is useful for clients that want"] -#[doc = r" to generate a list of accounts, without explicitly knowing the"] -#[doc = r" order all the fields should be in."] -#[doc = r""] -#[doc = r" To access the struct in this module, one should use the sibling"] -#[doc = r" `accounts` module (also generated), which re-exports this."] -pub(crate) mod __client_accounts_cancel_escrow { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`CancelEscrow`]."] - pub struct CancelEscrow { - pub initializer: anchor_lang::solana_program::pubkey::Pubkey, - pub pda_deposit_token_account: anchor_lang::solana_program::pubkey::Pubkey, - pub pda_account: anchor_lang::solana_program::pubkey::Pubkey, - pub escrow_account: anchor_lang::solana_program::pubkey::Pubkey, - pub token_program: anchor_lang::solana_program::pubkey::Pubkey, - } - impl borsh::ser::BorshSerialize for CancelEscrow where - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize, - anchor_lang::solana_program::pubkey::Pubkey: borsh::ser::BorshSerialize - { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.initializer, writer)?; - borsh::BorshSerialize::serialize(&self.pda_deposit_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.pda_account, writer)?; - borsh::BorshSerialize::serialize(&self.escrow_account, writer)?; - borsh::BorshSerialize::serialize(&self.token_program, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for CancelEscrow { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.initializer, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.pda_deposit_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.pda_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.token_program, - false)); - account_metas - } - } -} -#[doc = r" An internal, Anchor generated module. This is used (as an"] -#[doc = r" implementation detail), to generate a CPI struct for a given"] -#[doc = r" `#[derive(Accounts)]` implementation, where each field is an"] -#[doc = r" AccountInfo."] -#[doc = r""] -#[doc = r" To access the struct in this module, one should use the sibling"] -#[doc = r" [`cpi::accounts`] module (also generated), which re-exports this."] -pub(crate) mod __cpi_client_accounts_cancel_escrow { - use super::*; - #[doc = " Generated CPI struct of the accounts for [`CancelEscrow`]."] - pub struct CancelEscrow<'info> { - pub initializer: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub pda_deposit_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub pda_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub token_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for CancelEscrow<'info> { - fn to_account_metas(&self, is_signer: Option) - -> Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.initializer), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.pda_deposit_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.pda_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.token_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for CancelEscrow<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.initializer)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.pda_deposit_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.pda_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.token_program)); - account_infos - } - } -} -pub struct EscrowAccount { - pub initializer_key: Pubkey, - pub initializer_deposit_token_account: Pubkey, - pub initializer_receive_token_account: Pubkey, - pub initializer_amount: u64, - pub taker_amount: u64, -} -impl borsh::ser::BorshSerialize for EscrowAccount where - Pubkey: borsh::ser::BorshSerialize, Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize, - u64: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.initializer_key, writer)?; - borsh::BorshSerialize::serialize(&self.initializer_deposit_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.initializer_receive_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.initializer_amount, writer)?; - borsh::BorshSerialize::serialize(&self.taker_amount, writer)?; - Ok(()) - } -} -impl borsh::de::BorshDeserialize for EscrowAccount where - Pubkey: borsh::BorshDeserialize, Pubkey: borsh::BorshDeserialize, - Pubkey: borsh::BorshDeserialize, u64: borsh::BorshDeserialize, - u64: borsh::BorshDeserialize { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self { - initializer_key: borsh::BorshDeserialize::deserialize_reader(reader)?, - initializer_deposit_token_account: borsh::BorshDeserialize::deserialize_reader(reader)?, - initializer_receive_token_account: borsh::BorshDeserialize::deserialize_reader(reader)?, - initializer_amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - taker_amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } -} -#[automatically_derived] -impl ::core::clone::Clone for EscrowAccount { - #[inline] - fn clone(&self) -> EscrowAccount { - EscrowAccount { - initializer_key: ::core::clone::Clone::clone(&self.initializer_key), - initializer_deposit_token_account: ::core::clone::Clone::clone(&self.initializer_deposit_token_account), - initializer_receive_token_account: ::core::clone::Clone::clone(&self.initializer_receive_token_account), - initializer_amount: ::core::clone::Clone::clone(&self.initializer_amount), - taker_amount: ::core::clone::Clone::clone(&self.taker_amount), - } - } -} -#[automatically_derived] -impl anchor_lang::AccountSerialize for EscrowAccount { - fn try_serialize(&self, writer: &mut W) - -> anchor_lang::Result<()> { - if writer.write_all(&[36, 69, 48, 18, 128, 225, 125, 135]).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - if AnchorSerialize::serialize(self, writer).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - Ok(()) - } -} -#[automatically_derived] -impl anchor_lang::AccountDeserialize for EscrowAccount { - fn try_deserialize(buf: &mut &[u8]) -> anchor_lang::Result { - if buf.len() < [36, 69, 48, 18, 128, 225, 125, 135].len() { - return Err(anchor_lang::error::ErrorCode::AccountDiscriminatorNotFound.into()); - } - let given_disc = &buf[..8]; - if &[36, 69, 48, 18, 128, 225, 125, 135] != given_disc { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.name(), - error_code_number: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.into(), - error_msg: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/escrow/src/lib.rs", - line: 189u32, - })), - compared_values: None, - }).with_account_name("EscrowAccount")); - } - Self::try_deserialize_unchecked(buf) - } - fn try_deserialize_unchecked(buf: &mut &[u8]) - -> anchor_lang::Result { - let mut data: &[u8] = &buf[8..]; - AnchorDeserialize::deserialize(&mut data).map_err(|_| - anchor_lang::error::ErrorCode::AccountDidNotDeserialize.into()) - } -} -#[automatically_derived] -impl anchor_lang::Discriminator for EscrowAccount { - const DISCRIMINATOR: [u8; 8] = [36, 69, 48, 18, 128, 225, 125, 135]; -} -#[automatically_derived] -impl anchor_lang::Owner for EscrowAccount { - fn owner() -> Pubkey { crate::ID } -} -impl EscrowAccount { - pub const LEN: usize = 32 + 32 + 32 + 8 + 8; -} -impl<'info> From<&mut InitializeEscrow<'info>> for - CpiContext<'_, '_, '_, 'info, SetAuthority<'info>> { - fn from(accounts: &mut InitializeEscrow<'info>) -> Self { - let cpi_accounts = - SetAuthority { - account_or_mint: accounts.initializer_deposit_token_account.to_account_info().clone(), - current_authority: accounts.initializer.to_account_info().clone(), - }; - let cpi_program = accounts.token_program.to_account_info(); - CpiContext::new(cpi_program, cpi_accounts) - } -} -impl<'info> CancelEscrow<'info> { - fn into_set_authority_context(&self) - -> CpiContext<'_, '_, '_, 'info, SetAuthority<'info>> { - let cpi_accounts = - SetAuthority { - account_or_mint: self.pda_deposit_token_account.to_account_info().clone(), - current_authority: self.pda_account.clone(), - }; - let cpi_program = self.token_program.to_account_info(); - CpiContext::new(cpi_program, cpi_accounts) - } -} -impl<'info> Exchange<'info> { - fn into_set_authority_context(&self) - -> CpiContext<'_, '_, '_, 'info, SetAuthority<'info>> { - let cpi_accounts = - SetAuthority { - account_or_mint: self.pda_deposit_token_account.to_account_info().clone(), - current_authority: self.pda_account.clone(), - }; - let cpi_program = self.token_program.to_account_info(); - CpiContext::new(cpi_program, cpi_accounts) - } -} -impl<'info> Exchange<'info> { - fn into_transfer_to_taker_context(&self) - -> CpiContext<'_, '_, '_, 'info, Transfer<'info>> { - let cpi_accounts = - Transfer { - from: self.pda_deposit_token_account.to_account_info().clone(), - to: self.taker_receive_token_account.to_account_info().clone(), - authority: self.pda_account.clone(), - }; - let cpi_program = self.token_program.to_account_info(); - CpiContext::new(cpi_program, cpi_accounts) - } -} -impl<'info> Exchange<'info> { - fn into_transfer_to_initializer_context(&self) - -> CpiContext<'_, '_, '_, 'info, Transfer<'info>> { - let cpi_accounts = - Transfer { - from: self.taker_deposit_token_account.to_account_info().clone(), - to: self.initializer_receive_token_account.to_account_info().clone(), - authority: self.taker.clone(), - }; - let cpi_program = self.token_program.to_account_info(); - CpiContext::new(cpi_program, cpi_accounts) - } -} diff --git a/crates/client/tests/test_data/expanded_source_codes/expanded_fuzz_example3.rs b/crates/client/tests/test_data/expanded_source_codes/expanded_fuzz_example3.rs deleted file mode 100644 index 5a62601f..00000000 --- a/crates/client/tests/test_data/expanded_source_codes/expanded_fuzz_example3.rs +++ /dev/null @@ -1,3138 +0,0 @@ -#![feature(prelude_import)] -#[prelude_import] -use std::prelude::rust_2021::*; -#[macro_use] -extern crate std; -use anchor_lang::prelude::*; - -mod error { - - use anchor_lang::prelude::*; - #[repr(u32)] - pub enum VestingError { - InvalidAmount, - InvalidTimeRange, - InvalidInterval, - Overflow, - Underflow, - } - #[automatically_derived] - impl ::core::fmt::Debug for VestingError { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, - match self { - VestingError::InvalidAmount => "InvalidAmount", - VestingError::InvalidTimeRange => "InvalidTimeRange", - VestingError::InvalidInterval => "InvalidInterval", - VestingError::Overflow => "Overflow", - VestingError::Underflow => "Underflow", - }) - } - } - #[automatically_derived] - impl ::core::clone::Clone for VestingError { - #[inline] - fn clone(&self) -> VestingError { *self } - } - #[automatically_derived] - impl ::core::marker::Copy for VestingError { } - impl VestingError { - #[doc = r" Gets the name of this [#enum_name]."] - pub fn name(&self) -> String { - match self { - VestingError::InvalidAmount => "InvalidAmount".to_string(), - VestingError::InvalidTimeRange => - "InvalidTimeRange".to_string(), - VestingError::InvalidInterval => - "InvalidInterval".to_string(), - VestingError::Overflow => "Overflow".to_string(), - VestingError::Underflow => "Underflow".to_string(), - } - } - } - impl From for u32 { - fn from(e: VestingError) -> u32 { - e as u32 + anchor_lang::error::ERROR_CODE_OFFSET - } - } - impl From for anchor_lang::error::Error { - fn from(error_code: VestingError) -> anchor_lang::error::Error { - anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: error_code.name(), - error_code_number: error_code.into(), - error_msg: error_code.to_string(), - error_origin: None, - compared_values: None, - }) - } - } - impl std::fmt::Display for VestingError { - fn fmt(&self, fmt: &mut std::fmt::Formatter<'_>) - -> std::result::Result<(), std::fmt::Error> { - match self { - VestingError::InvalidAmount => - ::fmt(self, fmt), - VestingError::InvalidTimeRange => - ::fmt(self, fmt), - VestingError::InvalidInterval => - ::fmt(self, fmt), - VestingError::Overflow => - ::fmt(self, fmt), - VestingError::Underflow => - ::fmt(self, fmt), - } - } - } -} -mod instructions { - pub mod initialize { - use anchor_lang::prelude::*; - use anchor_spl::token::{ - set_authority, transfer, Mint, SetAuthority, Token, TokenAccount, - Transfer, - }; - use crate::state::Escrow; - use crate::VestingError; - pub fn _init_vesting(ctx: Context, recipient: Pubkey, - amount: u64, start_at: u64, end_at: u64, interval: u64) - -> Result<()> { - let escrow = &mut ctx.accounts.escrow; - if !(amount > 0) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: VestingError::InvalidAmount.name(), - error_code_number: VestingError::InvalidAmount.into(), - error_msg: VestingError::InvalidAmount.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/instructions/initialize.rs", - line: 18u32, - })), - compared_values: None, - })); - }; - if !(end_at > start_at) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: VestingError::InvalidTimeRange.name(), - error_code_number: VestingError::InvalidTimeRange.into(), - error_msg: VestingError::InvalidTimeRange.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/instructions/initialize.rs", - line: 20u32, - })), - compared_values: None, - })); - }; - if !(end_at - start_at > interval) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: VestingError::InvalidInterval.name(), - error_code_number: VestingError::InvalidInterval.into(), - error_msg: VestingError::InvalidInterval.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/instructions/initialize.rs", - line: 22u32, - })), - compared_values: None, - })); - }; - if !(interval > 0) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: VestingError::InvalidInterval.name(), - error_code_number: VestingError::InvalidInterval.into(), - error_msg: VestingError::InvalidInterval.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/instructions/initialize.rs", - line: 23u32, - })), - compared_values: None, - })); - }; - escrow.amount = amount; - escrow.start_time = start_at; - escrow.end_time = end_at; - escrow.interval = interval; - escrow.recipient = recipient; - escrow.bump = ctx.bumps.escrow; - let (escrow_pda_authority, _) = - Pubkey::find_program_address(&[b"ESCROW_PDA_AUTHORITY"], - ctx.program_id); - set_authority(CpiContext::new(ctx.accounts.token_program.to_account_info(), - SetAuthority { - account_or_mint: ctx.accounts.escrow_token_account.to_account_info(), - current_authority: ctx.accounts.sender.to_account_info(), - }), - anchor_spl::token::spl_token::instruction::AuthorityType::AccountOwner, - Some(escrow_pda_authority))?; - transfer(CpiContext::new(ctx.accounts.token_program.to_account_info(), - Transfer { - from: ctx.accounts.sender_token_account.to_account_info(), - to: ctx.accounts.escrow_token_account.to_account_info(), - authority: ctx.accounts.sender.to_account_info(), - }), amount)?; - Ok(()) - } - #[instruction(recipient: Pubkey)] - pub struct InitVesting<'info> { - #[account(mut)] - pub sender: Signer<'info>, - #[account(mut, token::authority = sender, token::mint = mint)] - pub sender_token_account: Account<'info, TokenAccount>, - #[account(init, payer = sender, space = 8 + 1 + 32 + 5*8, seeds = - [recipient.as_ref(),b"ESCROW_SEED"], bump)] - pub escrow: Account<'info, Escrow>, - #[account(mut, token::mint = mint)] - pub escrow_token_account: Account<'info, TokenAccount>, - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, InitVestingBumps> for - InitVesting<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut InitVestingBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let mut __ix_data = __ix_data; - struct __Args { - recipient: Pubkey, - } - impl borsh::ser::BorshSerialize for __Args where - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.recipient, writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for __Args where - Pubkey: borsh::BorshDeserialize { - fn deserialize_reader(reader: - &mut R) - -> - ::core::result::Result { - Ok(Self { - recipient: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - let __Args { recipient } = - __Args::deserialize(&mut __ix_data).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let sender: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("sender"))?; - let sender_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("sender_token_account"))?; - if __accounts.is_empty() { - return Err(anchor_lang::error::ErrorCode::AccountNotEnoughKeys.into()); - } - let escrow = &__accounts[0]; - *__accounts = &__accounts[1..]; - let escrow_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("escrow_token_account"))?; - let mint: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("mint"))?; - let token_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("token_program"))?; - let system_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - let __anchor_rent = Rent::get()?; - let (__pda_address, __bump) = - Pubkey::find_program_address(&[recipient.as_ref(), - b"ESCROW_SEED"], __program_id); - __bumps.escrow = __bump; - if escrow.key() != __pda_address { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSeeds).with_account_name("escrow").with_pubkeys((escrow.key(), - __pda_address))); - } - let escrow = - { - let actual_field = AsRef::::as_ref(&escrow); - let actual_owner = actual_field.owner; - let space = 8 + 1 + 32 + 5 * 8; - let pa: anchor_lang::accounts::account::Account = - if !false || - actual_owner == - &anchor_lang::solana_program::system_program::ID { - let __current_lamports = escrow.lamports(); - if __current_lamports == 0 { - let space = space; - let lamports = __anchor_rent.minimum_balance(space); - let cpi_accounts = - anchor_lang::system_program::CreateAccount { - from: sender.to_account_info(), - to: escrow.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::create_account(cpi_context.with_signer(&[&[recipient.as_ref(), - b"ESCROW_SEED", &[__bump][..]][..]]), lamports, - space as u64, __program_id)?; - } else { - if sender.key() == escrow.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::TryingToInitPayerAsProgramAccount.name(), - error_code_number: anchor_lang::error::ErrorCode::TryingToInitPayerAsProgramAccount.into(), - error_msg: anchor_lang::error::ErrorCode::TryingToInitPayerAsProgramAccount.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/instructions/initialize.rs", - line: 64u32, - })), - compared_values: None, - }).with_pubkeys((sender.key(), escrow.key()))); - }; - let required_lamports = - __anchor_rent.minimum_balance(space).max(1).saturating_sub(__current_lamports); - if required_lamports > 0 { - let cpi_accounts = - anchor_lang::system_program::Transfer { - from: sender.to_account_info(), - to: escrow.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::transfer(cpi_context, - required_lamports)?; - } - let cpi_accounts = - anchor_lang::system_program::Allocate { - account_to_allocate: escrow.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::allocate(cpi_context.with_signer(&[&[recipient.as_ref(), - b"ESCROW_SEED", &[__bump][..]][..]]), space as u64)?; - let cpi_accounts = - anchor_lang::system_program::Assign { - account_to_assign: escrow.to_account_info(), - }; - let cpi_context = - anchor_lang::context::CpiContext::new(system_program.to_account_info(), - cpi_accounts); - anchor_lang::system_program::assign(cpi_context.with_signer(&[&[recipient.as_ref(), - b"ESCROW_SEED", &[__bump][..]][..]]), __program_id)?; - } - match anchor_lang::accounts::account::Account::try_from_unchecked(&escrow) - { - Ok(val) => val, - Err(e) => return Err(e.with_account_name("escrow")), - } - } else { - match anchor_lang::accounts::account::Account::try_from(&escrow) - { - Ok(val) => val, - Err(e) => return Err(e.with_account_name("escrow")), - } - }; - if false { - if space != actual_field.data_len() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSpace).with_account_name("escrow").with_values((space, - actual_field.data_len()))); - } - if actual_owner != __program_id { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintOwner).with_account_name("escrow").with_pubkeys((*actual_owner, - *__program_id))); - } - { - let required_lamports = - __anchor_rent.minimum_balance(space); - if pa.to_account_info().lamports() < required_lamports { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRentExempt).with_account_name("escrow")); - } - } - } - pa - }; - if !AsRef::::as_ref(&escrow).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow")); - } - if !__anchor_rent.is_exempt(escrow.to_account_info().lamports(), - escrow.to_account_info().try_data_len()?) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRentExempt).with_account_name("escrow")); - } - if !AsRef::::as_ref(&sender).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("sender")); - } - if !AsRef::::as_ref(&sender_token_account).is_writable - { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("sender_token_account")); - } - { - if sender_token_account.owner != sender.key() { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenOwner.into()); - } - if sender_token_account.mint != mint.key() { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenMint.into()); - } - } - if !AsRef::::as_ref(&escrow_token_account).is_writable - { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow_token_account")); - } - { - if escrow_token_account.mint != mint.key() { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenMint.into()); - } - } - Ok(InitVesting { - sender, - sender_token_account, - escrow, - escrow_token_account, - mint, - token_program, - system_program, - }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for InitVesting<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.sender.to_account_infos()); - account_infos.extend(self.sender_token_account.to_account_infos()); - account_infos.extend(self.escrow.to_account_infos()); - account_infos.extend(self.escrow_token_account.to_account_infos()); - account_infos.extend(self.mint.to_account_infos()); - account_infos.extend(self.token_program.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for InitVesting<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.sender.to_account_metas(None)); - account_metas.extend(self.sender_token_account.to_account_metas(None)); - account_metas.extend(self.escrow.to_account_metas(None)); - account_metas.extend(self.escrow_token_account.to_account_metas(None)); - account_metas.extend(self.mint.to_account_metas(None)); - account_metas.extend(self.token_program.to_account_metas(None)); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for InitVesting<'info> - where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.sender, - program_id).map_err(|e| e.with_account_name("sender"))?; - anchor_lang::AccountsExit::exit(&self.sender_token_account, - program_id).map_err(|e| - e.with_account_name("sender_token_account"))?; - anchor_lang::AccountsExit::exit(&self.escrow, - program_id).map_err(|e| e.with_account_name("escrow"))?; - anchor_lang::AccountsExit::exit(&self.escrow_token_account, - program_id).map_err(|e| - e.with_account_name("escrow_token_account"))?; - Ok(()) - } - } - pub struct InitVestingBumps { - pub escrow: u8, - } - #[automatically_derived] - impl ::core::fmt::Debug for InitVestingBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish(f, - "InitVestingBumps", "escrow", &&self.escrow) - } - } - impl Default for InitVestingBumps { - fn default() -> Self { InitVestingBumps { escrow: u8::MAX } } - } - impl<'info> anchor_lang::Bumps for InitVesting<'info> where - 'info: 'info { - type Bumps = InitVestingBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_init_vesting { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`InitVesting`]."] - pub struct InitVesting { - pub sender: Pubkey, - pub sender_token_account: Pubkey, - pub escrow: Pubkey, - pub escrow_token_account: Pubkey, - pub mint: Pubkey, - pub token_program: Pubkey, - pub system_program: Pubkey, - } - impl borsh::ser::BorshSerialize for InitVesting where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.sender, writer)?; - borsh::BorshSerialize::serialize(&self.sender_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.escrow, writer)?; - borsh::BorshSerialize::serialize(&self.escrow_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.mint, writer)?; - borsh::BorshSerialize::serialize(&self.token_program, - writer)?; - borsh::BorshSerialize::serialize(&self.system_program, - writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for InitVesting { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.sender, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.sender_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.mint, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.token_program, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_init_vesting { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`InitVesting`]."] - pub struct InitVesting<'info> { - pub sender: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub sender_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub mint: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub token_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for InitVesting<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.sender), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.sender_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.mint), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.token_program), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - InitVesting<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.sender)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.sender_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.mint)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.token_program)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos - } - } - } - } - pub mod withdraw { - use anchor_lang::prelude::*; - use anchor_spl::token::{ - transfer, Mint, Token, TokenAccount, Transfer, - }; - use crate::{state::Escrow, VestingError}; - pub fn _withdraw_unlocked(ctx: Context) -> Result<()> { - let escrow = &mut ctx.accounts.escrow; - let current_time = Clock::get()?.unix_timestamp as u64; - let unlocked_amount = - escrow.amount_unlocked(current_time).ok_or(VestingError::InvalidAmount)?; - let seeds = - &[b"ESCROW_PDA_AUTHORITY".as_ref(), - &[ctx.bumps.escrow_pda_authority]]; - transfer(CpiContext::new(ctx.accounts.token_program.to_account_info(), - Transfer { - from: ctx.accounts.escrow_token_account.to_account_info(), - to: ctx.accounts.recipient_token_account.to_account_info(), - authority: ctx.accounts.escrow_pda_authority.to_account_info(), - }).with_signer(&[&seeds[..]]), unlocked_amount)?; - escrow.withdrawal += unlocked_amount; - Ok(()) - } - pub struct Withdraw<'info> { - #[account(mut)] - pub recipient: Signer<'info>, - #[account(mut, token::mint = mint, token::authority = recipient)] - pub recipient_token_account: Account<'info, TokenAccount>, - #[account(mut, has_one = recipient, close = recipient, seeds = - [escrow.recipient.key().as_ref(),b"ESCROW_SEED"], bump = - escrow.bump)] - pub escrow: Account<'info, Escrow>, - #[account(mut, token::mint = mint, token::authority = - escrow_pda_authority)] - pub escrow_token_account: Account<'info, TokenAccount>, - /// CHECK: we do not read or write to this account - #[account(seeds = [b"ESCROW_PDA_AUTHORITY"], bump)] - pub escrow_pda_authority: AccountInfo<'info>, - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, WithdrawBumps> for - Withdraw<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut WithdrawBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let recipient: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("recipient"))?; - let recipient_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("recipient_token_account"))?; - let escrow: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("escrow"))?; - let escrow_token_account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("escrow_token_account"))?; - let escrow_pda_authority: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("escrow_pda_authority"))?; - let mint: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("mint"))?; - let token_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("token_program"))?; - let system_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - if !AsRef::::as_ref(&recipient).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("recipient")); - } - if !AsRef::::as_ref(&recipient_token_account).is_writable - { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("recipient_token_account")); - } - { - if recipient_token_account.owner != recipient.key() { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenOwner.into()); - } - if recipient_token_account.mint != mint.key() { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenMint.into()); - } - } - let __pda_address = - Pubkey::create_program_address(&[escrow.recipient.key().as_ref(), - b"ESCROW_SEED", &[escrow.bump][..]], - &__program_id).map_err(|_| - anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSeeds).with_account_name("escrow"))?; - if escrow.key() != __pda_address { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSeeds).with_account_name("escrow").with_pubkeys((escrow.key(), - __pda_address))); - } - if !AsRef::::as_ref(&escrow).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow")); - } - { - let my_key = escrow.recipient; - let target_key = recipient.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("escrow").with_pubkeys((my_key, - target_key))); - } - } - { - if escrow.key() == recipient.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintClose).with_account_name("escrow")); - } - } - if !AsRef::::as_ref(&escrow_token_account).is_writable - { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("escrow_token_account")); - } - { - if escrow_token_account.owner != escrow_pda_authority.key() - { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenOwner.into()); - } - if escrow_token_account.mint != mint.key() { - return Err(anchor_lang::error::ErrorCode::ConstraintTokenMint.into()); - } - } - let (__pda_address, __bump) = - Pubkey::find_program_address(&[b"ESCROW_PDA_AUTHORITY"], - &__program_id); - __bumps.escrow_pda_authority = __bump; - if escrow_pda_authority.key() != __pda_address { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSeeds).with_account_name("escrow_pda_authority").with_pubkeys((escrow_pda_authority.key(), - __pda_address))); - } - Ok(Withdraw { - recipient, - recipient_token_account, - escrow, - escrow_token_account, - escrow_pda_authority, - mint, - token_program, - system_program, - }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for Withdraw<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.recipient.to_account_infos()); - account_infos.extend(self.recipient_token_account.to_account_infos()); - account_infos.extend(self.escrow.to_account_infos()); - account_infos.extend(self.escrow_token_account.to_account_infos()); - account_infos.extend(self.escrow_pda_authority.to_account_infos()); - account_infos.extend(self.mint.to_account_infos()); - account_infos.extend(self.token_program.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for Withdraw<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.recipient.to_account_metas(None)); - account_metas.extend(self.recipient_token_account.to_account_metas(None)); - account_metas.extend(self.escrow.to_account_metas(None)); - account_metas.extend(self.escrow_token_account.to_account_metas(None)); - account_metas.extend(self.escrow_pda_authority.to_account_metas(None)); - account_metas.extend(self.mint.to_account_metas(None)); - account_metas.extend(self.token_program.to_account_metas(None)); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for Withdraw<'info> where - 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.recipient, - program_id).map_err(|e| e.with_account_name("recipient"))?; - anchor_lang::AccountsExit::exit(&self.recipient_token_account, - program_id).map_err(|e| - e.with_account_name("recipient_token_account"))?; - { - let recipient = &self.recipient; - anchor_lang::AccountsClose::close(&self.escrow, - recipient.to_account_info()).map_err(|e| - e.with_account_name("escrow"))?; - } - anchor_lang::AccountsExit::exit(&self.escrow_token_account, - program_id).map_err(|e| - e.with_account_name("escrow_token_account"))?; - Ok(()) - } - } - pub struct WithdrawBumps { - pub escrow_pda_authority: u8, - } - #[automatically_derived] - impl ::core::fmt::Debug for WithdrawBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish(f, - "WithdrawBumps", "escrow_pda_authority", - &&self.escrow_pda_authority) - } - } - impl Default for WithdrawBumps { - fn default() -> Self { - WithdrawBumps { escrow_pda_authority: u8::MAX } - } - } - impl<'info> anchor_lang::Bumps for Withdraw<'info> where 'info: 'info - { - type Bumps = WithdrawBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_withdraw { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`Withdraw`]."] - pub struct Withdraw { - pub recipient: Pubkey, - pub recipient_token_account: Pubkey, - pub escrow: Pubkey, - pub escrow_token_account: Pubkey, - pub escrow_pda_authority: Pubkey, - pub mint: Pubkey, - pub token_program: Pubkey, - pub system_program: Pubkey, - } - impl borsh::ser::BorshSerialize for Withdraw where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.recipient, writer)?; - borsh::BorshSerialize::serialize(&self.recipient_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.escrow, writer)?; - borsh::BorshSerialize::serialize(&self.escrow_token_account, - writer)?; - borsh::BorshSerialize::serialize(&self.escrow_pda_authority, - writer)?; - borsh::BorshSerialize::serialize(&self.mint, writer)?; - borsh::BorshSerialize::serialize(&self.token_program, - writer)?; - borsh::BorshSerialize::serialize(&self.system_program, - writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for Withdraw { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.recipient, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.recipient_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.escrow_token_account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.escrow_pda_authority, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.mint, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.token_program, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_withdraw { - use super::*; - #[doc = " Generated CPI struct of the accounts for [`Withdraw`]."] - pub struct Withdraw<'info> { - pub recipient: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub recipient_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow_token_account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub escrow_pda_authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub mint: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub token_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for Withdraw<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.recipient), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.recipient_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.escrow_token_account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.escrow_pda_authority), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.mint), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.token_program), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for Withdraw<'info> - { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.recipient)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.recipient_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow_token_account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.escrow_pda_authority)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.mint)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.token_program)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos - } - } - } - } - pub use initialize::*; - pub use withdraw::*; -} -pub mod state { - use anchor_lang::prelude::*; - pub struct Escrow { - pub recipient: Pubkey, - pub amount: u64, - pub withdrawal: u64, - pub start_time: u64, - pub end_time: u64, - pub interval: u64, - pub bump: u8, - } - impl borsh::ser::BorshSerialize for Escrow where - Pubkey: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize, - u64: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize, - u64: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize, - u8: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.recipient, writer)?; - borsh::BorshSerialize::serialize(&self.amount, writer)?; - borsh::BorshSerialize::serialize(&self.withdrawal, writer)?; - borsh::BorshSerialize::serialize(&self.start_time, writer)?; - borsh::BorshSerialize::serialize(&self.end_time, writer)?; - borsh::BorshSerialize::serialize(&self.interval, writer)?; - borsh::BorshSerialize::serialize(&self.bump, writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for Escrow where - Pubkey: borsh::BorshDeserialize, u64: borsh::BorshDeserialize, - u64: borsh::BorshDeserialize, u64: borsh::BorshDeserialize, - u64: borsh::BorshDeserialize, u64: borsh::BorshDeserialize, - u8: borsh::BorshDeserialize { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self { - recipient: borsh::BorshDeserialize::deserialize_reader(reader)?, - amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - withdrawal: borsh::BorshDeserialize::deserialize_reader(reader)?, - start_time: borsh::BorshDeserialize::deserialize_reader(reader)?, - end_time: borsh::BorshDeserialize::deserialize_reader(reader)?, - interval: borsh::BorshDeserialize::deserialize_reader(reader)?, - bump: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - #[automatically_derived] - impl ::core::clone::Clone for Escrow { - #[inline] - fn clone(&self) -> Escrow { - Escrow { - recipient: ::core::clone::Clone::clone(&self.recipient), - amount: ::core::clone::Clone::clone(&self.amount), - withdrawal: ::core::clone::Clone::clone(&self.withdrawal), - start_time: ::core::clone::Clone::clone(&self.start_time), - end_time: ::core::clone::Clone::clone(&self.end_time), - interval: ::core::clone::Clone::clone(&self.interval), - bump: ::core::clone::Clone::clone(&self.bump), - } - } - } - #[automatically_derived] - impl anchor_lang::AccountSerialize for Escrow { - fn try_serialize(&self, writer: &mut W) - -> anchor_lang::Result<()> { - if writer.write_all(&[31, 213, 123, 187, 186, 22, 218, - 155]).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - if AnchorSerialize::serialize(self, writer).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::AccountDeserialize for Escrow { - fn try_deserialize(buf: &mut &[u8]) -> anchor_lang::Result { - if buf.len() < [31, 213, 123, 187, 186, 22, 218, 155].len() { - return Err(anchor_lang::error::ErrorCode::AccountDiscriminatorNotFound.into()); - } - let given_disc = &buf[..8]; - if &[31, 213, 123, 187, 186, 22, 218, 155] != given_disc { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.name(), - error_code_number: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.into(), - error_msg: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/state.rs", - line: 3u32, - })), - compared_values: None, - }).with_account_name("Escrow")); - } - Self::try_deserialize_unchecked(buf) - } - fn try_deserialize_unchecked(buf: &mut &[u8]) - -> anchor_lang::Result { - let mut data: &[u8] = &buf[8..]; - AnchorDeserialize::deserialize(&mut data).map_err(|_| - anchor_lang::error::ErrorCode::AccountDidNotDeserialize.into()) - } - } - #[automatically_derived] - impl anchor_lang::Discriminator for Escrow { - const DISCRIMINATOR: [u8; 8] = [31, 213, 123, 187, 186, 22, 218, 155]; - } - #[automatically_derived] - impl anchor_lang::Owner for Escrow { - fn owner() -> Pubkey { crate::ID } - } - impl Escrow { - pub fn amount_unlocked(&self, now: u64) -> Option { - let time = if now < self.end_time { now } else { self.end_time }; - let duration = self.end_time.checked_sub(self.start_time)?; - let interval_amount = - self.amount.checked_mul(self.interval)?.checked_div(duration)?; - let nr_intervals = - time.checked_sub(self.start_time)?.checked_div(self.interval)?.checked_add(1)?; - nr_intervals.checked_mul(interval_amount)?.checked_sub(self.withdrawal) - } - } -} -use crate::instructions::*; -pub use error::*; -#[doc = r" The static program ID"] -pub static ID: anchor_lang::solana_program::pubkey::Pubkey = - anchor_lang::solana_program::pubkey::Pubkey::new_from_array([222u8, 219u8, - 96u8, 222u8, 150u8, 129u8, 32u8, 71u8, 184u8, 221u8, 54u8, - 221u8, 224u8, 97u8, 103u8, 133u8, 11u8, 126u8, 234u8, 11u8, - 186u8, 25u8, 119u8, 161u8, 48u8, 137u8, 77u8, 249u8, 144u8, - 153u8, 133u8, 92u8]); -#[doc = r" Confirms that a given pubkey is equivalent to the program ID"] -pub fn check_id(id: &anchor_lang::solana_program::pubkey::Pubkey) -> bool { - id == &ID -} -#[doc = r" Returns the program ID"] -pub fn id() -> anchor_lang::solana_program::pubkey::Pubkey { ID } -use self::fuzz_example3::*; -/// # Safety -#[no_mangle] -pub unsafe extern "C" fn entrypoint(input: *mut u8) -> u64 { - let (program_id, accounts, instruction_data) = - unsafe { ::solana_program::entrypoint::deserialize(input) }; - match entry(&program_id, &accounts, &instruction_data) { - Ok(()) => ::solana_program::entrypoint::SUCCESS, - Err(error) => error.into(), - } -} -#[doc = -r" The Anchor codegen exposes a programming model where a user defines"] -#[doc = r" a set of methods inside of a `#[program]` module in a way similar"] -#[doc = -r" to writing RPC request handlers. The macro then generates a bunch of"] -#[doc = -r" code wrapping these user defined methods into something that can be"] -#[doc = r" executed on Solana."] -#[doc = r""] -#[doc = r" These methods fall into one category for now."] -#[doc = r""] -#[doc = r" Global methods - regular methods inside of the `#[program]`."] -#[doc = r""] -#[doc = r" Care must be taken by the codegen to prevent collisions between"] -#[doc = -r" methods in these different namespaces. For this reason, Anchor uses"] -#[doc = r" a variant of sighash to perform method dispatch, rather than"] -#[doc = r" something like a simple enum variant discriminator."] -#[doc = r""] -#[doc = r" The execution flow of the generated code can be roughly outlined:"] -#[doc = r""] -#[doc = r" * Start program via the entrypoint."] -#[doc = -r" * Strip method identifier off the first 8 bytes of the instruction"] -#[doc = r" data and invoke the identified method. The method identifier"] -#[doc = -r" is a variant of sighash. See docs.rs for `anchor_lang` for details."] -#[doc = r" * If the method identifier is an IDL identifier, execute the IDL"] -#[doc = r" instructions, which are a special set of hardcoded instructions"] -#[doc = r" baked into every Anchor program. Then exit."] -#[doc = r" * Otherwise, the method identifier is for a user defined"] -#[doc = r" instruction, i.e., one of the methods in the user defined"] -#[doc = r" `#[program]` module. Perform method dispatch, i.e., execute the"] -#[doc = r" big match statement mapping method identifier to method handler"] -#[doc = r" wrapper."] -#[doc = r" * Run the method handler wrapper. This wraps the code the user"] -#[doc = r" actually wrote, deserializing the accounts, constructing the"] -#[doc = r" context, invoking the user's code, and finally running the exit"] -#[doc = r" routine, which typically persists account changes."] -#[doc = r""] -#[doc = r" The `entry` function here, defines the standard entry to a Solana"] -#[doc = r" program, where execution begins."] -pub fn entry<'info>(program_id: &Pubkey, - accounts: &'info [AccountInfo<'info>], data: &[u8]) - -> anchor_lang::solana_program::entrypoint::ProgramResult { - try_entry(program_id, accounts, data).map_err(|e| { e.log(); e.into() }) -} -fn try_entry<'info>(program_id: &Pubkey, - accounts: &'info [AccountInfo<'info>], data: &[u8]) - -> anchor_lang::Result<()> { - if *program_id != ID { - return Err(anchor_lang::error::ErrorCode::DeclaredProgramIdMismatch.into()); - } - if data.len() < 8 { - return Err(anchor_lang::error::ErrorCode::InstructionMissing.into()); - } - dispatch(program_id, accounts, data) -} -#[doc = r" Module representing the program."] -pub mod program { - use super::*; - #[doc = r" Type representing the program."] - pub struct FuzzExample3; - #[automatically_derived] - impl ::core::clone::Clone for FuzzExample3 { - #[inline] - fn clone(&self) -> FuzzExample3 { FuzzExample3 } - } - impl anchor_lang::Id for FuzzExample3 { - fn id() -> Pubkey { ID } - } -} -#[doc = r" Performs method dispatch."] -#[doc = r""] -#[doc = -r" Each method in an anchor program is uniquely defined by a namespace"] -#[doc = r" and a rust identifier (i.e., the name given to the method). These"] -#[doc = r" two pieces can be combined to creater a method identifier,"] -#[doc = r" specifically, Anchor uses"] -#[doc = r""] -#[doc = r#" Sha256(":")[..8],"#] -#[doc = r""] -#[doc = r#" where the namespace can be one type. "global" for a"#] -#[doc = r" regular instruction."] -#[doc = r""] -#[doc = r" With this 8 byte identifier, Anchor performs method dispatch,"] -#[doc = r" matching the given 8 byte identifier to the associated method"] -#[doc = -r" handler, which leads to user defined code being eventually invoked."] -fn dispatch<'info>(program_id: &Pubkey, accounts: &'info [AccountInfo<'info>], - data: &[u8]) -> anchor_lang::Result<()> { - let mut ix_data: &[u8] = data; - let sighash: [u8; 8] = - { - let mut sighash: [u8; 8] = [0; 8]; - sighash.copy_from_slice(&ix_data[..8]); - ix_data = &ix_data[8..]; - sighash - }; - use anchor_lang::Discriminator; - match sighash { - instruction::InitVesting::DISCRIMINATOR => { - __private::__global::init_vesting(program_id, accounts, ix_data) - } - instruction::WithdrawUnlocked::DISCRIMINATOR => { - __private::__global::withdraw_unlocked(program_id, accounts, - ix_data) - } - instruction::WithdrawDummy::DISCRIMINATOR => { - __private::__global::withdraw_dummy(program_id, accounts, ix_data) - } - anchor_lang::idl::IDL_IX_TAG_LE => { - - #[cfg(not(feature = "no-idl"))] - { - __private::__idl::__idl_dispatch(program_id, accounts, - &ix_data) - } - } - anchor_lang::event::EVENT_IX_TAG_LE => { - Err(anchor_lang::error::ErrorCode::EventInstructionStub.into()) - } - _ => { - Err(anchor_lang::error::ErrorCode::InstructionFallbackNotFound.into()) - } - } -} -#[doc = r" Create a private module to not clutter the program's namespace."] -#[doc = r" Defines an entrypoint for each individual instruction handler"] -#[doc = r" wrapper."] -mod __private { - use super::*; - #[doc = - r" __idl mod defines handlers for injected Anchor IDL instructions."] - pub mod __idl { - use super::*; - #[inline(never)] - #[cfg(not(feature = "no-idl"))] - pub fn __idl_dispatch<'info>(program_id: &Pubkey, - accounts: &'info [AccountInfo<'info>], idl_ix_data: &[u8]) - -> anchor_lang::Result<()> { - let mut accounts = accounts; - let mut data: &[u8] = idl_ix_data; - let ix = - anchor_lang::idl::IdlInstruction::deserialize(&mut data).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - match ix { - anchor_lang::idl::IdlInstruction::Create { data_len } => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlCreateAccounts::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_create_account(program_id, &mut accounts, data_len)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::Resize { data_len } => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlResizeAccount::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_resize_account(program_id, &mut accounts, data_len)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::Close => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlCloseAccount::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_close_account(program_id, &mut accounts)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::CreateBuffer => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlCreateBuffer::try_accounts(program_id, &mut accounts, - &[], &mut bumps, &mut reallocs)?; - __idl_create_buffer(program_id, &mut accounts)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::Write { data } => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlAccounts::try_accounts(program_id, &mut accounts, &[], - &mut bumps, &mut reallocs)?; - __idl_write(program_id, &mut accounts, data)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::SetAuthority { new_authority - } => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlAccounts::try_accounts(program_id, &mut accounts, &[], - &mut bumps, &mut reallocs)?; - __idl_set_authority(program_id, &mut accounts, - new_authority)?; - accounts.exit(program_id)?; - } - anchor_lang::idl::IdlInstruction::SetBuffer => { - let mut bumps = - ::Bumps::default(); - let mut reallocs = std::collections::BTreeSet::new(); - let mut accounts = - IdlSetBuffer::try_accounts(program_id, &mut accounts, &[], - &mut bumps, &mut reallocs)?; - __idl_set_buffer(program_id, &mut accounts)?; - accounts.exit(program_id)?; - } - } - Ok(()) - } - use anchor_lang::idl::ERASED_AUTHORITY; - pub struct IdlAccount { - pub authority: Pubkey, - pub data_len: u32, - } - #[automatically_derived] - impl ::core::fmt::Debug for IdlAccount { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field2_finish(f, - "IdlAccount", "authority", &self.authority, "data_len", - &&self.data_len) - } - } - impl borsh::ser::BorshSerialize for IdlAccount where - Pubkey: borsh::ser::BorshSerialize, - u32: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.authority, writer)?; - borsh::BorshSerialize::serialize(&self.data_len, writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for IdlAccount where - Pubkey: borsh::BorshDeserialize, u32: borsh::BorshDeserialize { - fn deserialize_reader(reader: - &mut R) - -> ::core::result::Result { - Ok(Self { - authority: borsh::BorshDeserialize::deserialize_reader(reader)?, - data_len: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - #[automatically_derived] - impl ::core::clone::Clone for IdlAccount { - #[inline] - fn clone(&self) -> IdlAccount { - IdlAccount { - authority: ::core::clone::Clone::clone(&self.authority), - data_len: ::core::clone::Clone::clone(&self.data_len), - } - } - } - #[automatically_derived] - impl anchor_lang::AccountSerialize for IdlAccount { - fn try_serialize(&self, writer: &mut W) - -> anchor_lang::Result<()> { - if writer.write_all(&[24, 70, 98, 191, 58, 144, 123, - 158]).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - if AnchorSerialize::serialize(self, writer).is_err() { - return Err(anchor_lang::error::ErrorCode::AccountDidNotSerialize.into()); - } - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::AccountDeserialize for IdlAccount { - fn try_deserialize(buf: &mut &[u8]) -> anchor_lang::Result { - if buf.len() < [24, 70, 98, 191, 58, 144, 123, 158].len() { - return Err(anchor_lang::error::ErrorCode::AccountDiscriminatorNotFound.into()); - } - let given_disc = &buf[..8]; - if &[24, 70, 98, 191, 58, 144, 123, 158] != given_disc { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.name(), - error_code_number: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.into(), - error_msg: anchor_lang::error::ErrorCode::AccountDiscriminatorMismatch.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/lib.rs", - line: 11u32, - })), - compared_values: None, - }).with_account_name("IdlAccount")); - } - Self::try_deserialize_unchecked(buf) - } - fn try_deserialize_unchecked(buf: &mut &[u8]) - -> anchor_lang::Result { - let mut data: &[u8] = &buf[8..]; - AnchorDeserialize::deserialize(&mut data).map_err(|_| - anchor_lang::error::ErrorCode::AccountDidNotDeserialize.into()) - } - } - #[automatically_derived] - impl anchor_lang::Discriminator for IdlAccount { - const DISCRIMINATOR: [u8; 8] = - [24, 70, 98, 191, 58, 144, 123, 158]; - } - impl IdlAccount { - pub fn address(program_id: &Pubkey) -> Pubkey { - let program_signer = - Pubkey::find_program_address(&[], program_id).0; - Pubkey::create_with_seed(&program_signer, IdlAccount::seed(), - program_id).expect("Seed is always valid") - } - pub fn seed() -> &'static str { "anchor:idl" } - } - impl anchor_lang::Owner for IdlAccount { - fn owner() -> Pubkey { crate::ID } - } - pub struct IdlCreateAccounts<'info> { - #[account(signer)] - pub from: AccountInfo<'info>, - #[account(mut)] - pub to: AccountInfo<'info>, - #[account(seeds = [], bump)] - pub base: AccountInfo<'info>, - pub system_program: Program<'info, System>, - #[account(executable)] - pub program: AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, IdlCreateAccountsBumps> for - IdlCreateAccounts<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut IdlCreateAccountsBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let from: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("from"))?; - let to: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("to"))?; - let base: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("base"))?; - let system_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - let program: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("program"))?; - if !&from.is_signer { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSigner).with_account_name("from")); - } - if !&to.is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("to")); - } - let (__pda_address, __bump) = - Pubkey::find_program_address(&[], &__program_id); - __bumps.base = __bump; - if base.key() != __pda_address { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintSeeds).with_account_name("base").with_pubkeys((base.key(), - __pda_address))); - } - if !&program.executable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintExecutable).with_account_name("program")); - } - Ok(IdlCreateAccounts { - from, - to, - base, - system_program, - program, - }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateAccounts<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.from.to_account_infos()); - account_infos.extend(self.to.to_account_infos()); - account_infos.extend(self.base.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos.extend(self.program.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCreateAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.from.to_account_metas(Some(true))); - account_metas.extend(self.to.to_account_metas(None)); - account_metas.extend(self.base.to_account_metas(None)); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas.extend(self.program.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlCreateAccounts<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.to, - program_id).map_err(|e| e.with_account_name("to"))?; - Ok(()) - } - } - pub struct IdlCreateAccountsBumps { - pub base: u8, - } - #[automatically_derived] - impl ::core::fmt::Debug for IdlCreateAccountsBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::debug_struct_field1_finish(f, - "IdlCreateAccountsBumps", "base", &&self.base) - } - } - impl Default for IdlCreateAccountsBumps { - fn default() -> Self { IdlCreateAccountsBumps { base: u8::MAX } } - } - impl<'info> anchor_lang::Bumps for IdlCreateAccounts<'info> where - 'info: 'info { - type Bumps = IdlCreateAccountsBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_create_accounts { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlCreateAccounts`]."] - pub struct IdlCreateAccounts { - pub from: Pubkey, - pub to: Pubkey, - pub base: Pubkey, - pub system_program: Pubkey, - pub program: Pubkey, - } - impl borsh::ser::BorshSerialize for IdlCreateAccounts where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.from, writer)?; - borsh::BorshSerialize::serialize(&self.to, writer)?; - borsh::BorshSerialize::serialize(&self.base, writer)?; - borsh::BorshSerialize::serialize(&self.system_program, - writer)?; - borsh::BorshSerialize::serialize(&self.program, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlCreateAccounts { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.from, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.to, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.base, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.program, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_create_accounts { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlCreateAccounts`]."] - pub struct IdlCreateAccounts<'info> { - pub from: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub to: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub base: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for - IdlCreateAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.from), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.to), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.base), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateAccounts<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.from)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.to)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.base)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.program)); - account_infos - } - } - } - pub struct IdlAccounts<'info> { - #[account(mut, has_one = authority)] - pub idl: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, IdlAccountsBumps> for - IdlAccounts<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut IdlAccountsBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let idl: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("idl"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - if !AsRef::::as_ref(&idl).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("idl")); - } - { - let my_key = idl.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("idl").with_pubkeys((my_key, - target_key))); - } - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlAccounts { idl, authority }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for IdlAccounts<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.idl.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.idl.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for IdlAccounts<'info> - where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.idl, - program_id).map_err(|e| e.with_account_name("idl"))?; - Ok(()) - } - } - pub struct IdlAccountsBumps {} - #[automatically_derived] - impl ::core::fmt::Debug for IdlAccountsBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "IdlAccountsBumps") - } - } - impl Default for IdlAccountsBumps { - fn default() -> Self { IdlAccountsBumps {} } - } - impl<'info> anchor_lang::Bumps for IdlAccounts<'info> where - 'info: 'info { - type Bumps = IdlAccountsBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_accounts { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlAccounts`]."] - pub struct IdlAccounts { - pub idl: Pubkey, - pub authority: Pubkey, - } - impl borsh::ser::BorshSerialize for IdlAccounts where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.idl, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlAccounts { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.idl, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_accounts { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlAccounts`]."] - pub struct IdlAccounts<'info> { - pub idl: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlAccounts<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.idl), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlAccounts<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.idl)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos - } - } - } - pub struct IdlResizeAccount<'info> { - #[account(mut, has_one = authority)] - pub idl: Account<'info, IdlAccount>, - #[account(mut, constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - pub system_program: Program<'info, System>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, IdlResizeAccountBumps> for - IdlResizeAccount<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut IdlResizeAccountBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let idl: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("idl"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - let system_program: - anchor_lang::accounts::program::Program = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("system_program"))?; - if !AsRef::::as_ref(&idl).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("idl")); - } - { - let my_key = idl.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("idl").with_pubkeys((my_key, - target_key))); - } - } - if !AsRef::::as_ref(&authority).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("authority")); - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlResizeAccount { idl, authority, system_program }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlResizeAccount<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.idl.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos.extend(self.system_program.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlResizeAccount<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.idl.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas.extend(self.system_program.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlResizeAccount<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.idl, - program_id).map_err(|e| e.with_account_name("idl"))?; - anchor_lang::AccountsExit::exit(&self.authority, - program_id).map_err(|e| e.with_account_name("authority"))?; - Ok(()) - } - } - pub struct IdlResizeAccountBumps {} - #[automatically_derived] - impl ::core::fmt::Debug for IdlResizeAccountBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "IdlResizeAccountBumps") - } - } - impl Default for IdlResizeAccountBumps { - fn default() -> Self { IdlResizeAccountBumps {} } - } - impl<'info> anchor_lang::Bumps for IdlResizeAccount<'info> where - 'info: 'info { - type Bumps = IdlResizeAccountBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_resize_account { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlResizeAccount`]."] - pub struct IdlResizeAccount { - pub idl: Pubkey, - pub authority: Pubkey, - pub system_program: Pubkey, - } - impl borsh::ser::BorshSerialize for IdlResizeAccount where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.idl, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - borsh::BorshSerialize::serialize(&self.system_program, - writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlResizeAccount { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.idl, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.authority, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.system_program, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_resize_account { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlResizeAccount`]."] - pub struct IdlResizeAccount<'info> { - pub idl: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub system_program: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for - IdlResizeAccount<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.idl), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.authority), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.system_program), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlResizeAccount<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.idl)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.system_program)); - account_infos - } - } - } - pub struct IdlCreateBuffer<'info> { - #[account(zero)] - pub buffer: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, IdlCreateBufferBumps> for - IdlCreateBuffer<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut IdlCreateBufferBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - if __accounts.is_empty() { - return Err(anchor_lang::error::ErrorCode::AccountNotEnoughKeys.into()); - } - let buffer = &__accounts[0]; - *__accounts = &__accounts[1..]; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - let __anchor_rent = Rent::get()?; - let buffer: - anchor_lang::accounts::account::Account = - { - let mut __data: &[u8] = &buffer.try_borrow_data()?; - let mut __disc_bytes = [0u8; 8]; - __disc_bytes.copy_from_slice(&__data[..8]); - let __discriminator = u64::from_le_bytes(__disc_bytes); - if __discriminator != 0 { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintZero).with_account_name("buffer")); - } - match anchor_lang::accounts::account::Account::try_from_unchecked(&buffer) - { - Ok(val) => val, - Err(e) => return Err(e.with_account_name("buffer")), - } - }; - if !AsRef::::as_ref(&buffer).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("buffer")); - } - if !__anchor_rent.is_exempt(buffer.to_account_info().lamports(), - buffer.to_account_info().try_data_len()?) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRentExempt).with_account_name("buffer")); - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlCreateBuffer { buffer, authority }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateBuffer<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.buffer.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCreateBuffer<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.buffer.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlCreateBuffer<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.buffer, - program_id).map_err(|e| e.with_account_name("buffer"))?; - Ok(()) - } - } - pub struct IdlCreateBufferBumps {} - #[automatically_derived] - impl ::core::fmt::Debug for IdlCreateBufferBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "IdlCreateBufferBumps") - } - } - impl Default for IdlCreateBufferBumps { - fn default() -> Self { IdlCreateBufferBumps {} } - } - impl<'info> anchor_lang::Bumps for IdlCreateBuffer<'info> where - 'info: 'info { - type Bumps = IdlCreateBufferBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_create_buffer { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlCreateBuffer`]."] - pub struct IdlCreateBuffer { - pub buffer: Pubkey, - pub authority: Pubkey, - } - impl borsh::ser::BorshSerialize for IdlCreateBuffer where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.buffer, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlCreateBuffer { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.buffer, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_create_buffer { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlCreateBuffer`]."] - pub struct IdlCreateBuffer<'info> { - pub buffer: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCreateBuffer<'info> - { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.buffer), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCreateBuffer<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.buffer)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos - } - } - } - pub struct IdlSetBuffer<'info> { - #[account(mut, constraint = buffer.authority == idl.authority)] - pub buffer: Account<'info, IdlAccount>, - #[account(mut, has_one = authority)] - pub idl: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, IdlSetBufferBumps> for - IdlSetBuffer<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut IdlSetBufferBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let buffer: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("buffer"))?; - let idl: anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("idl"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - if !AsRef::::as_ref(&buffer).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("buffer")); - } - if !(buffer.authority == idl.authority) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("buffer")); - } - if !AsRef::::as_ref(&idl).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("idl")); - } - { - let my_key = idl.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("idl").with_pubkeys((my_key, - target_key))); - } - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - Ok(IdlSetBuffer { buffer, idl, authority }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for IdlSetBuffer<'info> - where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.buffer.to_account_infos()); - account_infos.extend(self.idl.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlSetBuffer<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.buffer.to_account_metas(None)); - account_metas.extend(self.idl.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for IdlSetBuffer<'info> - where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - anchor_lang::AccountsExit::exit(&self.buffer, - program_id).map_err(|e| e.with_account_name("buffer"))?; - anchor_lang::AccountsExit::exit(&self.idl, - program_id).map_err(|e| e.with_account_name("idl"))?; - Ok(()) - } - } - pub struct IdlSetBufferBumps {} - #[automatically_derived] - impl ::core::fmt::Debug for IdlSetBufferBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "IdlSetBufferBumps") - } - } - impl Default for IdlSetBufferBumps { - fn default() -> Self { IdlSetBufferBumps {} } - } - impl<'info> anchor_lang::Bumps for IdlSetBuffer<'info> where - 'info: 'info { - type Bumps = IdlSetBufferBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_set_buffer { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlSetBuffer`]."] - pub struct IdlSetBuffer { - pub buffer: Pubkey, - pub idl: Pubkey, - pub authority: Pubkey, - } - impl borsh::ser::BorshSerialize for IdlSetBuffer where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.buffer, writer)?; - borsh::BorshSerialize::serialize(&self.idl, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlSetBuffer { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.buffer, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.idl, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_set_buffer { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlSetBuffer`]."] - pub struct IdlSetBuffer<'info> { - pub buffer: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub idl: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlSetBuffer<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.buffer), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.idl), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlSetBuffer<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.buffer)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.idl)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos - } - } - } - pub struct IdlCloseAccount<'info> { - #[account(mut, has_one = authority, close = sol_destination)] - pub account: Account<'info, IdlAccount>, - #[account(constraint = authority.key != & ERASED_AUTHORITY)] - pub authority: Signer<'info>, - #[account(mut)] - pub sol_destination: AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::Accounts<'info, IdlCloseAccountBumps> for - IdlCloseAccount<'info> where 'info: 'info { - #[inline(never)] - fn try_accounts(__program_id: - &anchor_lang::solana_program::pubkey::Pubkey, - __accounts: - &mut &'info [anchor_lang::solana_program::account_info::AccountInfo<'info>], - __ix_data: &[u8], __bumps: &mut IdlCloseAccountBumps, - __reallocs: - &mut std::collections::BTreeSet) - -> anchor_lang::Result { - let account: - anchor_lang::accounts::account::Account = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("account"))?; - let authority: Signer = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| e.with_account_name("authority"))?; - let sol_destination: AccountInfo = - anchor_lang::Accounts::try_accounts(__program_id, - __accounts, __ix_data, __bumps, - __reallocs).map_err(|e| - e.with_account_name("sol_destination"))?; - if !AsRef::::as_ref(&account).is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("account")); - } - { - let my_key = account.authority; - let target_key = authority.key(); - if my_key != target_key { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintHasOne).with_account_name("account").with_pubkeys((my_key, - target_key))); - } - } - { - if account.key() == sol_destination.key() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintClose).with_account_name("account")); - } - } - if !(authority.key != &ERASED_AUTHORITY) { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintRaw).with_account_name("authority")); - } - if !&sol_destination.is_writable { - return Err(anchor_lang::error::Error::from(anchor_lang::error::ErrorCode::ConstraintMut).with_account_name("sol_destination")); - } - Ok(IdlCloseAccount { account, authority, sol_destination }) - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCloseAccount<'info> where 'info: 'info { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(self.account.to_account_infos()); - account_infos.extend(self.authority.to_account_infos()); - account_infos.extend(self.sol_destination.to_account_infos()); - account_infos - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCloseAccount<'info> { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.extend(self.account.to_account_metas(None)); - account_metas.extend(self.authority.to_account_metas(None)); - account_metas.extend(self.sol_destination.to_account_metas(None)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::AccountsExit<'info> for - IdlCloseAccount<'info> where 'info: 'info { - fn exit(&self, - program_id: &anchor_lang::solana_program::pubkey::Pubkey) - -> anchor_lang::Result<()> { - { - let sol_destination = &self.sol_destination; - anchor_lang::AccountsClose::close(&self.account, - sol_destination.to_account_info()).map_err(|e| - e.with_account_name("account"))?; - } - anchor_lang::AccountsExit::exit(&self.sol_destination, - program_id).map_err(|e| - e.with_account_name("sol_destination"))?; - Ok(()) - } - } - pub struct IdlCloseAccountBumps {} - #[automatically_derived] - impl ::core::fmt::Debug for IdlCloseAccountBumps { - #[inline] - fn fmt(&self, f: &mut ::core::fmt::Formatter) - -> ::core::fmt::Result { - ::core::fmt::Formatter::write_str(f, "IdlCloseAccountBumps") - } - } - impl Default for IdlCloseAccountBumps { - fn default() -> Self { IdlCloseAccountBumps {} } - } - impl<'info> anchor_lang::Bumps for IdlCloseAccount<'info> where - 'info: 'info { - type Bumps = IdlCloseAccountBumps; - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = r" implementation detail), to generate a struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is a Pubkey,"] - #[doc = - r" instead of an `AccountInfo`. This is useful for clients that want"] - #[doc = - r" to generate a list of accounts, without explicitly knowing the"] - #[doc = r" order all the fields should be in."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" `accounts` module (also generated), which re-exports this."] - pub(crate) mod __client_accounts_idl_close_account { - use super::*; - use anchor_lang::prelude::borsh; - #[doc = " Generated client accounts for [`IdlCloseAccount`]."] - pub struct IdlCloseAccount { - pub account: Pubkey, - pub authority: Pubkey, - pub sol_destination: Pubkey, - } - impl borsh::ser::BorshSerialize for IdlCloseAccount where - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize, - Pubkey: borsh::ser::BorshSerialize { - fn serialize(&self, - writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.account, writer)?; - borsh::BorshSerialize::serialize(&self.authority, writer)?; - borsh::BorshSerialize::serialize(&self.sol_destination, - writer)?; - Ok(()) - } - } - #[automatically_derived] - impl anchor_lang::ToAccountMetas for IdlCloseAccount { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.account, - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(self.authority, - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(self.sol_destination, - false)); - account_metas - } - } - } - #[doc = r" An internal, Anchor generated module. This is used (as an"] - #[doc = - r" implementation detail), to generate a CPI struct for a given"] - #[doc = - r" `#[derive(Accounts)]` implementation, where each field is an"] - #[doc = r" AccountInfo."] - #[doc = r""] - #[doc = - r" To access the struct in this module, one should use the sibling"] - #[doc = - r" [`cpi::accounts`] module (also generated), which re-exports this."] - pub(crate) mod __cpi_client_accounts_idl_close_account { - use super::*; - #[doc = - " Generated CPI struct of the accounts for [`IdlCloseAccount`]."] - pub struct IdlCloseAccount<'info> { - pub account: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub authority: anchor_lang::solana_program::account_info::AccountInfo<'info>, - pub sol_destination: anchor_lang::solana_program::account_info::AccountInfo<'info>, - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountMetas for IdlCloseAccount<'info> - { - fn to_account_metas(&self, is_signer: Option) - -> - Vec { - let mut account_metas = ::alloc::vec::Vec::new(); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.account), - false)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new_readonly(anchor_lang::Key::key(&self.authority), - true)); - account_metas.push(anchor_lang::solana_program::instruction::AccountMeta::new(anchor_lang::Key::key(&self.sol_destination), - false)); - account_metas - } - } - #[automatically_derived] - impl<'info> anchor_lang::ToAccountInfos<'info> for - IdlCloseAccount<'info> { - fn to_account_infos(&self) - -> - Vec> { - let mut account_infos = ::alloc::vec::Vec::new(); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.account)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.authority)); - account_infos.extend(anchor_lang::ToAccountInfos::to_account_infos(&self.sol_destination)); - account_infos - } - } - } - use std::cell::{Ref, RefMut}; - pub trait IdlTrailingData<'info> { - fn trailing_data(self) - -> Ref<'info, [u8]>; - fn trailing_data_mut(self) - -> RefMut<'info, [u8]>; - } - impl<'a, 'info: 'a> IdlTrailingData<'a> for - &'a Account<'info, IdlAccount> { - fn trailing_data(self) -> Ref<'a, [u8]> { - let info: &AccountInfo<'info> = self.as_ref(); - Ref::map(info.try_borrow_data().unwrap(), |d| &d[44..]) - } - fn trailing_data_mut(self) -> RefMut<'a, [u8]> { - let info: &AccountInfo<'info> = self.as_ref(); - RefMut::map(info.try_borrow_mut_data().unwrap(), - |d| &mut d[44..]) - } - } - #[inline(never)] - pub fn __idl_create_account(program_id: &Pubkey, - accounts: &mut IdlCreateAccounts, data_len: u64) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlCreateAccount"); - if program_id != accounts.program.key { - return Err(anchor_lang::error::ErrorCode::IdlInstructionInvalidProgram.into()); - } - let from = accounts.from.key; - let (base, nonce) = Pubkey::find_program_address(&[], program_id); - let seed = IdlAccount::seed(); - let owner = accounts.program.key; - let to = Pubkey::create_with_seed(&base, seed, owner).unwrap(); - let space = std::cmp::min(8 + 32 + 4 + data_len as usize, 10_000); - let rent = Rent::get()?; - let lamports = rent.minimum_balance(space); - let seeds = &[&[nonce][..]]; - let ix = - anchor_lang::solana_program::system_instruction::create_account_with_seed(from, - &to, &base, seed, lamports, space as u64, owner); - anchor_lang::solana_program::program::invoke_signed(&ix, - &[accounts.from.clone(), accounts.to.clone(), - accounts.base.clone(), - accounts.system_program.to_account_info()], &[seeds])?; - let mut idl_account = - { - let mut account_data = accounts.to.try_borrow_data()?; - let mut account_data_slice: &[u8] = &account_data; - IdlAccount::try_deserialize_unchecked(&mut account_data_slice)? - }; - idl_account.authority = *accounts.from.key; - let mut data = accounts.to.try_borrow_mut_data()?; - let dst: &mut [u8] = &mut data; - let mut cursor = std::io::Cursor::new(dst); - idl_account.try_serialize(&mut cursor)?; - Ok(()) - } - #[inline(never)] - pub fn __idl_resize_account(program_id: &Pubkey, - accounts: &mut IdlResizeAccount, data_len: u64) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlResizeAccount"); - let data_len: usize = data_len as usize; - if accounts.idl.data_len != 0 { - return Err(anchor_lang::error::ErrorCode::IdlAccountNotEmpty.into()); - } - let idl_ref = AsRef::::as_ref(&accounts.idl); - let new_account_space = - idl_ref.data_len().checked_add(std::cmp::min(data_len.checked_sub(idl_ref.data_len()).expect("data_len should always be >= the current account space"), - 10_000)).unwrap(); - if new_account_space > idl_ref.data_len() { - let sysvar_rent = Rent::get()?; - let new_rent_minimum = - sysvar_rent.minimum_balance(new_account_space); - anchor_lang::system_program::transfer(anchor_lang::context::CpiContext::new(accounts.system_program.to_account_info(), - anchor_lang::system_program::Transfer { - from: accounts.authority.to_account_info(), - to: accounts.idl.to_account_info().clone(), - }), - new_rent_minimum.checked_sub(idl_ref.lamports()).unwrap())?; - idl_ref.realloc(new_account_space, false)?; - } - Ok(()) - } - #[inline(never)] - pub fn __idl_close_account(program_id: &Pubkey, - accounts: &mut IdlCloseAccount) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlCloseAccount"); - Ok(()) - } - #[inline(never)] - pub fn __idl_create_buffer(program_id: &Pubkey, - accounts: &mut IdlCreateBuffer) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlCreateBuffer"); - let mut buffer = &mut accounts.buffer; - buffer.authority = *accounts.authority.key; - Ok(()) - } - #[inline(never)] - pub fn __idl_write(program_id: &Pubkey, accounts: &mut IdlAccounts, - idl_data: Vec) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlWrite"); - let prev_len: usize = - ::std::convert::TryInto::::try_into(accounts.idl.data_len).unwrap(); - let new_len: usize = - prev_len.checked_add(idl_data.len()).unwrap() as usize; - accounts.idl.data_len = - accounts.idl.data_len.checked_add(::std::convert::TryInto::::try_into(idl_data.len()).unwrap()).unwrap(); - use IdlTrailingData; - let mut idl_bytes = accounts.idl.trailing_data_mut(); - let idl_expansion = &mut idl_bytes[prev_len..new_len]; - if idl_expansion.len() != idl_data.len() { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::RequireEqViolated.name(), - error_code_number: anchor_lang::error::ErrorCode::RequireEqViolated.into(), - error_msg: anchor_lang::error::ErrorCode::RequireEqViolated.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/lib.rs", - line: 11u32, - })), - compared_values: None, - }).with_values((idl_expansion.len(), idl_data.len()))); - }; - idl_expansion.copy_from_slice(&idl_data[..]); - Ok(()) - } - #[inline(never)] - pub fn __idl_set_authority(program_id: &Pubkey, - accounts: &mut IdlAccounts, new_authority: Pubkey) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlSetAuthority"); - accounts.idl.authority = new_authority; - Ok(()) - } - #[inline(never)] - pub fn __idl_set_buffer(program_id: &Pubkey, - accounts: &mut IdlSetBuffer) -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: IdlSetBuffer"); - accounts.idl.data_len = accounts.buffer.data_len; - use IdlTrailingData; - let buffer_len = - ::std::convert::TryInto::::try_into(accounts.buffer.data_len).unwrap(); - let mut target = accounts.idl.trailing_data_mut(); - let source = &accounts.buffer.trailing_data()[..buffer_len]; - if target.len() < buffer_len { - return Err(anchor_lang::error::Error::from(anchor_lang::error::AnchorError { - error_name: anchor_lang::error::ErrorCode::RequireGteViolated.name(), - error_code_number: anchor_lang::error::ErrorCode::RequireGteViolated.into(), - error_msg: anchor_lang::error::ErrorCode::RequireGteViolated.to_string(), - error_origin: Some(anchor_lang::error::ErrorOrigin::Source(anchor_lang::error::Source { - filename: "programs/fuzz_example3/src/lib.rs", - line: 11u32, - })), - compared_values: None, - }).with_values((target.len(), buffer_len))); - }; - target[..buffer_len].copy_from_slice(source); - Ok(()) - } - } - #[doc = - r" __global mod defines wrapped handlers for global instructions."] - pub mod __global { - use super::*; - #[inline(never)] - pub fn init_vesting<'info>(__program_id: &Pubkey, - __accounts: &'info [AccountInfo<'info>], __ix_data: &[u8]) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: InitVesting"); - let ix = - instruction::InitVesting::deserialize(&mut &__ix_data[..]).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let instruction::InitVesting { - recipient, _recipient, amount, start_at, end_at, interval - } = ix; - let mut __bumps = - ::Bumps::default(); - let mut __reallocs = std::collections::BTreeSet::new(); - let mut __remaining_accounts: &[AccountInfo] = __accounts; - let mut __accounts = - InitVesting::try_accounts(__program_id, - &mut __remaining_accounts, __ix_data, &mut __bumps, - &mut __reallocs)?; - let result = - fuzz_example3::init_vesting(anchor_lang::context::Context::new(__program_id, - &mut __accounts, __remaining_accounts, __bumps), recipient, - _recipient, amount, start_at, end_at, interval)?; - __accounts.exit(__program_id) - } - #[inline(never)] - pub fn withdraw_unlocked<'info>(__program_id: &Pubkey, - __accounts: &'info [AccountInfo<'info>], __ix_data: &[u8]) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: WithdrawUnlocked"); - let ix = - instruction::WithdrawUnlocked::deserialize(&mut &__ix_data[..]).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let instruction::WithdrawUnlocked = ix; - let mut __bumps = - ::Bumps::default(); - let mut __reallocs = std::collections::BTreeSet::new(); - let mut __remaining_accounts: &[AccountInfo] = __accounts; - let mut __accounts = - Withdraw::try_accounts(__program_id, - &mut __remaining_accounts, __ix_data, &mut __bumps, - &mut __reallocs)?; - let result = - fuzz_example3::withdraw_unlocked(anchor_lang::context::Context::new(__program_id, - &mut __accounts, __remaining_accounts, __bumps))?; - __accounts.exit(__program_id) - } - #[inline(never)] - pub fn withdraw_dummy<'info>(__program_id: &Pubkey, - __accounts: &'info [AccountInfo<'info>], __ix_data: &[u8]) - -> anchor_lang::Result<()> { - ::solana_program::log::sol_log("Instruction: WithdrawDummy"); - let ix = - instruction::WithdrawDummy::deserialize(&mut &__ix_data[..]).map_err(|_| - anchor_lang::error::ErrorCode::InstructionDidNotDeserialize)?; - let instruction::WithdrawDummy = ix; - let mut __bumps = - ::Bumps::default(); - let mut __reallocs = std::collections::BTreeSet::new(); - let mut __remaining_accounts: &[AccountInfo] = __accounts; - let mut __accounts = - Withdraw::try_accounts(__program_id, - &mut __remaining_accounts, __ix_data, &mut __bumps, - &mut __reallocs)?; - let result = - fuzz_example3::withdraw_dummy(anchor_lang::context::Context::new(__program_id, - &mut __accounts, __remaining_accounts, __bumps))?; - __accounts.exit(__program_id) - } - } -} -pub mod fuzz_example3 { - use super::*; - pub fn init_vesting(ctx: Context, recipient: Pubkey, - _recipient: anchor_lang::prelude::Pubkey, amount: u64, start_at: u64, - end_at: u64, interval: u64) -> Result<()> { - _init_vesting(ctx, recipient, amount, start_at, end_at, interval) - } - pub fn withdraw_unlocked(ctx: Context) -> Result<()> { - _withdraw_unlocked(ctx) - } - pub fn withdraw_dummy(ctx: Context) -> Result<()> { Ok(()) } -} -#[doc = r" An Anchor generated module containing the program's set of"] -#[doc = -r" instructions, where each method handler in the `#[program]` mod is"] -#[doc = r" associated with a struct defining the input arguments to the"] -#[doc = -r" method. These should be used directly, when one wants to serialize"] -#[doc = r" Anchor instruction data, for example, when speciying"] -#[doc = r" instructions on a client."] -pub mod instruction { - use super::*; - #[doc = r" Instruction."] - pub struct InitVesting { - pub recipient: Pubkey, - pub _recipient: anchor_lang::prelude::Pubkey, - pub amount: u64, - pub start_at: u64, - pub end_at: u64, - pub interval: u64, - } - impl borsh::ser::BorshSerialize for InitVesting where - Pubkey: borsh::ser::BorshSerialize, - anchor_lang::prelude::Pubkey: borsh::ser::BorshSerialize, - u64: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize, - u64: borsh::ser::BorshSerialize, u64: borsh::ser::BorshSerialize { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - borsh::BorshSerialize::serialize(&self.recipient, writer)?; - borsh::BorshSerialize::serialize(&self._recipient, writer)?; - borsh::BorshSerialize::serialize(&self.amount, writer)?; - borsh::BorshSerialize::serialize(&self.start_at, writer)?; - borsh::BorshSerialize::serialize(&self.end_at, writer)?; - borsh::BorshSerialize::serialize(&self.interval, writer)?; - Ok(()) - } - } - impl borsh::de::BorshDeserialize for InitVesting where - Pubkey: borsh::BorshDeserialize, - anchor_lang::prelude::Pubkey: borsh::BorshDeserialize, - u64: borsh::BorshDeserialize, u64: borsh::BorshDeserialize, - u64: borsh::BorshDeserialize, u64: borsh::BorshDeserialize { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self { - recipient: borsh::BorshDeserialize::deserialize_reader(reader)?, - _recipient: borsh::BorshDeserialize::deserialize_reader(reader)?, - amount: borsh::BorshDeserialize::deserialize_reader(reader)?, - start_at: borsh::BorshDeserialize::deserialize_reader(reader)?, - end_at: borsh::BorshDeserialize::deserialize_reader(reader)?, - interval: borsh::BorshDeserialize::deserialize_reader(reader)?, - }) - } - } - impl anchor_lang::Discriminator for InitVesting { - const DISCRIMINATOR: [u8; 8] = [119, 192, 67, 41, 47, 82, 152, 27]; - } - impl anchor_lang::InstructionData for InitVesting {} - impl anchor_lang::Owner for InitVesting { - fn owner() -> Pubkey { ID } - } - #[doc = r" Instruction."] - pub struct WithdrawUnlocked; - impl borsh::ser::BorshSerialize for WithdrawUnlocked { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - Ok(()) - } - } - impl borsh::de::BorshDeserialize for WithdrawUnlocked { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self {}) - } - } - impl anchor_lang::Discriminator for WithdrawUnlocked { - const DISCRIMINATOR: [u8; 8] = [213, 161, 76, 199, 38, 28, 209, 80]; - } - impl anchor_lang::InstructionData for WithdrawUnlocked {} - impl anchor_lang::Owner for WithdrawUnlocked { - fn owner() -> Pubkey { ID } - } - #[doc = r" Instruction."] - pub struct WithdrawDummy; - impl borsh::ser::BorshSerialize for WithdrawDummy { - fn serialize(&self, writer: &mut W) - -> ::core::result::Result<(), borsh::maybestd::io::Error> { - Ok(()) - } - } - impl borsh::de::BorshDeserialize for WithdrawDummy { - fn deserialize_reader(reader: &mut R) - -> ::core::result::Result { - Ok(Self {}) - } - } - impl anchor_lang::Discriminator for WithdrawDummy { - const DISCRIMINATOR: [u8; 8] = [117, 156, 173, 123, 159, 55, 55, 150]; - } - impl anchor_lang::InstructionData for WithdrawDummy {} - impl anchor_lang::Owner for WithdrawDummy { - fn owner() -> Pubkey { ID } - } -} -#[doc = r" An Anchor generated module, providing a set of structs"] -#[doc = r" mirroring the structs deriving `Accounts`, where each field is"] -#[doc = r" a `Pubkey`. This is useful for specifying accounts for a client."] -pub mod accounts { - pub use crate::__client_accounts_withdraw::*; - pub use crate::__client_accounts_init_vesting::*; -} diff --git a/crates/client/tests/test_data/expected_source_codes/expected_accounts_snapshots.rs b/crates/client/tests/test_data/expected_source_codes/expected_accounts_snapshots.rs deleted file mode 100644 index 99474cbc..00000000 --- a/crates/client/tests/test_data/expected_source_codes/expected_accounts_snapshots.rs +++ /dev/null @@ -1,218 +0,0 @@ -use anchor_lang::prelude::*; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitVestingSnapshot<'info> { - pub sender: Signer<'info>, - pub sender_token_account: Account<'info, TokenAccount>, - pub escrow: Option>, - pub escrow_token_account: Account<'info, TokenAccount>, - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, -} -pub struct WithdrawUnlockedSnapshot<'info> { - pub recipient: Signer<'info>, - pub recipient_token_account: Account<'info, TokenAccount>, - pub escrow: Option>, - pub escrow_token_account: Account<'info, TokenAccount>, - pub escrow_pda_authority: &'info AccountInfo<'info>, - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, -} -impl<'info> InitVestingSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let sender: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("sender".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("sender".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("sender".to_string()))?; - let sender_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "sender_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "sender_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("sender_token_account".to_string()) - })?; - let escrow: Option> = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("escrow".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc).map_err(|_| { - FuzzingError::CannotDeserializeAccount("escrow".to_string()) - }) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "escrow".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let escrow_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "escrow_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "escrow_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("escrow_token_account".to_string()) - })?; - let mint: anchor_lang::accounts::account::Account = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("mint".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("mint".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("mint".to_string()))?; - let token_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("token_program".to_string()))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("token_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("token_program".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - sender, - sender_token_account, - escrow, - escrow_token_account, - mint, - token_program, - system_program, - }) - } -} -impl<'info> WithdrawUnlockedSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let recipient: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("recipient".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("recipient".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("recipient".to_string()))?; - let recipient_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "recipient_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "recipient_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("recipient_token_account".to_string()) - })?; - let escrow: Option> = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("escrow".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc).map_err(|_| { - FuzzingError::CannotDeserializeAccount("escrow".to_string()) - }) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "escrow".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let escrow_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "escrow_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "escrow_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("escrow_token_account".to_string()) - })?; - let escrow_pda_authority = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "escrow_pda_authority".to_string(), - ))? - .as_ref() - .ok_or(FuzzingError::AccountNotFound( - "escrow_pda_authority".to_string(), - ))?; - let mint: anchor_lang::accounts::account::Account = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("mint".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("mint".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("mint".to_string()))?; - let token_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("token_program".to_string()))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("token_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("token_program".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - recipient, - recipient_token_account, - escrow, - escrow_token_account, - escrow_pda_authority, - mint, - token_program, - system_program, - }) - } -} -pub type WithdrawDummySnapshot<'info> = WithdrawUnlockedSnapshot<'info>; diff --git a/crates/client/tests/test_data/expected_source_codes/expected_fuzz_instructions.rs b/crates/client/tests/test_data/expected_source_codes/expected_fuzz_instructions.rs deleted file mode 100644 index 7e57e566..00000000 --- a/crates/client/tests/test_data/expected_source_codes/expected_fuzz_instructions.rs +++ /dev/null @@ -1,187 +0,0 @@ -pub mod fuzz_example3_fuzz_instructions { - use crate::accounts_snapshots::*; - use trident_client::fuzzing::*; - #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] - pub enum FuzzInstruction { - InitVesting(InitVesting), - WithdrawUnlocked(WithdrawUnlocked), - WithdrawDummy(WithdrawDummy), - } - #[derive(Arbitrary, Debug)] - pub struct InitVesting { - pub accounts: InitVestingAccounts, - pub data: InitVestingData, - } - #[derive(Arbitrary, Debug)] - pub struct InitVestingAccounts { - pub sender: AccountId, - pub sender_token_account: AccountId, - pub escrow: AccountId, - pub escrow_token_account: AccountId, - pub mint: AccountId, - pub token_program: AccountId, - pub system_program: AccountId, - } - #[derive(Arbitrary, Debug)] - pub struct InitVestingData { - pub recipient: AccountId, - pub _recipient: AccountId, - pub amount: u64, - pub start_at: u64, - pub end_at: u64, - pub interval: u64, - } - #[derive(Arbitrary, Debug)] - pub struct WithdrawUnlocked { - pub accounts: WithdrawUnlockedAccounts, - pub data: WithdrawUnlockedData, - } - #[derive(Arbitrary, Debug)] - pub struct WithdrawUnlockedAccounts { - pub recipient: AccountId, - pub recipient_token_account: AccountId, - pub escrow: AccountId, - pub escrow_token_account: AccountId, - pub escrow_pda_authority: AccountId, - pub mint: AccountId, - pub token_program: AccountId, - pub system_program: AccountId, - } - #[derive(Arbitrary, Debug)] - pub struct WithdrawUnlockedData {} - #[derive(Arbitrary, Debug)] - pub struct WithdrawDummy { - pub accounts: WithdrawDummyAccounts, - pub data: WithdrawDummyData, - } - #[derive(Arbitrary, Debug)] - pub struct WithdrawDummyAccounts { - pub recipient: AccountId, - pub recipient_token_account: AccountId, - pub escrow: AccountId, - pub escrow_token_account: AccountId, - pub escrow_pda_authority: AccountId, - pub mint: AccountId, - pub token_program: AccountId, - pub system_program: AccountId, - } - #[derive(Arbitrary, Debug)] - pub struct WithdrawDummyData {} - impl<'info> IxOps<'info> for InitVesting { - type IxData = fuzz_example3::instruction::InitVesting; - type IxAccounts = FuzzAccounts; - type IxSnapshot = InitVestingSnapshot<'info>; - fn get_data( - &self, - _client: &mut impl FuzzClient, - _fuzz_accounts: &mut FuzzAccounts, - ) -> Result { - let data = fuzz_example3::instruction::InitVesting { - recipient: todo!(), - _recipient: todo!(), - amount: todo!(), - start_at: todo!(), - end_at: todo!(), - interval: todo!(), - }; - Ok(data) - } - fn get_accounts( - &self, - client: &mut impl FuzzClient, - fuzz_accounts: &mut FuzzAccounts, - ) -> Result<(Vec, Vec), FuzzingError> { - let signers = vec![todo!()]; - let acc_meta = fuzz_example3::accounts::InitVesting { - sender: todo!(), - sender_token_account: todo!(), - escrow: todo!(), - escrow_token_account: todo!(), - mint: todo!(), - token_program: todo!(), - system_program: todo!(), - } - .to_account_metas(None); - Ok((signers, acc_meta)) - } - } - impl<'info> IxOps<'info> for WithdrawUnlocked { - type IxData = fuzz_example3::instruction::WithdrawUnlocked; - type IxAccounts = FuzzAccounts; - type IxSnapshot = WithdrawUnlockedSnapshot<'info>; - fn get_data( - &self, - _client: &mut impl FuzzClient, - _fuzz_accounts: &mut FuzzAccounts, - ) -> Result { - let data = fuzz_example3::instruction::WithdrawUnlocked {}; - Ok(data) - } - fn get_accounts( - &self, - client: &mut impl FuzzClient, - fuzz_accounts: &mut FuzzAccounts, - ) -> Result<(Vec, Vec), FuzzingError> { - let signers = vec![todo!()]; - let acc_meta = fuzz_example3::accounts::Withdraw { - recipient: todo!(), - recipient_token_account: todo!(), - escrow: todo!(), - escrow_token_account: todo!(), - escrow_pda_authority: todo!(), - mint: todo!(), - token_program: todo!(), - system_program: todo!(), - } - .to_account_metas(None); - Ok((signers, acc_meta)) - } - } - impl<'info> IxOps<'info> for WithdrawDummy { - type IxData = fuzz_example3::instruction::WithdrawDummy; - type IxAccounts = FuzzAccounts; - type IxSnapshot = WithdrawDummySnapshot<'info>; - fn get_data( - &self, - _client: &mut impl FuzzClient, - _fuzz_accounts: &mut FuzzAccounts, - ) -> Result { - let data = fuzz_example3::instruction::WithdrawDummy {}; - Ok(data) - } - fn get_accounts( - &self, - client: &mut impl FuzzClient, - fuzz_accounts: &mut FuzzAccounts, - ) -> Result<(Vec, Vec), FuzzingError> { - let signers = vec![todo!()]; - let acc_meta = fuzz_example3::accounts::Withdraw { - recipient: todo!(), - recipient_token_account: todo!(), - escrow: todo!(), - escrow_token_account: todo!(), - escrow_pda_authority: todo!(), - mint: todo!(), - token_program: todo!(), - system_program: todo!(), - } - .to_account_metas(None); - Ok((signers, acc_meta)) - } - } - #[doc = r" Use AccountsStorage where T can be one of:"] - #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] - #[derive(Default)] - pub struct FuzzAccounts { - escrow: AccountsStorage, - escrow_pda_authority: AccountsStorage, - escrow_token_account: AccountsStorage, - mint: AccountsStorage, - recipient: AccountsStorage, - recipient_token_account: AccountsStorage, - sender: AccountsStorage, - sender_token_account: AccountsStorage, - system_program: AccountsStorage, - token_program: AccountsStorage, - } -} diff --git a/crates/client/tests/test_data/expected_source_codes/expected_program_client_code.rs b/crates/client/tests/test_data/expected_source_codes/expected_program_client_code.rs deleted file mode 100644 index 658f82f6..00000000 --- a/crates/client/tests/test_data/expected_source_codes/expected_program_client_code.rs +++ /dev/null @@ -1,184 +0,0 @@ -// DO NOT EDIT - automatically generated file (except `use` statements inside the `*_instruction` module -pub mod escrow_instruction { - use trident_client::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, - 68u8, 170u8, 153u8, 74u8, 59u8, - ]); - pub async fn initialize_escrow( - client: &Client, - i_initializer_amount: u64, - i_taker_amount: u64, - i__enum_variant: escrow::state::EnumInput, - i__enum_variant_inner: escrow::innerstate::EnumInputInner, - i__struct_variant_inner: escrow::state::StructInput, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { - client - .send_instruction( - PROGRAM_ID, - escrow::instruction::InitializeEscrow { - initializer_amount: i_initializer_amount, - taker_amount: i_taker_amount, - _enum_variant: i__enum_variant, - _enum_variant_inner: i__enum_variant_inner, - _struct_variant_inner: i__struct_variant_inner, - }, - escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, - }, - signers, - ) - .await - } - pub fn initialize_escrow_ix( - i_initializer_amount: u64, - i_taker_amount: u64, - i__enum_variant: escrow::state::EnumInput, - i__enum_variant_inner: escrow::innerstate::EnumInputInner, - i__struct_variant_inner: escrow::state::StructInput, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { - program_id: PROGRAM_ID, - data: escrow::instruction::InitializeEscrow { - initializer_amount: i_initializer_amount, - taker_amount: i_taker_amount, - _enum_variant: i__enum_variant, - _enum_variant_inner: i__enum_variant_inner, - _struct_variant_inner: i__struct_variant_inner, - } - .data(), - accounts: escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, - } - .to_account_metas(None), - } - } - pub async fn cancel_escrow( - client: &Client, - a_initializer: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_pda_account: Pubkey, - a_escrow_account: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { - client - .send_instruction( - PROGRAM_ID, - escrow::instruction::CancelEscrow {}, - escrow::accounts::CancelEscrow { - initializer: a_initializer, - pda_deposit_token_account: a_pda_deposit_token_account, - pda_account: a_pda_account, - escrow_account: a_escrow_account, - token_program: a_token_program, - }, - signers, - ) - .await - } - pub fn cancel_escrow_ix( - a_initializer: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_pda_account: Pubkey, - a_escrow_account: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { - program_id: PROGRAM_ID, - data: escrow::instruction::CancelEscrow {}.data(), - accounts: escrow::accounts::CancelEscrow { - initializer: a_initializer, - pda_deposit_token_account: a_pda_deposit_token_account, - pda_account: a_pda_account, - escrow_account: a_escrow_account, - token_program: a_token_program, - } - .to_account_metas(None), - } - } - pub async fn exchange( - client: &Client, - a_taker: Pubkey, - a_taker_deposit_token_account: Pubkey, - a_taker_receive_token_account: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_initializer_main_account: Pubkey, - a_escrow_account: Pubkey, - a_pda_account: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { - client - .send_instruction( - PROGRAM_ID, - escrow::instruction::Exchange {}, - escrow::accounts::Exchange { - taker: a_taker, - taker_deposit_token_account: a_taker_deposit_token_account, - taker_receive_token_account: a_taker_receive_token_account, - pda_deposit_token_account: a_pda_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - initializer_main_account: a_initializer_main_account, - escrow_account: a_escrow_account, - pda_account: a_pda_account, - token_program: a_token_program, - }, - signers, - ) - .await - } - pub fn exchange_ix( - a_taker: Pubkey, - a_taker_deposit_token_account: Pubkey, - a_taker_receive_token_account: Pubkey, - a_pda_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_initializer_main_account: Pubkey, - a_escrow_account: Pubkey, - a_pda_account: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { - program_id: PROGRAM_ID, - data: escrow::instruction::Exchange {}.data(), - accounts: escrow::accounts::Exchange { - taker: a_taker, - taker_deposit_token_account: a_taker_deposit_token_account, - taker_receive_token_account: a_taker_receive_token_account, - pda_deposit_token_account: a_pda_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - initializer_main_account: a_initializer_main_account, - escrow_account: a_escrow_account, - pda_account: a_pda_account, - token_program: a_token_program, - } - .to_account_metas(None), - } - } -} diff --git a/crates/client/tests/test_fuzz.rs b/crates/client/tests/test_fuzz.rs index 4cf4f534..4b4cdb0d 100644 --- a/crates/client/tests/test_fuzz.rs +++ b/crates/client/tests/test_fuzz.rs @@ -1,64 +1,73 @@ +use std::{ + io::Read, + path::{Path, PathBuf}, +}; + +use anchor_lang_idl_spec::Idl; use anyhow::Error; -use cargo_metadata::camino::Utf8PathBuf; use fehler::throws; use pretty_assertions::assert_str_eq; -use trident_client::___private::ProgramData; - -const PROGRAM_NAME: &str = "fuzz_example3"; #[throws] #[tokio::test] -async fn test_snapshots_and_instructions() { - let expanded_fuzz_example3 = include_str!(concat!( +async fn test_fuzz_instructions() { + let expected_fuzz_instructions_code = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/tests/test_data/expanded_source_codes/expanded_fuzz_example3.rs" + "/tests/expected_source_codes/expected_fuzz_instructions.rs" )); - let expected_accounts_snapshots = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/tests/test_data/expected_source_codes/expected_accounts_snapshots.rs" - )); - let expected_fuzz_instructions_code = include_str!(concat!( + let idl = read_idl()?; + + let fuzz_instructions_code = + trident_client::___private::fuzz_instructions_generator::generate_source_code(&vec![idl]); + + let fuzz_instructions_code = + trident_client::___private::Commander::format_program_code(&fuzz_instructions_code).await?; + + assert_str_eq!(fuzz_instructions_code, expected_fuzz_instructions_code); +} + +#[throws] +#[tokio::test] +async fn test_fuzz_test() { + let test_fuzz_expected = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/tests/test_data/expected_source_codes/expected_fuzz_instructions.rs" + "/tests/expected_source_codes/expected_test_fuzz.rs" )); - let mut program_path = std::env::current_dir() - .unwrap() - .to_str() - .unwrap() - .to_string(); - - program_path.push_str("/tests/test_program/fuzz_example3/src/lib.rs"); + let idl = read_idl()?; - let path = Utf8PathBuf::from(program_path); + let test_fuzz = + trident_client::___private::test_fuzz_generator::generate_source_code(&vec![idl]); - let program_idl = trident_client::___private::parse_to_idl_program( - PROGRAM_NAME.to_owned(), - expanded_fuzz_example3, - )?; + let test_fuzz = + trident_client::___private::Commander::format_program_code_nightly(&test_fuzz).await?; - let code = expanded_fuzz_example3.to_string(); + assert_str_eq!(test_fuzz, test_fuzz_expected); +} - let program_data = ProgramData { - code, - path, - program_idl, - }; +#[throws] +fn read_idl() -> Idl { + let current_dir = std::env::current_dir()?; - let program_data = vec![program_data]; + let anchor_idl_path: PathBuf = [ + current_dir.as_ref(), + Path::new("tests/anchor_idl/example.json"), + ] + .iter() + .collect(); - let fuzzer_snapshots = - trident_client::___private::snapshot_generator::generate_snapshots_code(&program_data) - .unwrap(); - let fuzzer_snapshots = - trident_client::___private::Commander::format_program_code(&fuzzer_snapshots).await?; + let mut idl_file = std::fs::File::open(&anchor_idl_path)?; - let fuzz_instructions_code = - trident_client::___private::fuzzer_generator::generate_source_code(&program_data); - let fuzz_instructions_code = - trident_client::___private::Commander::format_program_code(&fuzz_instructions_code).await?; + let mut json_content = String::new(); + idl_file.read_to_string(&mut json_content)?; - assert_str_eq!(fuzzer_snapshots, expected_accounts_snapshots); - assert_str_eq!(fuzz_instructions_code, expected_fuzz_instructions_code); + // Parse the string of data into an Idl struct + match serde_json::from_str::(&json_content) { + Ok(parsed_idl) => parsed_idl, + Err(e) => { + panic!("Failed to parse {}: {}", anchor_idl_path.display(), e); + // Continue to the next file on failure + } + } } diff --git a/crates/client/tests/test_program/fuzz_example3/Cargo.toml b/crates/client/tests/test_program/fuzz_example3/Cargo.toml deleted file mode 100644 index 8998b0bc..00000000 --- a/crates/client/tests/test_program/fuzz_example3/Cargo.toml +++ /dev/null @@ -1,22 +0,0 @@ -[workspace] - -[package] -name = "fuzz_example3" -version = "0.1.0" -description = "Created with Anchor" -edition = "2021" - -[lib] -crate-type = ["cdylib", "lib"] -name = "fuzz_example3" - -[features] -no-entrypoint = [] -no-idl = [] -no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] - -[dependencies] -anchor-lang = "0.29.0" -anchor-spl = "0.29.0" diff --git a/crates/client/tests/test_program/fuzz_example3/Xargo.toml b/crates/client/tests/test_program/fuzz_example3/Xargo.toml deleted file mode 100644 index 475fb71e..00000000 --- a/crates/client/tests/test_program/fuzz_example3/Xargo.toml +++ /dev/null @@ -1,2 +0,0 @@ -[target.bpfel-unknown-unknown.dependencies.std] -features = [] diff --git a/crates/client/tests/test_program/fuzz_example3/src/error.rs b/crates/client/tests/test_program/fuzz_example3/src/error.rs deleted file mode 100644 index 7db7bc64..00000000 --- a/crates/client/tests/test_program/fuzz_example3/src/error.rs +++ /dev/null @@ -1,10 +0,0 @@ -use anchor_lang::prelude::*; - -#[error_code] -pub enum VestingError { - InvalidAmount, - InvalidTimeRange, - InvalidInterval, - Overflow, - Underflow, -} diff --git a/crates/client/tests/test_program/fuzz_example3/src/instructions/initialize.rs b/crates/client/tests/test_program/fuzz_example3/src/instructions/initialize.rs deleted file mode 100644 index 8677c3c7..00000000 --- a/crates/client/tests/test_program/fuzz_example3/src/instructions/initialize.rs +++ /dev/null @@ -1,95 +0,0 @@ -use anchor_lang::prelude::*; -use anchor_spl::token::{ - set_authority, transfer, Mint, SetAuthority, Token, TokenAccount, Transfer, -}; - -use crate::state::Escrow; -use crate::VestingError; - -pub fn _init_vesting( - ctx: Context, - recipient: Pubkey, - amount: u64, - start_at: u64, - end_at: u64, - interval: u64, -) -> Result<()> { - let escrow = &mut ctx.accounts.escrow; - require!(amount > 0, VestingError::InvalidAmount); - // Validate timestamps order (overflow check) - require!(end_at > start_at, VestingError::InvalidTimeRange); - // Validate interval - require!(end_at - start_at > interval, VestingError::InvalidInterval); - require!(interval > 0, VestingError::InvalidInterval); - - escrow.amount = amount; - escrow.start_time = start_at; - escrow.end_time = end_at; - escrow.interval = interval; - escrow.recipient = recipient; - escrow.bump = ctx.bumps.escrow; - - let (escrow_pda_authority, _) = - Pubkey::find_program_address(&[b"ESCROW_PDA_AUTHORITY"], ctx.program_id); - - // Set escrow's token account authority to the program's PDA - set_authority( - CpiContext::new( - ctx.accounts.token_program.to_account_info(), - SetAuthority { - account_or_mint: ctx.accounts.escrow_token_account.to_account_info(), - current_authority: ctx.accounts.sender.to_account_info(), - }, - ), - anchor_spl::token::spl_token::instruction::AuthorityType::AccountOwner, - Some(escrow_pda_authority), - )?; - - // Transfer tokens from sender's token account to escrow's token account - transfer( - CpiContext::new( - ctx.accounts.token_program.to_account_info(), - Transfer { - from: ctx.accounts.sender_token_account.to_account_info(), - to: ctx.accounts.escrow_token_account.to_account_info(), - authority: ctx.accounts.sender.to_account_info(), - }, - ), - amount, - )?; - - Ok(()) -} - -#[derive(Accounts)] -#[instruction(recipient: Pubkey)] -pub struct InitVesting<'info> { - #[account(mut)] - pub sender: Signer<'info>, - - #[account(mut, - token::authority = sender, - token::mint = mint - )] - pub sender_token_account: Account<'info, TokenAccount>, - - #[account( - init, - payer = sender, - space = 8 + 1 + 32 + 5*8, - seeds = [recipient.as_ref(),b"ESCROW_SEED"], - bump - )] - pub escrow: Account<'info, Escrow>, - - #[account( - mut, - token::mint = mint - // token account authority will be transfered to program PDA during instruction execution - )] - pub escrow_token_account: Account<'info, TokenAccount>, - - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, -} diff --git a/crates/client/tests/test_program/fuzz_example3/src/instructions/mod.rs b/crates/client/tests/test_program/fuzz_example3/src/instructions/mod.rs deleted file mode 100644 index 6b2f8f8c..00000000 --- a/crates/client/tests/test_program/fuzz_example3/src/instructions/mod.rs +++ /dev/null @@ -1,5 +0,0 @@ -pub mod initialize; -pub mod withdraw; - -pub use initialize::*; -pub use withdraw::*; diff --git a/crates/client/tests/test_program/fuzz_example3/src/instructions/withdraw.rs b/crates/client/tests/test_program/fuzz_example3/src/instructions/withdraw.rs deleted file mode 100644 index 88cec3a7..00000000 --- a/crates/client/tests/test_program/fuzz_example3/src/instructions/withdraw.rs +++ /dev/null @@ -1,74 +0,0 @@ -use anchor_lang::prelude::*; -use anchor_spl::token::{transfer, Mint, Token, TokenAccount, Transfer}; - -use crate::{state::Escrow, VestingError}; - -pub fn _withdraw_unlocked(ctx: Context) -> Result<()> { - let escrow = &mut ctx.accounts.escrow; - - let current_time = Clock::get()?.unix_timestamp as u64; - let unlocked_amount = escrow - .amount_unlocked(current_time) - .ok_or(VestingError::InvalidAmount)?; - - let seeds = &[ - b"ESCROW_PDA_AUTHORITY".as_ref(), - &[ctx.bumps.escrow_pda_authority], - ]; - - transfer( - CpiContext::new( - ctx.accounts.token_program.to_account_info(), - Transfer { - from: ctx.accounts.escrow_token_account.to_account_info(), - to: ctx.accounts.recipient_token_account.to_account_info(), - authority: ctx.accounts.escrow_pda_authority.to_account_info(), - }, - ) - .with_signer(&[&seeds[..]]), - unlocked_amount, - )?; - - escrow.withdrawal += unlocked_amount; - - Ok(()) -} - -#[derive(Accounts)] -pub struct Withdraw<'info> { - #[account(mut)] - pub recipient: Signer<'info>, - - #[account(mut, - token::mint = mint, - token::authority = recipient - )] - pub recipient_token_account: Account<'info, TokenAccount>, - - #[account( - mut, - has_one = recipient, - close = recipient, - seeds = [escrow.recipient.key().as_ref(),b"ESCROW_SEED"], - bump = escrow.bump - )] - pub escrow: Account<'info, Escrow>, - - #[account( - mut, - token::mint = mint, - token::authority = escrow_pda_authority // only the program has the authority as this is a PDA - )] - pub escrow_token_account: Account<'info, TokenAccount>, - - /// CHECK: we do not read or write to this account - #[account( - seeds = [b"ESCROW_PDA_AUTHORITY"], - bump - )] - pub escrow_pda_authority: AccountInfo<'info>, - - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, -} diff --git a/crates/client/tests/test_program/fuzz_example3/src/lib.rs b/crates/client/tests/test_program/fuzz_example3/src/lib.rs deleted file mode 100644 index b6eab420..00000000 --- a/crates/client/tests/test_program/fuzz_example3/src/lib.rs +++ /dev/null @@ -1,34 +0,0 @@ -use anchor_lang::prelude::*; - -mod error; -mod instructions; -pub mod state; - -use crate::instructions::*; -pub use error::*; -declare_id!("FzwXe6bxBZXcqmkdv37YvFARRvqh2JvPW8RrLiTrZTtP"); - -#[program] -pub mod fuzz_example3 { - use super::*; - - pub fn init_vesting( - ctx: Context, - recipient: Pubkey, - _recipient: anchor_lang::prelude::Pubkey, - amount: u64, - start_at: u64, - end_at: u64, - interval: u64, - ) -> Result<()> { - _init_vesting(ctx, recipient, amount, start_at, end_at, interval) - } - - pub fn withdraw_unlocked(ctx: Context) -> Result<()> { - _withdraw_unlocked(ctx) - } - - pub fn withdraw_dummy(ctx: Context) -> Result<()> { - Ok(()) - } -} diff --git a/crates/client/tests/test_program/fuzz_example3/src/state.rs b/crates/client/tests/test_program/fuzz_example3/src/state.rs deleted file mode 100644 index 35225c4c..00000000 --- a/crates/client/tests/test_program/fuzz_example3/src/state.rs +++ /dev/null @@ -1,38 +0,0 @@ -use anchor_lang::prelude::*; - -#[account] -pub struct Escrow { - pub recipient: Pubkey, - pub amount: u64, - pub withdrawal: u64, - pub start_time: u64, - pub end_time: u64, - pub interval: u64, - pub bump: u8, -} - -impl Escrow { - pub fn amount_unlocked(&self, now: u64) -> Option { - let time = if now < self.end_time { - now - } else { - self.end_time - }; - - let duration = self.end_time.checked_sub(self.start_time)?; - - let interval_amount = self - .amount - .checked_mul(self.interval)? - .checked_div(duration)?; - - let nr_intervals = time - .checked_sub(self.start_time)? - .checked_div(self.interval)? - .checked_add(1)?; - - nr_intervals - .checked_mul(interval_amount)? - .checked_sub(self.withdrawal) - } -} diff --git a/crates/client/tests/test_program_client.rs b/crates/client/tests/test_program_client.rs index c1cc7a58..214245a8 100644 --- a/crates/client/tests/test_program_client.rs +++ b/crates/client/tests/test_program_client.rs @@ -1,45 +1,60 @@ +use std::{ + io::Read, + path::{Path, PathBuf}, +}; + +use anchor_lang_idl_spec::Idl; use anyhow::Error; use fehler::throws; use pretty_assertions::assert_str_eq; -use trident_client::___private::ProgramData; #[throws] #[tokio::test] pub async fn generate_program_client() { - // Generate with this command: - // `trident/examples/escrow/programs/escrow$ cargo expand > escrow_expanded.rs` - // and the content copy to `test_data/expanded_escrow.rs` - let code = include_str!(concat!( - env!("CARGO_MANIFEST_DIR"), - "/tests/test_data/expanded_source_codes/expanded_escrow.rs" - )); - - // for this test we do not need path - let path = String::default(); - - // You can copy the content from the `program_client` crate from an example - // after you've called `makers trident test`. let expected_client_code = include_str!(concat!( env!("CARGO_MANIFEST_DIR"), - "/tests/test_data/expected_source_codes/expected_program_client_code.rs" + "/tests/expected_source_codes/expected_program_client_code.rs" )); - let program_idl = trident_client::___private::parse_to_idl_program("escrow".to_owned(), code)?; + let idl = read_idl()?; + + let mut use_tokens: Vec = vec![]; - let program_data = ProgramData { - code: code.to_string(), - path: path.into(), - program_idl, - }; - let program_data = vec![program_data]; + use_tokens.push(syn::parse_quote! {use trident_client::prelude::*;}); + use_tokens.push(syn::parse_quote! {use trident_client::test::*;}); - let use_modules: Vec = vec![syn::parse_quote! { use trident_client::*; }]; let client_code = trident_client::___private::program_client_generator::generate_source_code( - &program_data, - &use_modules, + &vec![idl], + &use_tokens, ); let client_code = trident_client::___private::Commander::format_program_code(&client_code).await?; assert_str_eq!(client_code, expected_client_code); } + +#[throws] +fn read_idl() -> Idl { + let current_dir = std::env::current_dir()?; + + let anchor_idl_path: PathBuf = [ + current_dir.as_ref(), + Path::new("tests/anchor_idl/example.json"), + ] + .iter() + .collect(); + + let mut idl_file = std::fs::File::open(&anchor_idl_path)?; + + let mut json_content = String::new(); + idl_file.read_to_string(&mut json_content)?; + + // Parse the string of data into an Idl struct + match serde_json::from_str::(&json_content) { + Ok(parsed_idl) => parsed_idl, + Err(e) => { + panic!("Failed to parse {}: {}", anchor_idl_path.display(), e); + // Continue to the next file on failure + } + } +} diff --git a/crates/fuzz/Cargo.toml b/crates/fuzz/Cargo.toml index 1d693bab..b754c50b 100644 --- a/crates/fuzz/Cargo.toml +++ b/crates/fuzz/Cargo.toml @@ -19,22 +19,14 @@ solana-program-test = { workspace = true } # ANCHOR anchor-lang = { workspace = true, features = ["init-if-needed"] } -anchor-syn = { workspace = true } - # ARBITRARY arbitrary = { version = "1.3.0", features = ["derive"] } - # MISC thiserror = "1.0.30" -syn = { version = "1.0.109", features = ["visit"] } -proc-macro2 = { version = "1.0.66", default-features = false } -quote = "1.0.14" -heck = { version = "0.4.0", default-features = false } regex = "1.10.3" prettytable = "0.10.0" serde = { version = "1.0.136", default-features = false } serde_json = "1.0.72" tokio = "1" -convert_case = "0.6.0" diff --git a/crates/fuzz/derive/accounts_snapshots/Cargo.toml b/crates/fuzz/derive/accounts_snapshots/Cargo.toml index 24ed70a8..af3bb679 100644 --- a/crates/fuzz/derive/accounts_snapshots/Cargo.toml +++ b/crates/fuzz/derive/accounts_snapshots/Cargo.toml @@ -13,7 +13,8 @@ description = "trident-accounts-snapshots" proc-macro = true [dependencies] +anchor-syn = { workspace = true } proc-macro2 = { version = "1", features = ["span-locations"] } quote = "1" syn = { version = "1", features = ["full"] } -anchor-syn = { workspace = true } +convert_case = "0.6.0" diff --git a/crates/fuzz/derive/accounts_snapshots/src/lib.rs b/crates/fuzz/derive/accounts_snapshots/src/lib.rs index fc44a00c..6e505e9b 100644 --- a/crates/fuzz/derive/accounts_snapshots/src/lib.rs +++ b/crates/fuzz/derive/accounts_snapshots/src/lib.rs @@ -1,4 +1,5 @@ use anchor_syn::{AccountField, AccountTy}; +use convert_case::{Case, Casing}; use proc_macro2::TokenStream; use quote::{quote, ToTokens}; use syn::parse::{Parse, ParseStream}; @@ -611,9 +612,10 @@ fn deserialize_option_account_loader( fn generate(accs: &TridentAccountsStruct) -> proc_macro2::TokenStream { let context_name = &accs.0.ident; - let snapshot_name = syn::Ident::new(&format!("{}Snapshot", context_name), context_name.span()); + let snapshot_name = syn::Ident::new(&format!("{}Alias", context_name), context_name.span()); + let context_name_snake_case = context_name.to_string().to_case(Case::Snake); let module_name = syn::Ident::new( - &format!("trident_fuzz_{}_snapshot", context_name), + &format!("trident_fuzz_{}_snapshot", context_name_snake_case), context_name.span(), ); diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/Anchor.toml b/examples/fuzz-tests/arbitrary-custom-types-4/Anchor.toml index 3b6ede15..50bda687 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/Anchor.toml +++ b/examples/fuzz-tests/arbitrary-custom-types-4/Anchor.toml @@ -1,4 +1,5 @@ [toolchain] +anchor_version = "0.30.1" [features] seeds = false diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock b/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock index 827b3c8c..061b2229 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock +++ b/examples/fuzz-tests/arbitrary-custom-types-4/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -69,7 +75,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -119,9 +125,9 @@ dependencies = [ [[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", @@ -131,9 +137,9 @@ dependencies = [ [[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.1", @@ -144,9 +150,9 @@ dependencies = [ [[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", @@ -155,9 +161,9 @@ dependencies = [ [[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", @@ -166,9 +172,9 @@ dependencies = [ [[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", @@ -178,20 +184,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -208,9 +220,9 @@ dependencies = [ [[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", @@ -219,9 +231,9 @@ dependencies = [ [[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", @@ -232,9 +244,9 @@ dependencies = [ [[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", @@ -243,9 +255,9 @@ dependencies = [ [[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", @@ -256,24 +268,51 @@ 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.14", + "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 0.3.3", + "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-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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -310,9 +349,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquamarine" @@ -342,6 +381,8 @@ name = "arbitrary-custom-types-4" version = "0.1.0" dependencies = [ "anchor-lang", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] @@ -385,7 +426,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -408,7 +449,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -437,7 +478,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -463,15 +504,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -537,9 +578,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -560,13 +601,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -582,21 +623,21 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -642,9 +683,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -719,11 +760,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.5.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -755,15 +796,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "syn_derive", ] @@ -813,9 +854,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -824,9 +865,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -865,22 +906,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -891,9 +932,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -918,9 +959,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -958,15 +999,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" -version = "1.0.95" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -977,9 +1028,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -993,7 +1044,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1117,9 +1168,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1142,33 +1193,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1194,9 +1245,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1280,12 +1331,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1304,16 +1355,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.60", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1329,13 +1380,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1376,7 +1427,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1415,7 +1466,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1509,13 +1560,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1538,7 +1589,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1602,9 +1653,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1638,13 +1689,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19cbb53d33b57ac4df1f0af6b92c38c107cded663c4aea9fae1189dcfc17cf5" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1653,11 +1704,11 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1681,9 +1732,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1697,9 +1748,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1729,24 +1780,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1835,7 +1886,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1921,9 +1972,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1934,9 +1985,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1967,10 +2018,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tracing", ] @@ -2046,6 +2097,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -2118,9 +2175,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2136,9 +2193,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2229,18 +2286,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -2248,9 +2305,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" [[package]] name = "indexmap" @@ -2264,9 +2321,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2287,9 +2344,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2302,11 +2359,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2328,18 +2385,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2370,15 +2427,15 @@ dependencies = [ [[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.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2386,8 +2443,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2446,15 +2504,15 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "thiserror", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2468,9 +2526,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -2483,9 +2541,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.24.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2493,9 +2551,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2503,9 +2561,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2569,22 +2627,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2691,11 +2759,10 @@ 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", ] @@ -2735,7 +2802,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2749,9 +2816,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2772,9 +2839,9 @@ dependencies = [ [[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", ] @@ -2800,11 +2867,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2816,19 +2883,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2839,9 +2906,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2929,9 +2996,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2945,16 +3012,16 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -3021,7 +3088,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3073,9 +3140,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3085,9 +3152,12 @@ 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 = "predicates" @@ -3105,15 +3175,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3145,7 +3215,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -3160,11 +3230,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -3193,9 +3263,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3217,7 +3287,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3271,9 +3341,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3337,7 +3407,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3392,38 +3462,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3433,9 +3494,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3444,15 +3505,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -3487,7 +3548,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", @@ -3520,7 +3581,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3563,7 +3624,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", "unicode-ident", ] @@ -3579,9 +3640,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3591,9 +3652,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3609,11 +3670,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3665,15 +3726,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3716,7 +3777,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3731,11 +3792,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3744,9 +3805,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3754,9 +3815,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -3772,44 +3833,54 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 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.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3838,10 +3909,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3850,7 +3921,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -3879,7 +3950,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3963,6 +4034,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4021,9 +4098,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142161f13c328e7807fe98fb8f6eaaa5045a8eaf4492414aa81254870c4fc8a0" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -4046,9 +4123,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e8b4b15e353d5f0e0ddd77966c6f01b296bd83569af455da5fd9329356ff642" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" dependencies = [ "arrayref", "bincode", @@ -4072,7 +4149,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4107,9 +4184,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eef9fc8aa3ff804dbf17766ab2d2fe38561adc8b521705faa782c18a108d8" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" dependencies = [ "bincode", "bytemuck", @@ -4128,11 +4205,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ - "borsh 1.5.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -4145,9 +4222,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741279a09bf5ea1a3d17e591db7b189e163722e5c46423308c6a6165bea5e74d" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", @@ -4156,9 +4233,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66768544951feb91c3470e255d4613295b5cc5a58a9cc6a4207ab9a0178cfe9" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" dependencies = [ "bincode", "crossbeam-channel", @@ -4176,9 +4253,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e9dd5e42193260cca0794bf4ab9e248f44b3d9710041f241b130d26ed682bc" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -4195,16 +4272,16 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7b34296d69867253671a71a2231b8d5b4a810bd7a5c1c603e7b542832d5980" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" dependencies = [ "bv", "bytemuck", "log", "memmap2 0.5.10", "modular-bitfield", - "num_enum 0.7.2", + "num_enum 0.7.3", "rand 0.8.5", "solana-measure", "solana-sdk", @@ -4213,9 +4290,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9f61034a61db538a41700b6df0b4b9f0392038adaf780150481923ff94356" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -4230,9 +4307,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -4246,9 +4323,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -4273,16 +4350,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2bd5a986d7cac1b4ffb4344413b70b6f21fd7ffa92a985911756b4ac7682a" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -4306,9 +4383,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca100b2bdd7e455f5f0b9791bc204dacd684a0373ad1032697dbad43f34e527f" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4316,9 +4393,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d28779e92a11e32a89ee453edc7d89394d3a68d8c4b75ef0ffb833944c588" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -4330,15 +4407,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7d0022ded19dca32ced5528c6a050596877fc8b9a89322d876960a89466e1b" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -4352,9 +4429,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd3c63699df1680535daee8e486bd496e2ec849c427de4b6a42d4f1b27430949" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" dependencies = [ "lazy_static", "log", @@ -4376,9 +4453,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4401,21 +4478,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c566ebf0da216efc70054bf2d6d06c16fe44b63402c6f3bb04f6a88d8571d9b" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" dependencies = [ "log", "solana-measure", @@ -4426,9 +4503,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79ef26804612173c95be8da84df3128d648173cf1f746de8f183ec8dbedd92" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -4437,9 +4514,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f716a5f1c2f4b562fb008a0cc7d7c0d889cff802a7f8177fdf28772ae1ed9" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -4447,9 +4524,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf1705d52e4f123856725e1b3842cd4928b954ff62391a95af142a5adc58ac6" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -4462,9 +4539,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f2634fd50743e2ca075e663e07b0bd5c2f94db0ac320ce5bc2022e0002d82d" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4490,9 +4567,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0264d7093d44c239d9eb41beb6877b7b1eea5ad8809c93c1d9ab0c840ba390" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4519,9 +4596,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4529,11 +4606,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4541,7 +4618,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.14", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -4550,7 +4627,7 @@ dependencies = [ "light-poseidon", "log", "memoffset 0.9.1", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", "parking_lot", @@ -4574,9 +4651,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dc9f666a8e4f93166ce58eea9dfbf275e5cad461b2f1bbfa06538718dc3212" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4602,9 +4679,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2760112327ffce892f6a21030f7c9e4b6da3ded8c8eadf1dbfffcb5a754c61db" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ "assert_matches", "async-trait", @@ -4632,9 +4709,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdcbdad685b87475a91909fdb442d2edfabc2870110580c7f0cf7eb7883f97" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" dependencies = [ "crossbeam-channel", "futures-util", @@ -4657,9 +4734,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056e909037b05097d2ff0181cb7e3d26876d8dff6d50701463a61e990cf84afd" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4684,9 +4761,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93a5e1ef891dca2cca907f7196b6a5d3b80af4183f2be0f981906b16711ff5d" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4694,9 +4771,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c06eaf47d9a98ba22e890e68868f5d48c91e01268c541a53b5960288b617d6" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4713,9 +4790,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1d4b6f1f4e3dab7509401e85edc1c1ac208c61819de90178e01cf162c9c051" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4739,9 +4816,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31feddef24d3e0aab189571adea7f109639ef6179fcd3cd34ffc8c73d3409f1" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4761,9 +4838,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1837728262063723c659e4b8c0acf0baa99cd38cb333511456465d2c9e654474" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4774,9 +4851,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3480088ad0ffb701ada496f19754b4ff737e516c6b5f1231508e50ae2e0ea3" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" dependencies = [ "aquamarine", "arrayref", @@ -4805,7 +4882,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4851,15 +4928,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50cac89269a01235f6b421bc580132191f4df388f4265513e78fd00cf864dd" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 1.5.0", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4878,7 +4955,7 @@ dependencies = [ "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -4906,15 +4983,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4925,9 +5002,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0deed4fe8bb31ff178d8b7e8295bc81e6e1d704fc0e2c5565f58d9eb8feec89d" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" dependencies = [ "crossbeam-channel", "log", @@ -4941,9 +5018,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea02d44b82ed0eb271871cf8a1b8179a0ab50f4f995e7d8ae691c1971bd0a0e" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" dependencies = [ "bincode", "log", @@ -4956,16 +5033,16 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a20843e8370adb3c04f47caa79ffdc92ae1bf078ad26530be1bca5d7bdd5d2" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -4989,9 +5066,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01294e45b407b7d4c8ff546af6f60344efd6591cf162c88e231ee3ba2c544672" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -5003,9 +5080,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74da8f36b89b28c47e5ba3bad5279ff3dfea5829154882845d4821fc76ff497" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -5018,14 +5095,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f2fd4b4aeffa14b9c5be9913072ea8e72ca261254a65a999f3d2fd70e7a660" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -5042,9 +5119,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3efa0d30f78dbc74e795638b053dd6ec7230739301e7f0e06b586f7731fd25c8" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -5067,9 +5144,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32af58cadd37be19d04e0f3877104b8640bccc4be8ca1dbf431549b399b784c2" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5082,9 +5159,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c7cef8aa9f1c633bf09dd91b8e635b6b30c40236652031b1800b245dc1bd02" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -5098,9 +5175,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12945ee508c751ffdce58f976be6e58a05529ce0032c1f7db76eed6a8d76b33c" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" dependencies = [ "crossbeam-channel", "itertools", @@ -5117,9 +5194,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725a39044d455c08fe83fca758e94e5ddfaa25f6e2e2cfd5c31d7afdcad8de38" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -5139,9 +5216,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39263f3e47a160b9b67896f2225d56e6872905c066152cbe61f5fd201c52a6d2" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -5153,9 +5230,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630dc0b5f6250cf6a4c8b2bd3895283738915e83eba5453db20bb02b2527f302" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5182,9 +5259,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -5239,9 +5316,9 @@ dependencies = [ [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" dependencies = [ "bytemuck", "solana-program", @@ -5256,7 +5333,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5268,7 +5345,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", "thiserror", ] @@ -5283,9 +5360,9 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" dependencies = [ "borsh 0.10.3", "bytemuck", @@ -5296,9 +5373,9 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ "num-derive 0.4.2", "num-traits", @@ -5316,14 +5393,14 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", @@ -5358,7 +5435,7 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -5417,9 +5494,9 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", @@ -5446,6 +5523,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.24.1" @@ -5493,9 +5576,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5511,7 +5594,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5555,9 +5638,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5601,14 +5684,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5655,7 +5739,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5666,7 +5750,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "test-case-core", ] @@ -5687,22 +5771,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5767,9 +5851,9 @@ 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", ] @@ -5782,32 +5866,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5879,16 +5962,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -5901,11 +5983,26 @@ 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.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5913,27 +6010,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5955,7 +6054,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5994,16 +6093,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6031,7 +6132,7 @@ dependencies = [ "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", @@ -6045,6 +6146,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6052,7 +6154,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6061,7 +6163,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6070,7 +6172,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6104,7 +6206,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", @@ -6173,15 +6275,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -6232,9 +6334,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -6261,9 +6363,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -6304,34 +6406,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6341,9 +6444,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6351,28 +6454,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6411,11 +6514,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6430,7 +6533,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6448,7 +6551,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -6468,18 +6580,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6490,9 +6602,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6502,9 +6614,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6514,15 +6626,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -6532,9 +6644,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6544,9 +6656,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6556,9 +6668,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6568,9 +6680,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -6581,6 +6693,15 @@ 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 = "winreg" version = "0.50.0" @@ -6631,22 +6752,23 @@ dependencies = [ [[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.60", + "syn 2.0.76", ] [[package]] @@ -6666,7 +6788,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -6690,9 +6812,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/Cargo.toml b/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/Cargo.toml index f1031ee4..981f60fd 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/Cargo.toml +++ b/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/Cargo.toml @@ -9,11 +9,15 @@ crate-type = ["cdylib", "lib"] name = "arbitrary_custom_types_4" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] -anchor-lang = "0.29.0" +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } +anchor-lang = "0.30.1" diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/src/lib.rs b/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/src/lib.rs index c6b6c69a..02d8f226 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/src/lib.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/programs/arbitrary-custom-types-4/src/lib.rs @@ -4,6 +4,8 @@ declare_id!("CdWkp3CY9CAjBQP73SDCwDDfsumwY7e6DDSjrN5u8Cii"); const MAGIC_NUMBER: u8 = 254; +use trident_derive_accounts_snapshots::AccountsSnapshots; + #[program] pub mod arbitrary_custom_types_4 { use super::*; @@ -48,7 +50,7 @@ pub fn buggy_math_function(input1: u8, input2: u8) -> u8 { input1 / divisor } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Initialize<'info> { #[account(init, payer = user, space = 8 + 40)] pub counter: Account<'info, Counter>, @@ -59,7 +61,7 @@ pub struct Initialize<'info> { pub system_program: Program<'info, System>, } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Update<'info> { #[account(mut, has_one = authority)] pub counter: Account<'info, Counter>, diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/Cargo.toml index 070d4827..62222741 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/Cargo.toml @@ -18,3 +18,4 @@ path = "../../../../../crates/client" [dependencies.arbitrary-custom-types-4] path = "../../programs/arbitrary-custom-types-4" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index 154ecb8a..00000000 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,82 +0,0 @@ -use anchor_lang::prelude::*; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitializeSnapshot<'info> { - pub counter: Option>, - pub user: Signer<'info>, - pub system_program: Program<'info, System>, -} -pub struct UpdateSnapshot<'info> { - pub counter: Account<'info, arbitrary_custom_types_4::Counter>, - pub authority: Signer<'info>, -} -impl<'info> InitializeSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let counter: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("counter".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("counter".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "counter".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let user: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("user".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("user".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("user".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - counter, - user, - system_program, - }) - } -} -impl<'info> UpdateSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let counter: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("counter".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("counter".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("counter".to_string()))?; - let authority: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("authority".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("authority".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("authority".to_string()))?; - Ok(Self { counter, authority }) - } -} diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 55f253da..6558ef61 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,8 +1,13 @@ pub mod arbitrary_custom_types_4_fuzz_instructions { - use crate::accounts_snapshots::*; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; + + use arbitrary_custom_types_4::trident_fuzz_initialize_snapshot::InitializeAlias; + use arbitrary_custom_types_4::trident_fuzz_update_snapshot::UpdateAlias; + + type InitializeSnapshot<'info> = InitializeAlias<'info>; + type UpdateSnapshot<'info> = UpdateAlias<'info>; + #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), @@ -67,7 +72,7 @@ pub mod arbitrary_custom_types_4_fuzz_instructions { let acc_meta = arbitrary_custom_types_4::accounts::Initialize { counter: counter.pubkey(), user: user.pubkey(), - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((vec![user, counter], acc_meta)) @@ -119,6 +124,7 @@ pub mod arbitrary_custom_types_4_fuzz_instructions { user: AccountsStorage, counter: AccountsStorage, } + // ------------------------------------------------------------------- // ------------------------------------------------------------------- // ------------------------------------------------------------------- diff --git a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 30fa2e69..99215f18 100644 --- a/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/arbitrary-custom-types-4/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,14 +1,17 @@ -use arbitrary_custom_types_4::entry as entry_arbitrary_custom_types_4; -use arbitrary_custom_types_4::ID as PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4; -const PROGRAM_NAME_ARBITRARY_CUSTOM_TYPES_4: &str = "arbitrary_custom_types_4"; -use fuzz_instructions::arbitrary_custom_types_4_fuzz_instructions::FuzzInstruction as FuzzInstruction_arbitrary_custom_types_4; use fuzz_instructions::arbitrary_custom_types_4_fuzz_instructions::Initialize; use fuzz_instructions::arbitrary_custom_types_4_fuzz_instructions::Update; use trident_client::fuzzing::*; -mod accounts_snapshots; + mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_arbitrary_custom_types_4; +use arbitrary_custom_types_4::entry as entry_arbitrary_custom_types_4; +use arbitrary_custom_types_4::ID as PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4; + +const PROGRAM_NAME_ARBITRARY_CUSTOM_TYPES_4: &str = "arbitrary_custom_types_4"; + +use fuzz_instructions::arbitrary_custom_types_4_fuzz_instructions::FuzzInstruction as fuzz_instruction_arbitrary_custom_types_4; + +pub type FuzzInstruction = fuzz_instruction_arbitrary_custom_types_4; struct MyFuzzData; @@ -20,25 +23,21 @@ impl FuzzDataBuilder for MyFuzzData { } } +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_arbitrary_custom_types_4 = FuzzingProgram::new( + PROGRAM_NAME_ARBITRARY_CUSTOM_TYPES_4, + &PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4, + processor!(convert_entry!(entry_arbitrary_custom_types_4)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_arbitrary_custom_types_4]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4, &mut client); +} + fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_ARBITRARY_CUSTOM_TYPES_4, - &PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4, - processor!(convert_entry!(entry_arbitrary_custom_types_4)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_ARBITRARY_CUSTOM_TYPES_4, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/Anchor.toml b/examples/fuzz-tests/arbitrary-limit-inputs-5/Anchor.toml index 8fd375d5..faea9dbf 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/Anchor.toml +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/Anchor.toml @@ -1,4 +1,5 @@ [toolchain] +anchor_version = "0.30.1" [features] resolution = true diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock b/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock index 73e094f2..177b4324 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/Cargo.lock @@ -6280,16 +6280,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6331,6 +6333,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6338,7 +6341,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6347,7 +6350,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6356,7 +6359,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6368,13 +6371,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6383,14 +6381,13 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/instructions/initialize.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/instructions/initialize.rs index c123d745..fe735548 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/instructions/initialize.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/instructions/initialize.rs @@ -8,7 +8,7 @@ use crate::state::Escrow; use crate::VestingError; pub fn _init_vesting( - ctx: Context, + ctx: Context, recipient: Pubkey, amount: u64, start_at: u64, @@ -64,7 +64,7 @@ pub fn _init_vesting( #[derive(AccountsSnapshots, Accounts)] #[instruction(recipient: Pubkey)] -pub struct InitVesting<'info> { +pub struct InitVestingContext<'info> { #[account(mut)] pub sender: Signer<'info>, diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/lib.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/lib.rs index 48bcf82c..ee8380bf 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/lib.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/programs/arbitrary-limit-inputs-5/src/lib.rs @@ -15,7 +15,7 @@ pub mod arbitrary_limit_inputs_5 { use super::*; pub fn init_vesting( - ctx: Context, + ctx: Context, recipient: Pubkey, amount: u64, start_at: u64, diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 0758abde..170c2e64 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,9 +1,13 @@ pub mod arbitrary_limit_inputs_5_fuzz_instructions { - use arbitrary_limit_inputs_5::instructions::initialize::trident_fuzz_InitVesting_snapshot::InitVestingSnapshot; - use arbitrary_limit_inputs_5::instructions::withdraw::trident_fuzz_WithdrawUnlocked_snapshot::WithdrawUnlockedSnapshot; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; + + use arbitrary_limit_inputs_5::trident_fuzz_init_vesting_context_snapshot::InitVestingContextAlias; + use arbitrary_limit_inputs_5::trident_fuzz_withdraw_unlocked_snapshot::WithdrawUnlockedAlias; + + type InitVestingSnapshot<'info> = InitVestingContextAlias<'info>; + type WithdrawUnlockedSnapshot<'info> = WithdrawUnlockedAlias<'info>; + #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { InitVesting(InitVesting), @@ -190,14 +194,14 @@ pub mod arbitrary_limit_inputs_5_fuzz_instructions { ) .unwrap(); - let acc_meta = arbitrary_limit_inputs_5::accounts::InitVesting { + let acc_meta = arbitrary_limit_inputs_5::accounts::InitVestingContext { sender: sender.pubkey(), sender_token_account, escrow: escrow.pubkey(), escrow_token_account, mint, token_program: anchor_spl::token::ID, - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); @@ -290,7 +294,7 @@ pub mod arbitrary_limit_inputs_5_fuzz_instructions { escrow_pda_authority: escrow_pda_authority.pubkey(), mint, token_program: anchor_spl::token::ID, - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((vec![recipient], acc_meta)) diff --git a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index b5baf295..f6212277 100644 --- a/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/arbitrary-limit-inputs-5/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,14 +1,19 @@ -use arbitrary_limit_inputs_5::entry as entry_arbitrary_limit_inputs_5; -use arbitrary_limit_inputs_5::ID as PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5; -const PROGRAM_NAME_ARBITRARY_LIMIT_INPUTS_5: &str = "arbitrary_limit_inputs_5"; -use fuzz_instructions::arbitrary_limit_inputs_5_fuzz_instructions::FuzzInstruction as FuzzInstruction_arbitrary_limit_inputs_5; use fuzz_instructions::arbitrary_limit_inputs_5_fuzz_instructions::InitVesting; +use fuzz_instructions::arbitrary_limit_inputs_5_fuzz_instructions::WithdrawUnlocked; use trident_client::fuzzing::*; + mod fuzz_instructions; -struct MyFuzzData; +use arbitrary_limit_inputs_5::entry as entry_arbitrary_limit_inputs_5; +use arbitrary_limit_inputs_5::ID as PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5; + +const PROGRAM_NAME_ARBITRARY_LIMIT_INPUTS_5: &str = "arbitrary_limit_inputs_5"; -pub type FuzzInstruction = FuzzInstruction_arbitrary_limit_inputs_5; +use fuzz_instructions::arbitrary_limit_inputs_5_fuzz_instructions::FuzzInstruction as fuzz_instruction_arbitrary_limit_inputs_5; + +pub type FuzzInstruction = fuzz_instruction_arbitrary_limit_inputs_5; + +struct MyFuzzData; impl FuzzDataBuilder for MyFuzzData { fn pre_ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { @@ -16,27 +21,30 @@ impl FuzzDataBuilder for MyFuzzData { Ok(vec![init_ix]) } + fn ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + let withdraw_ix = FuzzInstruction::WithdrawUnlocked(WithdrawUnlocked::arbitrary(u)?); + Ok(vec![withdraw_ix]) + } + fn post_ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + Ok(vec![]) + } +} + +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_arbitrary_limit_inputs_5 = FuzzingProgram::new( + PROGRAM_NAME_ARBITRARY_LIMIT_INPUTS_5, + &PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5, + processor!(convert_entry!(entry_arbitrary_limit_inputs_5)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_arbitrary_limit_inputs_5]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5, &mut client); } fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_ARBITRARY_LIMIT_INPUTS_5, - &PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5, - processor!(convert_entry!(entry_arbitrary_limit_inputs_5)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_ARBITRARY_LIMIT_INPUTS_5, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/cpi-metaplex-7/Anchor.toml b/examples/fuzz-tests/cpi-metaplex-7/Anchor.toml index 1cedce83..b196750d 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/Anchor.toml +++ b/examples/fuzz-tests/cpi-metaplex-7/Anchor.toml @@ -1,4 +1,5 @@ [toolchain] +anchor_version = "0.30.1" [features] resolution = true diff --git a/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock b/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock index c32d1099..4f35493e 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock +++ b/examples/fuzz-tests/cpi-metaplex-7/Cargo.lock @@ -6294,16 +6294,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6345,6 +6347,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6352,7 +6355,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6361,7 +6364,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6370,7 +6373,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6404,7 +6407,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", diff --git a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 639366db..19cce1d6 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,7 +1,10 @@ pub mod cpi_metaplex_7_fuzz_instructions { - use cpi_metaplex_7::trident_fuzz_Initialize_snapshot::InitializeSnapshot; use solana_sdk::native_token::LAMPORTS_PER_SOL; use trident_client::fuzzing::*; + + use cpi_metaplex_7::trident_fuzz_initialize_snapshot::InitializeAlias; + + type InitializeSnapshot<'info> = InitializeAlias<'info>; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), @@ -38,9 +41,9 @@ pub mod cpi_metaplex_7_fuzz_instructions { ) -> Result { let data = cpi_metaplex_7::instruction::Initialize { input: self.data.input, - name: "NAME1".to_string(), - symbol: "SMB1".to_string(), - uri: "URI1".to_string(), + name: self.data.name.clone(), + symbol: self.data.symbol.clone(), + uri: self.data.uri.clone(), }; Ok(data) } diff --git a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 6398e7af..4f8b2466 100644 --- a/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/cpi-metaplex-7/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,12 +1,16 @@ -use cpi_metaplex_7::entry as entry_cpi_metaplex_7; -use cpi_metaplex_7::ID as PROGRAM_ID_CPI_METAPLEX_7; -const PROGRAM_NAME_CPI_METAPLEX_7: &str = "cpi_metaplex_7"; -use fuzz_instructions::cpi_metaplex_7_fuzz_instructions::FuzzInstruction as FuzzInstruction_cpi_metaplex_7; use fuzz_instructions::cpi_metaplex_7_fuzz_instructions::Initialize; use trident_client::fuzzing::*; + mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_cpi_metaplex_7; +use cpi_metaplex_7::entry as entry_cpi_metaplex_7; +use cpi_metaplex_7::ID as PROGRAM_ID_CPI_METAPLEX_7; + +const PROGRAM_NAME_CPI_METAPLEX_7: &str = "cpi_metaplex_7"; + +use fuzz_instructions::cpi_metaplex_7_fuzz_instructions::FuzzInstruction as fuzz_instruction_cpi_metaplex_7; + +pub type FuzzInstruction = fuzz_instruction_cpi_metaplex_7; struct MyFuzzData; @@ -23,30 +27,23 @@ impl FuzzDataBuilder for MyFuzzData { } } +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_cpi_metaplex_7 = FuzzingProgram::new( + PROGRAM_NAME_CPI_METAPLEX_7, + &PROGRAM_ID_CPI_METAPLEX_7, + processor!(convert_entry!(entry_cpi_metaplex_7)), + ); + + let metaplex = FuzzingProgram::new("metaplex-token-metadata", &mpl_token_metadata::ID, None); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_cpi_metaplex_7, metaplex]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_CPI_METAPLEX_7, &mut client); +} + fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_CPI_METAPLEX_7, - &PROGRAM_ID_CPI_METAPLEX_7, - processor!(convert_entry!(entry_cpi_metaplex_7)) - ); - let metaplex = FuzzingProgram::new( - "metaplex-token-metadata", - &mpl_token_metadata::ID, - None - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1,metaplex]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_CPI_METAPLEX_7, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/hello_world/Anchor.toml b/examples/fuzz-tests/hello_world/Anchor.toml index c36f1af3..13b517a0 100644 --- a/examples/fuzz-tests/hello_world/Anchor.toml +++ b/examples/fuzz-tests/hello_world/Anchor.toml @@ -1,4 +1,5 @@ [toolchain] +anchor_version = "0.30.1" [features] seeds = false diff --git a/examples/fuzz-tests/hello_world/Cargo.lock b/examples/fuzz-tests/hello_world/Cargo.lock index a167850b..7cec2936 100644 --- a/examples/fuzz-tests/hello_world/Cargo.lock +++ b/examples/fuzz-tests/hello_world/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -69,7 +75,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -119,9 +125,9 @@ dependencies = [ [[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", @@ -131,9 +137,9 @@ dependencies = [ [[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.1", @@ -144,9 +150,9 @@ dependencies = [ [[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", @@ -155,9 +161,9 @@ dependencies = [ [[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", @@ -166,9 +172,9 @@ dependencies = [ [[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", @@ -178,20 +184,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -208,9 +220,9 @@ dependencies = [ [[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", @@ -219,9 +231,9 @@ dependencies = [ [[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", @@ -232,9 +244,9 @@ dependencies = [ [[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", @@ -243,9 +255,9 @@ dependencies = [ [[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", @@ -256,24 +268,51 @@ 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.14", + "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 0.3.3", + "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-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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -310,9 +349,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquamarine" @@ -378,7 +417,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -401,7 +440,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -430,7 +469,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -456,15 +495,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -530,9 +569,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -553,13 +592,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -575,21 +614,21 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -635,9 +674,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -712,11 +751,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0901fc8eb0aca4c83be0106d6f2db17d86a08dfc2c25f0e84464bf381158add6" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.4.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -748,15 +787,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51670c3aa053938b0ee3bd67c3817e471e626151131b934038e83c5bf8de48f5" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "syn_derive", ] @@ -806,9 +845,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -817,9 +856,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -858,22 +897,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -884,9 +923,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -911,9 +950,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -951,15 +990,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" -version = "1.0.95" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -970,9 +1019,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -986,7 +1035,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1110,9 +1159,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1135,33 +1184,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1187,9 +1236,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1273,12 +1322,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1297,16 +1346,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.60", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1322,13 +1371,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1369,7 +1418,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1408,7 +1457,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1502,13 +1551,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1531,7 +1580,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1595,9 +1644,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1631,13 +1680,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19cbb53d33b57ac4df1f0af6b92c38c107cded663c4aea9fae1189dcfc17cf5" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1646,11 +1695,11 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1674,9 +1723,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1690,9 +1739,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1722,24 +1771,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1828,7 +1877,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1914,9 +1963,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1927,9 +1976,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1960,10 +2009,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tracing", ] @@ -2029,6 +2078,8 @@ name = "hello_world" version = "0.1.0" dependencies = [ "anchor-lang", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] @@ -2046,6 +2097,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -2118,9 +2175,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2136,9 +2193,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2229,18 +2286,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -2248,9 +2305,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" [[package]] name = "indexmap" @@ -2264,9 +2321,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2287,9 +2344,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2302,11 +2359,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2328,18 +2385,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2370,15 +2427,15 @@ dependencies = [ [[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.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2386,8 +2443,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2446,15 +2504,15 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "thiserror", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2468,9 +2526,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -2483,9 +2541,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.24.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2493,9 +2551,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2503,9 +2561,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2569,22 +2627,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2691,11 +2759,10 @@ 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", ] @@ -2735,7 +2802,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2749,9 +2816,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2772,9 +2839,9 @@ dependencies = [ [[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", ] @@ -2800,11 +2867,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2816,19 +2883,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2839,9 +2906,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2929,9 +2996,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2945,16 +3012,16 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -3021,7 +3088,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3073,9 +3140,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3085,9 +3152,12 @@ 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 = "predicates" @@ -3105,15 +3175,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3145,7 +3215,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -3160,11 +3230,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -3193,9 +3263,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3217,7 +3287,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3271,9 +3341,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3337,7 +3407,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3392,38 +3462,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3433,9 +3494,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3444,15 +3505,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -3487,7 +3548,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", @@ -3520,7 +3581,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3563,7 +3624,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", "unicode-ident", ] @@ -3579,9 +3640,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3591,9 +3652,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3609,11 +3670,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3665,15 +3726,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3716,7 +3777,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3731,11 +3792,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3744,9 +3805,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3754,9 +3815,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -3772,44 +3833,54 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 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.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3838,10 +3909,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3850,7 +3921,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -3879,7 +3950,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3963,6 +4034,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4021,9 +4098,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142161f13c328e7807fe98fb8f6eaaa5045a8eaf4492414aa81254870c4fc8a0" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -4046,9 +4123,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e8b4b15e353d5f0e0ddd77966c6f01b296bd83569af455da5fd9329356ff642" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" dependencies = [ "arrayref", "bincode", @@ -4072,7 +4149,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4107,9 +4184,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eef9fc8aa3ff804dbf17766ab2d2fe38561adc8b521705faa782c18a108d8" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" dependencies = [ "bincode", "bytemuck", @@ -4128,11 +4205,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ - "borsh 1.4.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -4145,9 +4222,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741279a09bf5ea1a3d17e591db7b189e163722e5c46423308c6a6165bea5e74d" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", @@ -4156,9 +4233,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66768544951feb91c3470e255d4613295b5cc5a58a9cc6a4207ab9a0178cfe9" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" dependencies = [ "bincode", "crossbeam-channel", @@ -4176,9 +4253,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e9dd5e42193260cca0794bf4ab9e248f44b3d9710041f241b130d26ed682bc" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -4195,16 +4272,16 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7b34296d69867253671a71a2231b8d5b4a810bd7a5c1c603e7b542832d5980" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" dependencies = [ "bv", "bytemuck", "log", "memmap2 0.5.10", "modular-bitfield", - "num_enum 0.7.2", + "num_enum 0.7.3", "rand 0.8.5", "solana-measure", "solana-sdk", @@ -4213,9 +4290,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9f61034a61db538a41700b6df0b4b9f0392038adaf780150481923ff94356" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -4230,9 +4307,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -4246,9 +4323,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -4273,16 +4350,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2bd5a986d7cac1b4ffb4344413b70b6f21fd7ffa92a985911756b4ac7682a" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -4306,9 +4383,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca100b2bdd7e455f5f0b9791bc204dacd684a0373ad1032697dbad43f34e527f" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4316,9 +4393,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d28779e92a11e32a89ee453edc7d89394d3a68d8c4b75ef0ffb833944c588" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -4330,15 +4407,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7d0022ded19dca32ced5528c6a050596877fc8b9a89322d876960a89466e1b" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -4352,9 +4429,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd3c63699df1680535daee8e486bd496e2ec849c427de4b6a42d4f1b27430949" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" dependencies = [ "lazy_static", "log", @@ -4376,9 +4453,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4401,21 +4478,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c566ebf0da216efc70054bf2d6d06c16fe44b63402c6f3bb04f6a88d8571d9b" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" dependencies = [ "log", "solana-measure", @@ -4426,9 +4503,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79ef26804612173c95be8da84df3128d648173cf1f746de8f183ec8dbedd92" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -4437,9 +4514,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f716a5f1c2f4b562fb008a0cc7d7c0d889cff802a7f8177fdf28772ae1ed9" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -4447,9 +4524,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf1705d52e4f123856725e1b3842cd4928b954ff62391a95af142a5adc58ac6" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -4462,9 +4539,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f2634fd50743e2ca075e663e07b0bd5c2f94db0ac320ce5bc2022e0002d82d" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4490,9 +4567,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0264d7093d44c239d9eb41beb6877b7b1eea5ad8809c93c1d9ab0c840ba390" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4519,9 +4596,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4529,11 +4606,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.4.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4541,7 +4618,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.14", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -4550,7 +4627,7 @@ dependencies = [ "light-poseidon", "log", "memoffset 0.9.1", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", "parking_lot", @@ -4574,9 +4651,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dc9f666a8e4f93166ce58eea9dfbf275e5cad461b2f1bbfa06538718dc3212" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4602,9 +4679,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2760112327ffce892f6a21030f7c9e4b6da3ded8c8eadf1dbfffcb5a754c61db" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ "assert_matches", "async-trait", @@ -4632,9 +4709,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdcbdad685b87475a91909fdb442d2edfabc2870110580c7f0cf7eb7883f97" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" dependencies = [ "crossbeam-channel", "futures-util", @@ -4657,9 +4734,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056e909037b05097d2ff0181cb7e3d26876d8dff6d50701463a61e990cf84afd" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4684,9 +4761,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93a5e1ef891dca2cca907f7196b6a5d3b80af4183f2be0f981906b16711ff5d" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4694,9 +4771,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c06eaf47d9a98ba22e890e68868f5d48c91e01268c541a53b5960288b617d6" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4713,9 +4790,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1d4b6f1f4e3dab7509401e85edc1c1ac208c61819de90178e01cf162c9c051" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4739,9 +4816,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31feddef24d3e0aab189571adea7f109639ef6179fcd3cd34ffc8c73d3409f1" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4761,9 +4838,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1837728262063723c659e4b8c0acf0baa99cd38cb333511456465d2c9e654474" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4774,9 +4851,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3480088ad0ffb701ada496f19754b4ff737e516c6b5f1231508e50ae2e0ea3" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" dependencies = [ "aquamarine", "arrayref", @@ -4805,7 +4882,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4851,15 +4928,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50cac89269a01235f6b421bc580132191f4df388f4265513e78fd00cf864dd" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 1.4.0", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4878,7 +4955,7 @@ dependencies = [ "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -4906,15 +4983,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4925,9 +5002,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0deed4fe8bb31ff178d8b7e8295bc81e6e1d704fc0e2c5565f58d9eb8feec89d" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" dependencies = [ "crossbeam-channel", "log", @@ -4941,9 +5018,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea02d44b82ed0eb271871cf8a1b8179a0ab50f4f995e7d8ae691c1971bd0a0e" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" dependencies = [ "bincode", "log", @@ -4956,16 +5033,16 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a20843e8370adb3c04f47caa79ffdc92ae1bf078ad26530be1bca5d7bdd5d2" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -4989,9 +5066,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01294e45b407b7d4c8ff546af6f60344efd6591cf162c88e231ee3ba2c544672" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -5003,9 +5080,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74da8f36b89b28c47e5ba3bad5279ff3dfea5829154882845d4821fc76ff497" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -5018,14 +5095,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f2fd4b4aeffa14b9c5be9913072ea8e72ca261254a65a999f3d2fd70e7a660" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -5042,9 +5119,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3efa0d30f78dbc74e795638b053dd6ec7230739301e7f0e06b586f7731fd25c8" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -5067,9 +5144,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32af58cadd37be19d04e0f3877104b8640bccc4be8ca1dbf431549b399b784c2" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5082,9 +5159,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c7cef8aa9f1c633bf09dd91b8e635b6b30c40236652031b1800b245dc1bd02" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -5098,9 +5175,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12945ee508c751ffdce58f976be6e58a05529ce0032c1f7db76eed6a8d76b33c" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" dependencies = [ "crossbeam-channel", "itertools", @@ -5117,9 +5194,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725a39044d455c08fe83fca758e94e5ddfaa25f6e2e2cfd5c31d7afdcad8de38" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -5139,9 +5216,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39263f3e47a160b9b67896f2225d56e6872905c066152cbe61f5fd201c52a6d2" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -5153,9 +5230,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630dc0b5f6250cf6a4c8b2bd3895283738915e83eba5453db20bb02b2527f302" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5182,9 +5259,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -5239,9 +5316,9 @@ dependencies = [ [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" dependencies = [ "bytemuck", "solana-program", @@ -5256,7 +5333,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5268,7 +5345,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", "thiserror", ] @@ -5283,9 +5360,9 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" dependencies = [ "borsh 0.10.3", "bytemuck", @@ -5296,9 +5373,9 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ "num-derive 0.4.2", "num-traits", @@ -5316,14 +5393,14 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", @@ -5358,7 +5435,7 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -5417,9 +5494,9 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", @@ -5446,6 +5523,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.24.1" @@ -5493,9 +5576,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5511,7 +5594,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5555,9 +5638,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5601,14 +5684,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5655,7 +5739,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5666,7 +5750,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "test-case-core", ] @@ -5687,22 +5771,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5767,9 +5851,9 @@ 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", ] @@ -5782,32 +5866,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5879,16 +5962,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -5901,11 +5983,26 @@ 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.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5913,27 +6010,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5955,7 +6054,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5994,16 +6093,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6031,7 +6132,7 @@ dependencies = [ "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", @@ -6045,6 +6146,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6052,7 +6154,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6061,7 +6163,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6070,7 +6172,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6082,13 +6184,8 @@ name = "trident-fuzz" version = "0.1.0" dependencies = [ "anchor-lang", - "anchor-syn", "arbitrary", - "convert_case", - "heck 0.4.1", "prettytable", - "proc-macro2", - "quote", "regex", "serde", "serde_json", @@ -6097,14 +6194,13 @@ dependencies = [ "solana-program-test", "solana-sdk", "spl-token", - "syn 1.0.109", "thiserror", "tokio", ] [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", @@ -6173,15 +6269,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -6232,9 +6328,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -6261,9 +6357,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -6304,34 +6400,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6341,9 +6438,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6351,28 +6448,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6411,11 +6508,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6430,7 +6527,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6448,7 +6545,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -6468,18 +6574,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6490,9 +6596,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6502,9 +6608,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6514,15 +6620,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -6532,9 +6638,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6544,9 +6650,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6556,9 +6662,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6568,9 +6674,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -6581,6 +6687,15 @@ 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 = "winreg" version = "0.50.0" @@ -6631,22 +6746,23 @@ dependencies = [ [[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.60", + "syn 2.0.76", ] [[package]] @@ -6666,7 +6782,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -6690,9 +6806,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/examples/fuzz-tests/hello_world/programs/hello_world/Cargo.toml b/examples/fuzz-tests/hello_world/programs/hello_world/Cargo.toml index 7a2a8d35..d44efce3 100644 --- a/examples/fuzz-tests/hello_world/programs/hello_world/Cargo.toml +++ b/examples/fuzz-tests/hello_world/programs/hello_world/Cargo.toml @@ -9,11 +9,15 @@ crate-type = ["cdylib", "lib"] name = "hello_world" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] -anchor-lang = "0.29.0" +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } +anchor-lang = "0.30.1" diff --git a/examples/fuzz-tests/hello_world/programs/hello_world/src/lib.rs b/examples/fuzz-tests/hello_world/programs/hello_world/src/lib.rs index d4cadb0b..2b91d34d 100644 --- a/examples/fuzz-tests/hello_world/programs/hello_world/src/lib.rs +++ b/examples/fuzz-tests/hello_world/programs/hello_world/src/lib.rs @@ -1,4 +1,5 @@ use anchor_lang::prelude::*; +use trident_derive_accounts_snapshots::AccountsSnapshots; declare_id!("FtevoQoDMv6ZB3N9Lix5Tbjs8EVuNL8vDSqG9kzaZPit"); @@ -6,15 +7,15 @@ declare_id!("FtevoQoDMv6ZB3N9Lix5Tbjs8EVuNL8vDSqG9kzaZPit"); pub mod hello_world { use super::*; - pub fn initialize(ctx: Context, input: u8) -> Result<()> { + pub fn initialize_fn(ctx: Context, input: u8) -> Result<()> { let hello_world_store = &mut ctx.accounts.hello_world_account; hello_world_store.input = input; Ok(()) } } -#[derive(Accounts)] -pub struct Initialize<'info> { +#[derive(Accounts, AccountsSnapshots)] +pub struct InitializeContext<'info> { #[account(mut)] pub author: Signer<'info>, #[account( diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/Cargo.toml index a6dfd0ec..c76d6e4a 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/Cargo.toml @@ -18,3 +18,4 @@ path = "../../../../../crates/client" [dependencies.hello_world] path = "../../programs/hello_world" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index b915b2c5..00000000 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,57 +0,0 @@ -use anchor_lang::prelude::*; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitializeSnapshot<'info> { - pub author: Signer<'info>, - pub hello_world_account: Option>, - pub system_program: Program<'info, System>, -} -impl<'info> InitializeSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let author: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("author".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("author".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("author".to_string()))?; - let hello_world_account: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "hello_world_account".to_string(), - ))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc).map_err(|_| { - FuzzingError::CannotDeserializeAccount("hello_world_account".to_string()) - }) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "hello_world_account".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - author, - hello_world_account, - system_program, - }) - } -} diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index c60e5aa1..dde8b565 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,37 +1,39 @@ pub mod hello_world_fuzz_instructions { - use crate::accounts_snapshots::*; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; + + use hello_world::trident_fuzz_initialize_context_snapshot::InitializeContextAlias; + + type InitializeFnSnapshot<'info> = InitializeContextAlias<'info>; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { - Initialize(Initialize), + InitializeFn(InitializeFn), } #[derive(Arbitrary, Debug)] - pub struct Initialize { - pub accounts: InitializeAccounts, - pub data: InitializeData, + pub struct InitializeFn { + pub accounts: InitializeFnAccounts, + pub data: InitializeFnData, } #[derive(Arbitrary, Debug)] - pub struct InitializeAccounts { + pub struct InitializeFnAccounts { pub author: AccountId, pub hello_world_account: AccountId, pub system_program: AccountId, } #[derive(Arbitrary, Debug)] - pub struct InitializeData { + pub struct InitializeFnData { pub input: u8, } - impl<'info> IxOps<'info> for Initialize { - type IxData = hello_world::instruction::Initialize; + impl<'info> IxOps<'info> for InitializeFn { + type IxData = hello_world::instruction::InitializeFn; type IxAccounts = FuzzAccounts; - type IxSnapshot = InitializeSnapshot<'info>; + type IxSnapshot = InitializeFnSnapshot<'info>; fn get_data( &self, _client: &mut impl FuzzClient, _fuzz_accounts: &mut FuzzAccounts, ) -> Result { - let data = hello_world::instruction::Initialize { + let data = hello_world::instruction::InitializeFn { input: self.data.input, }; Ok(data) @@ -56,10 +58,10 @@ pub mod hello_world_fuzz_instructions { ) .unwrap(); let signers = vec![author.clone()]; - let acc_meta = hello_world::accounts::Initialize { + let acc_meta = hello_world::accounts::InitializeContext { author: author.pubkey(), hello_world_account: hello_world_account.pubkey(), - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((signers, acc_meta)) diff --git a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 06c39034..4b3cbfa2 100644 --- a/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/hello_world/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,42 +1,37 @@ -use fuzz_instructions::hello_world_fuzz_instructions::Initialize; +use trident_client::fuzzing::*; + +mod fuzz_instructions; + use hello_world::entry as entry_hello_world; use hello_world::ID as PROGRAM_ID_HELLO_WORLD; + const PROGRAM_NAME_HELLO_WORLD: &str = "hello_world"; -use fuzz_instructions::hello_world_fuzz_instructions::FuzzInstruction as FuzzInstruction_hello_world; -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_hello_world; +use fuzz_instructions::hello_world_fuzz_instructions::FuzzInstruction as fuzz_instruction_hello_world; + +pub type FuzzInstruction = fuzz_instruction_hello_world; struct MyFuzzData; -impl FuzzDataBuilder for MyFuzzData { - fn pre_ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { - let init = FuzzInstruction::Initialize(Initialize::arbitrary(u)?); - Ok(vec![init]) - } +impl FuzzDataBuilder for MyFuzzData {} + +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + + let fuzzing_program_hello_world = FuzzingProgram::new( + PROGRAM_NAME_HELLO_WORLD, + &PROGRAM_ID_HELLO_WORLD, + processor!(convert_entry!(entry_hello_world)), + ); + + let mut client = ProgramTestClientBlocking::new(&[fuzzing_program_hello_world]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_HELLO_WORLD, &mut client); } fn main() { + loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_HELLO_WORLD, - &PROGRAM_ID_HELLO_WORLD, - processor!(convert_entry!(entry_hello_world)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_HELLO_WORLD, &mut client); - }); + + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Anchor.toml b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Anchor.toml index f6f60144..aad72bcb 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Anchor.toml +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Anchor.toml @@ -1,4 +1,6 @@ [toolchain] +anchor_version = "0.30.1" + [features] seeds = false diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock index f65cc8b5..fa768c4e 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/Cargo.lock @@ -123,7 +123,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5f619f1d04f53621925ba8a2e633ba5a6081f2ae14758cbb67f38fd823e0a3e" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-access-control" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "47fe28365b33e8334dd70ae2f34a43892363012fe239cf37d2ee91693575b1f8" +dependencies = [ + "anchor-syn 0.30.1", "proc-macro2", "quote", "syn 1.0.109", @@ -135,7 +147,20 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e7f2a3e1df4685f18d12a943a9f2a7456305401af21a07c9fe076ef9ecd6e400" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "bs58 0.5.1", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-account" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3c288d496168268d198d9b53ee9f4f9d260a55ba4df9877ea1d4486ad6109e0f" +dependencies = [ + "anchor-syn 0.30.1", "bs58 0.5.1", "proc-macro2", "quote", @@ -148,7 +173,18 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9423945cb55627f0b30903288e78baf6f62c6c8ab28fb344b6b25f1ffee3dca7" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-constant" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49b77b6948d0eeaaa129ce79eea5bbbb9937375a9241d909ca8fb9e006bb6e90" +dependencies = [ + "anchor-syn 0.30.1", "quote", "syn 1.0.109", ] @@ -159,7 +195,18 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "93ed12720033cc3c3bf3cfa293349c2275cd5ab99936e33dd4bf283aaad3e241" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-error" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4d20bb569c5a557c86101b944721d865e1fd0a4c67c381d31a44a84f07f84828" +dependencies = [ + "anchor-syn 0.30.1", "quote", "syn 1.0.109", ] @@ -170,7 +217,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eef4dc0371eba2d8c8b54794b0b0eb786a234a559b77593d6f80825b6d2c77a2" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-attribute-event" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4cebd8d0671a3a9dc3160c48598d652c34c77de6be4d44345b8b514323284d57" +dependencies = [ + "anchor-syn 0.30.1", "proc-macro2", "quote", "syn 1.0.109", @@ -182,18 +241,35 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b18c4f191331e078d4a6a080954d1576241c29c56638783322a18d308ab27e4f" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", "quote", "syn 1.0.109", ] +[[package]] +name = "anchor-attribute-program" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "efb2a5eb0860e661ab31aff7bb5e0288357b176380e985bade4ccb395981b42d" +dependencies = [ + "anchor-lang-idl", + "anchor-syn 0.30.1", + "anyhow", + "bs58 0.5.1", + "heck 0.3.3", + "proc-macro2", + "quote", + "serde_json", + "syn 1.0.109", +] + [[package]] name = "anchor-client" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" dependencies = [ - "anchor-lang", + "anchor-lang 0.29.0", "anyhow", "futures", "regex", @@ -212,7 +288,18 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5de10d6e9620d3bcea56c56151cad83c5992f50d5960b3a9bebc4a50390ddc3c" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-accounts" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04368b5abef4266250ca8d1d12f4dff860242681e4ec22b885dcfe354fd35aa1" +dependencies = [ + "anchor-syn 0.30.1", "quote", "syn 1.0.109", ] @@ -223,7 +310,20 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4e2e5be518ec6053d90a2a7f26843dbee607583c779e6c8395951b9739bdfbe" dependencies = [ - "anchor-syn", + "anchor-syn 0.29.0", + "borsh-derive-internal 0.10.3", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "anchor-derive-serde" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0bb0e0911ad4a70cab880cdd6287fe1e880a1a9d8e4e6defa8e9044b9796a6c" +dependencies = [ + "anchor-syn 0.30.1", "borsh-derive-internal 0.10.3", "proc-macro2", "quote", @@ -241,21 +341,32 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "anchor-derive-space" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5ef415ff156dc82e9ecb943189b0cb241b3a6bfc26a180234dc21bd3ef3ce0cb" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "anchor-lang" version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35da4785497388af0553586d55ebdc08054a8b1724720ef2749d313494f2b8ad" dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-program", - "anchor-derive-accounts", - "anchor-derive-serde", - "anchor-derive-space", + "anchor-attribute-access-control 0.29.0", + "anchor-attribute-account 0.29.0", + "anchor-attribute-constant 0.29.0", + "anchor-attribute-error 0.29.0", + "anchor-attribute-event 0.29.0", + "anchor-attribute-program 0.29.0", + "anchor-derive-accounts 0.29.0", + "anchor-derive-serde 0.29.0", + "anchor-derive-space 0.29.0", "arrayref", "base64 0.13.1", "bincode", @@ -266,19 +377,85 @@ dependencies = [ "thiserror", ] +[[package]] +name = "anchor-lang" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6620c9486d9d36a4389cab5e37dc34a42ed0bfaa62e6a75a2999ce98f8f2e373" +dependencies = [ + "anchor-attribute-access-control 0.30.1", + "anchor-attribute-account 0.30.1", + "anchor-attribute-constant 0.30.1", + "anchor-attribute-error 0.30.1", + "anchor-attribute-event 0.30.1", + "anchor-attribute-program 0.30.1", + "anchor-derive-accounts 0.30.1", + "anchor-derive-serde 0.30.1", + "anchor-derive-space 0.30.1", + "anchor-lang-idl", + "arrayref", + "base64 0.21.7", + "bincode", + "borsh 0.10.3", + "bytemuck", + "getrandom 0.2.14", + "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 0.3.3", + "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" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a" dependencies = [ - "anchor-lang", + "anchor-lang 0.29.0", "solana-program", - "spl-associated-token-account", + "spl-associated-token-account 2.3.0", "spl-token", "spl-token-2022 0.9.0", ] +[[package]] +name = "anchor-spl" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04bd077c34449319a1e4e0bc21cea572960c9ae0d0fefda0dd7c52fcc3c647a3" +dependencies = [ + "anchor-lang 0.30.1", + "spl-associated-token-account 3.0.4", + "spl-pod 0.2.5", + "spl-token", + "spl-token-2022 3.0.4", + "spl-token-group-interface 0.2.5", + "spl-token-metadata-interface 0.3.5", +] + [[package]] name = "anchor-syn" version = "0.29.0" @@ -297,6 +474,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "anchor-syn" +version = "0.30.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f99daacb53b55cfd37ce14d6c9905929721137fd4c67bbab44a19802aecb622f" +dependencies = [ + "anyhow", + "bs58 0.5.1", + "cargo_toml", + "heck 0.3.3", + "proc-macro2", + "quote", + "serde", + "serde_json", + "sha2 0.10.8", + "syn 1.0.109", + "thiserror", +] + [[package]] name = "android-tzdata" version = "0.1.1" @@ -725,11 +921,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.5.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -761,9 +957,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", "proc-macro-crate 3.1.0", @@ -871,9 +1067,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] @@ -964,6 +1160,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.12", +] + [[package]] name = "cc" version = "1.0.95" @@ -983,9 +1189,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -1884,7 +2090,7 @@ dependencies = [ name = "fuzz_tests" version = "0.1.0" dependencies = [ - "anchor-spl", + "anchor-spl 0.29.0", "arbitrary", "assert_matches", "honggfuzz", @@ -2257,8 +2463,10 @@ dependencies = [ name = "incorrect-integer-arithmetic-3" version = "0.1.0" dependencies = [ - "anchor-lang", - "anchor-spl", + "anchor-lang 0.30.1", + "anchor-spl 0.30.1", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] @@ -3160,7 +3368,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -3825,6 +4033,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -4053,8 +4270,8 @@ dependencies = [ "solana-sdk", "spl-token", "spl-token-2022 1.0.0", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", "thiserror", "zstd", ] @@ -4147,7 +4364,7 @@ version = "1.18.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" dependencies = [ - "borsh 1.5.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -4548,7 +4765,7 @@ dependencies = [ "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4874,7 +5091,7 @@ dependencies = [ "base64 0.21.7", "bincode", "bitflags 2.5.0", - "borsh 1.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -5073,7 +5290,7 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-sdk", - "spl-associated-token-account", + "spl-associated-token-account 2.3.0", "spl-memo", "spl-token", "spl-token-2022 1.0.0", @@ -5252,6 +5469,22 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-associated-token-account" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143109d789171379e6143ef23191786dfaac54289ad6e7917cfb26b36c432b10" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022 3.0.4", + "thiserror", +] + [[package]] name = "spl-discriminator" version = "0.1.1" @@ -5260,7 +5493,18 @@ checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator-derive", + "spl-discriminator-derive 0.1.2", +] + +[[package]] +name = "spl-discriminator" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210101376962bb22bb13be6daea34656ea1cbc248fce2164b146e39203b55e03" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive 0.2.0", ] [[package]] @@ -5270,7 +5514,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", - "spl-discriminator-syn", + "spl-discriminator-syn 0.1.2", + "syn 2.0.60", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +dependencies = [ + "quote", + "spl-discriminator-syn 0.2.0", "syn 2.0.60", ] @@ -5287,6 +5542,19 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-discriminator-syn" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.60", + "thiserror", +] + [[package]] name = "spl-memo" version = "4.0.0" @@ -5306,7 +5574,20 @@ dependencies = [ "bytemuck", "solana-program", "solana-zk-token-sdk", - "spl-program-error", + "spl-program-error 0.3.1", +] + +[[package]] +name = "spl-pod" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52d84c55efeef8edcc226743dc089d7e3888b8e3474569aa3eff152b37b9996" +dependencies = [ + "borsh 1.5.1", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.4.4", ] [[package]] @@ -5318,7 +5599,20 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "solana-program", - "spl-program-error-derive", + "spl-program-error-derive 0.3.2", + "thiserror", +] + +[[package]] +name = "spl-program-error" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e45a49acb925db68aa501b926096b2164adbdcade7a0c24152af9f0742d0a602" +dependencies = [ + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-program-error-derive 0.4.1", "thiserror", ] @@ -5334,6 +5628,18 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "spl-program-error-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.60", +] + [[package]] name = "spl-tlv-account-resolution" version = "0.4.0" @@ -5342,10 +5648,10 @@ checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", + "spl-type-length-value 0.3.1", ] [[package]] @@ -5356,10 +5662,24 @@ checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", + "spl-type-length-value 0.3.1", +] + +[[package]] +name = "spl-tlv-account-resolution" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fab8edfd37be5fa17c9e42c1bff86abbbaf0494b031b37957f2728ad2ff842ba" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", + "spl-type-length-value 0.4.6", ] [[package]] @@ -5391,11 +5711,11 @@ dependencies = [ "solana-program", "solana-zk-token-sdk", "spl-memo", - "spl-pod", + "spl-pod 0.1.1", "spl-token", - "spl-token-metadata-interface", + "spl-token-metadata-interface 0.2.0", "spl-transfer-hook-interface 0.3.0", - "spl-type-length-value", + "spl-type-length-value 0.3.1", "thiserror", ] @@ -5414,12 +5734,36 @@ dependencies = [ "solana-security-txt", "solana-zk-token-sdk", "spl-memo", - "spl-pod", + "spl-pod 0.1.1", "spl-token", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", "spl-transfer-hook-interface 0.4.1", - "spl-type-length-value", + "spl-type-length-value 0.3.1", + "thiserror", +] + +[[package]] +name = "spl-token-2022" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b01d1b2851964e257187c0bca43a0de38d0af59192479ca01ac3e2b58b1bd95a" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive 0.4.2", + "num-traits", + "num_enum 0.7.2", + "solana-program", + "solana-security-txt", + "solana-zk-token-sdk", + "spl-memo", + "spl-pod 0.2.5", + "spl-token", + "spl-token-group-interface 0.2.5", + "spl-token-metadata-interface 0.3.5", + "spl-transfer-hook-interface 0.6.5", + "spl-type-length-value 0.4.6", "thiserror", ] @@ -5431,9 +5775,22 @@ checksum = "b889509d49fa74a4a033ca5dae6c2307e9e918122d97e58562f5c4ffa795c75d" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "014817d6324b1e20c4bbc883e8ee30a5faa13e59d91d1b2b95df98b920150c17" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", ] [[package]] @@ -5444,10 +5801,24 @@ checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" dependencies = [ "borsh 0.10.3", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", + "spl-type-length-value 0.3.1", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3da00495b602ebcf5d8ba8b3ecff1ee454ce4c125c9077747be49c2d62335ba" +dependencies = [ + "borsh 1.5.1", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", + "spl-type-length-value 0.4.6", ] [[package]] @@ -5459,11 +5830,11 @@ dependencies = [ "arrayref", "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", "spl-tlv-account-resolution 0.4.0", - "spl-type-length-value", + "spl-type-length-value 0.3.1", ] [[package]] @@ -5475,11 +5846,27 @@ dependencies = [ "arrayref", "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", "spl-tlv-account-resolution 0.5.2", - "spl-type-length-value", + "spl-type-length-value 0.3.1", +] + +[[package]] +name = "spl-transfer-hook-interface" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a9b5c08a89838e5a2931f79b17f611857f281a14a2100968a3ccef352cb7414b" +dependencies = [ + "arrayref", + "bytemuck", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", + "spl-tlv-account-resolution 0.6.5", + "spl-type-length-value 0.4.6", ] [[package]] @@ -5490,9 +5877,22 @@ checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.1.1", + "spl-pod 0.1.1", + "spl-program-error 0.3.1", +] + +[[package]] +name = "spl-type-length-value" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c872f93d0600e743116501eba2d53460e73a12c9a496875a42a7d70e034fe06d" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", ] [[package]] @@ -5968,11 +6368,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.12", +] + [[package]] name = "toml_datetime" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5982,7 +6397,7 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.2.6", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -5993,7 +6408,20 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", "toml_datetime", - "winnow", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.18", ] [[package]] @@ -6061,16 +6489,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", - "anchor-lang", - "anchor-syn", + "anchor-lang 0.30.1", + "anchor-lang-idl-spec", + "anchor-syn 0.30.1", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6093,12 +6523,12 @@ dependencies = [ "solana-program-test", "solana-sdk", "solana-transaction-status", - "spl-associated-token-account", + "spl-associated-token-account 2.3.0", "spl-token", "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", @@ -6111,7 +6541,8 @@ dependencies = [ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ - "anchor-syn", + "anchor-syn 0.30.1", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6119,7 +6550,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6128,7 +6559,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6137,7 +6568,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6148,8 +6579,8 @@ dependencies = [ name = "trident-fuzz" version = "0.1.0" dependencies = [ - "anchor-lang", - "anchor-syn", + "anchor-lang 0.30.1", + "anchor-syn 0.30.1", "arbitrary", "convert_case", "heck 0.4.1", @@ -6171,7 +6602,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", @@ -6648,6 +7079,15 @@ 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 = "winreg" version = "0.50.0" diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/Cargo.toml b/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/Cargo.toml index cc98f025..5218a3e8 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/Cargo.toml +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/Cargo.toml @@ -9,12 +9,16 @@ crate-type = ["cdylib", "lib"] name = "incorrect_integer_arithmetic_3" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] -anchor-lang = "0.29.0" -anchor-spl = "0.29.0" +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } +anchor-lang = "0.30.1" +anchor-spl = "0.30.1" diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/initialize.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/initialize.rs index 8677c3c7..2a2acf95 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/initialize.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/initialize.rs @@ -6,6 +6,8 @@ use anchor_spl::token::{ use crate::state::Escrow; use crate::VestingError; +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _init_vesting( ctx: Context, recipient: Pubkey, @@ -61,7 +63,7 @@ pub fn _init_vesting( Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] #[instruction(recipient: Pubkey)] pub struct InitVesting<'info> { #[account(mut)] diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/withdraw.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/withdraw.rs index 3170ad7a..d0f1a89c 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/withdraw.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/programs/incorrect-integer-arithmetic-3/src/instructions/withdraw.rs @@ -3,6 +3,8 @@ use anchor_spl::token::{transfer, Mint, Token, TokenAccount, Transfer}; use crate::{state::Escrow, VestingError}; +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _withdraw_unlocked(ctx: Context) -> Result<()> { let escrow = &mut ctx.accounts.escrow; @@ -32,7 +34,7 @@ pub fn _withdraw_unlocked(ctx: Context) -> Result<()> { Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct WithdrawUnlocked<'info> { #[account(mut)] pub recipient: Signer<'info>, diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/Cargo.toml index 7e5fc3ec..8b6a5b30 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/Cargo.toml @@ -19,3 +19,4 @@ path = "../../../../../crates/client" [dependencies.incorrect-integer-arithmetic-3] path = "../../programs/incorrect-integer-arithmetic-3" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index 7ff899d6..00000000 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,218 +0,0 @@ -use anchor_lang::prelude::*; -use anchor_spl::token::{Mint, Token, TokenAccount}; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitVestingSnapshot<'info> { - pub sender: Signer<'info>, - pub sender_token_account: Account<'info, TokenAccount>, - pub escrow: Option>, - pub escrow_token_account: Account<'info, TokenAccount>, - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, -} -pub struct WithdrawUnlockedSnapshot<'info> { - pub recipient: Signer<'info>, - pub recipient_token_account: Account<'info, TokenAccount>, - pub escrow: Option>, - pub escrow_token_account: Account<'info, TokenAccount>, - pub escrow_pda_authority: &'info AccountInfo<'info>, - pub mint: Account<'info, Mint>, - pub token_program: Program<'info, Token>, - pub system_program: Program<'info, System>, -} -impl<'info> InitVestingSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let sender: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("sender".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("sender".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("sender".to_string()))?; - let sender_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "sender_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "sender_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("sender_token_account".to_string()) - })?; - let escrow: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("escrow".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("escrow".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "escrow".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let escrow_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "escrow_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "escrow_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("escrow_token_account".to_string()) - })?; - let mint: anchor_lang::accounts::account::Account = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("mint".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("mint".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("mint".to_string()))?; - let token_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("token_program".to_string()))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("token_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("token_program".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - sender, - sender_token_account, - escrow, - escrow_token_account, - mint, - token_program, - system_program, - }) - } -} -impl<'info> WithdrawUnlockedSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let recipient: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("recipient".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("recipient".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("recipient".to_string()))?; - let recipient_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "recipient_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "recipient_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("recipient_token_account".to_string()) - })?; - let escrow: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("escrow".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("escrow".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "escrow".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let escrow_token_account: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "escrow_token_account".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound( - "escrow_token_account".to_string(), - ))? - .map_err(|_| { - FuzzingError::CannotDeserializeAccount("escrow_token_account".to_string()) - })?; - let escrow_pda_authority = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "escrow_pda_authority".to_string(), - ))? - .as_ref() - .ok_or(FuzzingError::AccountNotFound( - "escrow_pda_authority".to_string(), - ))?; - let mint: anchor_lang::accounts::account::Account = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("mint".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("mint".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("mint".to_string()))?; - let token_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("token_program".to_string()))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("token_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("token_program".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - recipient, - recipient_token_account, - escrow, - escrow_token_account, - escrow_pda_authority, - mint, - token_program, - system_program, - }) - } -} diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index c67fa64d..72e78f48 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,8 +1,13 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { - use crate::accounts_snapshots::*; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; + + use incorrect_integer_arithmetic_3::trident_fuzz_init_vesting_snapshot::InitVestingAlias; + use incorrect_integer_arithmetic_3::trident_fuzz_withdraw_unlocked_snapshot::WithdrawUnlockedAlias; + + type InitVestingSnapshot<'info> = InitVestingAlias<'info>; + type WithdrawUnlockedSnapshot<'info> = WithdrawUnlockedAlias<'info>; + #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { InitVesting(InitVesting), @@ -69,6 +74,7 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { client, 10 * LAMPORTS_PER_SOL, ); + let data = incorrect_integer_arithmetic_3::instruction::InitVesting { recipient: recipient.pubkey(), amount: self.data.amount, @@ -146,7 +152,7 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { escrow_token_account, mint, token_program: anchor_spl::token::ID, - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); @@ -239,7 +245,7 @@ pub mod incorrect_integer_arithmetic_3_fuzz_instructions { escrow_pda_authority: escrow_pda_authority.pubkey(), mint, token_program: anchor_spl::token::ID, - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((vec![recipient], acc_meta)) diff --git a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 36f5c913..1f38732c 100644 --- a/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/incorrect-integer-arithmetic-3/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,13 +1,16 @@ use fuzz_instructions::incorrect_integer_arithmetic_3_fuzz_instructions::InitVesting; +use trident_client::fuzzing::*; + +mod fuzz_instructions; + use incorrect_integer_arithmetic_3::entry as entry_incorrect_integer_arithmetic_3; use incorrect_integer_arithmetic_3::ID as PROGRAM_ID_INCORRECT_INTEGER_ARITHMETIC_3; + const PROGRAM_NAME_INCORRECT_INTEGER_ARITHMETIC_3: &str = "incorrect_integer_arithmetic_3"; -use fuzz_instructions::incorrect_integer_arithmetic_3_fuzz_instructions::FuzzInstruction as FuzzInstruction_incorrect_integer_arithmetic_3; -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_incorrect_integer_arithmetic_3; +use fuzz_instructions::incorrect_integer_arithmetic_3_fuzz_instructions::FuzzInstruction as fuzz_instruction_incorrect_integer_arithmetic_3; + +pub type FuzzInstruction = fuzz_instruction_incorrect_integer_arithmetic_3; struct MyFuzzData; @@ -19,25 +22,21 @@ impl FuzzDataBuilder for MyFuzzData { } } +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_incorrect_integer_arithmetic_3 = FuzzingProgram::new( + PROGRAM_NAME_INCORRECT_INTEGER_ARITHMETIC_3, + &PROGRAM_ID_INCORRECT_INTEGER_ARITHMETIC_3, + processor!(convert_entry!(entry_incorrect_integer_arithmetic_3)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_incorrect_integer_arithmetic_3]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_INCORRECT_INTEGER_ARITHMETIC_3, &mut client); +} + fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_INCORRECT_INTEGER_ARITHMETIC_3, - &PROGRAM_ID_INCORRECT_INTEGER_ARITHMETIC_3, - processor!(convert_entry!(entry_incorrect_integer_arithmetic_3)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_INCORRECT_INTEGER_ARITHMETIC_3, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/Anchor.toml b/examples/fuzz-tests/incorrect-ix-sequence-1/Anchor.toml index fcbfe6a8..91f523e8 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/Anchor.toml +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/Anchor.toml @@ -1,4 +1,5 @@ [toolchain] +anchor_version = "0.30.1" [features] seeds = false diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock b/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock index 2efd68fb..6e810c8a 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -69,7 +75,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -119,9 +125,9 @@ dependencies = [ [[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", @@ -131,9 +137,9 @@ dependencies = [ [[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.1", @@ -144,9 +150,9 @@ dependencies = [ [[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", @@ -155,9 +161,9 @@ dependencies = [ [[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", @@ -166,9 +172,9 @@ dependencies = [ [[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", @@ -178,20 +184,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -208,9 +220,9 @@ dependencies = [ [[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", @@ -219,9 +231,9 @@ dependencies = [ [[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", @@ -232,9 +244,9 @@ dependencies = [ [[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", @@ -243,9 +255,9 @@ dependencies = [ [[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", @@ -256,24 +268,51 @@ 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.14", + "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 0.3.3", + "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-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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -310,9 +349,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquamarine" @@ -378,7 +417,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -401,7 +440,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -430,7 +469,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -456,15 +495,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -530,9 +569,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -553,13 +592,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -575,21 +614,21 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -635,9 +674,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -712,11 +751,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.5.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -748,15 +787,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "syn_derive", ] @@ -806,9 +845,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -817,9 +856,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -858,22 +897,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -884,9 +923,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -911,9 +950,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -951,15 +990,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" -version = "1.0.95" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -970,9 +1019,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -986,7 +1035,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1110,9 +1159,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1135,33 +1184,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1187,9 +1236,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1273,12 +1322,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1297,16 +1346,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.60", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1322,13 +1371,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1369,7 +1418,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1408,7 +1457,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1502,13 +1551,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1531,7 +1580,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1595,9 +1644,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1631,13 +1680,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19cbb53d33b57ac4df1f0af6b92c38c107cded663c4aea9fae1189dcfc17cf5" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1646,11 +1695,11 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1674,9 +1723,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1690,9 +1739,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1722,24 +1771,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1828,7 +1877,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1914,9 +1963,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1927,9 +1976,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1960,10 +2009,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tracing", ] @@ -2039,6 +2088,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -2111,9 +2166,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2129,9 +2184,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2222,18 +2277,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -2244,13 +2299,15 @@ name = "incorrect-ix-sequence-1" version = "0.1.0" dependencies = [ "anchor-lang", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] name = "index_list" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" [[package]] name = "indexmap" @@ -2264,9 +2321,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2287,9 +2344,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2302,11 +2359,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2328,18 +2385,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2370,15 +2427,15 @@ dependencies = [ [[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.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2386,8 +2443,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2446,15 +2504,15 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "thiserror", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2468,9 +2526,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -2483,9 +2541,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.24.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2493,9 +2551,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2503,9 +2561,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2569,22 +2627,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2691,11 +2759,10 @@ 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", ] @@ -2735,7 +2802,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2749,9 +2816,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2772,9 +2839,9 @@ dependencies = [ [[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", ] @@ -2800,11 +2867,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2816,19 +2883,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2839,9 +2906,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2929,9 +2996,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2945,16 +3012,16 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -3021,7 +3088,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3073,9 +3140,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3085,9 +3152,12 @@ 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 = "predicates" @@ -3105,15 +3175,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3145,7 +3215,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -3160,11 +3230,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -3193,9 +3263,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3217,7 +3287,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3271,9 +3341,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3337,7 +3407,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3392,38 +3462,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3433,9 +3494,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3444,15 +3505,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -3487,7 +3548,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", @@ -3520,7 +3581,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3563,7 +3624,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", "unicode-ident", ] @@ -3579,9 +3640,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3591,9 +3652,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3609,11 +3670,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3665,15 +3726,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3716,7 +3777,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3731,11 +3792,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3744,9 +3805,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3754,9 +3815,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -3772,44 +3833,54 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 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.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3838,10 +3909,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3850,7 +3921,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -3879,7 +3950,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3963,6 +4034,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4021,9 +4098,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142161f13c328e7807fe98fb8f6eaaa5045a8eaf4492414aa81254870c4fc8a0" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -4046,9 +4123,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e8b4b15e353d5f0e0ddd77966c6f01b296bd83569af455da5fd9329356ff642" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" dependencies = [ "arrayref", "bincode", @@ -4072,7 +4149,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4107,9 +4184,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eef9fc8aa3ff804dbf17766ab2d2fe38561adc8b521705faa782c18a108d8" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" dependencies = [ "bincode", "bytemuck", @@ -4128,11 +4205,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ - "borsh 1.5.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -4145,9 +4222,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741279a09bf5ea1a3d17e591db7b189e163722e5c46423308c6a6165bea5e74d" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", @@ -4156,9 +4233,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66768544951feb91c3470e255d4613295b5cc5a58a9cc6a4207ab9a0178cfe9" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" dependencies = [ "bincode", "crossbeam-channel", @@ -4176,9 +4253,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e9dd5e42193260cca0794bf4ab9e248f44b3d9710041f241b130d26ed682bc" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -4195,16 +4272,16 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7b34296d69867253671a71a2231b8d5b4a810bd7a5c1c603e7b542832d5980" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" dependencies = [ "bv", "bytemuck", "log", "memmap2 0.5.10", "modular-bitfield", - "num_enum 0.7.2", + "num_enum 0.7.3", "rand 0.8.5", "solana-measure", "solana-sdk", @@ -4213,9 +4290,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9f61034a61db538a41700b6df0b4b9f0392038adaf780150481923ff94356" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -4230,9 +4307,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -4246,9 +4323,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -4273,16 +4350,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2bd5a986d7cac1b4ffb4344413b70b6f21fd7ffa92a985911756b4ac7682a" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -4306,9 +4383,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca100b2bdd7e455f5f0b9791bc204dacd684a0373ad1032697dbad43f34e527f" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4316,9 +4393,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d28779e92a11e32a89ee453edc7d89394d3a68d8c4b75ef0ffb833944c588" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -4330,15 +4407,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7d0022ded19dca32ced5528c6a050596877fc8b9a89322d876960a89466e1b" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -4352,9 +4429,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd3c63699df1680535daee8e486bd496e2ec849c427de4b6a42d4f1b27430949" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" dependencies = [ "lazy_static", "log", @@ -4376,9 +4453,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4401,21 +4478,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c566ebf0da216efc70054bf2d6d06c16fe44b63402c6f3bb04f6a88d8571d9b" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" dependencies = [ "log", "solana-measure", @@ -4426,9 +4503,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79ef26804612173c95be8da84df3128d648173cf1f746de8f183ec8dbedd92" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -4437,9 +4514,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f716a5f1c2f4b562fb008a0cc7d7c0d889cff802a7f8177fdf28772ae1ed9" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -4447,9 +4524,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf1705d52e4f123856725e1b3842cd4928b954ff62391a95af142a5adc58ac6" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -4462,9 +4539,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f2634fd50743e2ca075e663e07b0bd5c2f94db0ac320ce5bc2022e0002d82d" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4490,9 +4567,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0264d7093d44c239d9eb41beb6877b7b1eea5ad8809c93c1d9ab0c840ba390" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4519,9 +4596,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4529,11 +4606,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4541,7 +4618,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.14", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -4550,7 +4627,7 @@ dependencies = [ "light-poseidon", "log", "memoffset 0.9.1", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", "parking_lot", @@ -4574,9 +4651,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dc9f666a8e4f93166ce58eea9dfbf275e5cad461b2f1bbfa06538718dc3212" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4602,9 +4679,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2760112327ffce892f6a21030f7c9e4b6da3ded8c8eadf1dbfffcb5a754c61db" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ "assert_matches", "async-trait", @@ -4632,9 +4709,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdcbdad685b87475a91909fdb442d2edfabc2870110580c7f0cf7eb7883f97" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" dependencies = [ "crossbeam-channel", "futures-util", @@ -4657,9 +4734,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056e909037b05097d2ff0181cb7e3d26876d8dff6d50701463a61e990cf84afd" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4684,9 +4761,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93a5e1ef891dca2cca907f7196b6a5d3b80af4183f2be0f981906b16711ff5d" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4694,9 +4771,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c06eaf47d9a98ba22e890e68868f5d48c91e01268c541a53b5960288b617d6" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4713,9 +4790,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1d4b6f1f4e3dab7509401e85edc1c1ac208c61819de90178e01cf162c9c051" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4739,9 +4816,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31feddef24d3e0aab189571adea7f109639ef6179fcd3cd34ffc8c73d3409f1" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4761,9 +4838,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1837728262063723c659e4b8c0acf0baa99cd38cb333511456465d2c9e654474" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4774,9 +4851,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3480088ad0ffb701ada496f19754b4ff737e516c6b5f1231508e50ae2e0ea3" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" dependencies = [ "aquamarine", "arrayref", @@ -4805,7 +4882,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4851,15 +4928,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50cac89269a01235f6b421bc580132191f4df388f4265513e78fd00cf864dd" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 1.5.0", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4878,7 +4955,7 @@ dependencies = [ "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -4906,15 +4983,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4925,9 +5002,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0deed4fe8bb31ff178d8b7e8295bc81e6e1d704fc0e2c5565f58d9eb8feec89d" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" dependencies = [ "crossbeam-channel", "log", @@ -4941,9 +5018,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea02d44b82ed0eb271871cf8a1b8179a0ab50f4f995e7d8ae691c1971bd0a0e" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" dependencies = [ "bincode", "log", @@ -4956,16 +5033,16 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a20843e8370adb3c04f47caa79ffdc92ae1bf078ad26530be1bca5d7bdd5d2" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -4989,9 +5066,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01294e45b407b7d4c8ff546af6f60344efd6591cf162c88e231ee3ba2c544672" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -5003,9 +5080,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74da8f36b89b28c47e5ba3bad5279ff3dfea5829154882845d4821fc76ff497" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -5018,14 +5095,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f2fd4b4aeffa14b9c5be9913072ea8e72ca261254a65a999f3d2fd70e7a660" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -5042,9 +5119,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3efa0d30f78dbc74e795638b053dd6ec7230739301e7f0e06b586f7731fd25c8" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -5067,9 +5144,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32af58cadd37be19d04e0f3877104b8640bccc4be8ca1dbf431549b399b784c2" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5082,9 +5159,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c7cef8aa9f1c633bf09dd91b8e635b6b30c40236652031b1800b245dc1bd02" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -5098,9 +5175,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12945ee508c751ffdce58f976be6e58a05529ce0032c1f7db76eed6a8d76b33c" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" dependencies = [ "crossbeam-channel", "itertools", @@ -5117,9 +5194,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725a39044d455c08fe83fca758e94e5ddfaa25f6e2e2cfd5c31d7afdcad8de38" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -5139,9 +5216,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39263f3e47a160b9b67896f2225d56e6872905c066152cbe61f5fd201c52a6d2" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -5153,9 +5230,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630dc0b5f6250cf6a4c8b2bd3895283738915e83eba5453db20bb02b2527f302" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5182,9 +5259,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -5239,9 +5316,9 @@ dependencies = [ [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" dependencies = [ "bytemuck", "solana-program", @@ -5256,7 +5333,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5268,7 +5345,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", "thiserror", ] @@ -5283,9 +5360,9 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" dependencies = [ "borsh 0.10.3", "bytemuck", @@ -5296,9 +5373,9 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ "num-derive 0.4.2", "num-traits", @@ -5316,14 +5393,14 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", @@ -5358,7 +5435,7 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -5417,9 +5494,9 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", @@ -5446,6 +5523,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.24.1" @@ -5493,9 +5576,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5511,7 +5594,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5555,9 +5638,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5601,14 +5684,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5655,7 +5739,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5666,7 +5750,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "test-case-core", ] @@ -5687,22 +5771,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5767,9 +5851,9 @@ 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", ] @@ -5782,32 +5866,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5879,16 +5962,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -5901,11 +5983,26 @@ 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.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5913,27 +6010,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5955,7 +6054,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5994,16 +6093,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6031,7 +6132,7 @@ dependencies = [ "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", @@ -6045,6 +6146,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6052,7 +6154,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6061,7 +6163,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6070,7 +6172,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6104,7 +6206,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", @@ -6173,15 +6275,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -6232,9 +6334,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -6261,9 +6363,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -6304,34 +6406,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6341,9 +6444,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6351,28 +6454,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6411,11 +6514,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6430,7 +6533,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6448,7 +6551,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -6468,18 +6580,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6490,9 +6602,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6502,9 +6614,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6514,15 +6626,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -6532,9 +6644,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6544,9 +6656,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6556,9 +6668,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6568,9 +6680,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -6581,6 +6693,15 @@ 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 = "winreg" version = "0.50.0" @@ -6631,22 +6752,23 @@ dependencies = [ [[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.60", + "syn 2.0.76", ] [[package]] @@ -6666,7 +6788,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -6690,9 +6812,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/Cargo.toml b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/Cargo.toml index 090bb653..651b2dcc 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/Cargo.toml +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/Cargo.toml @@ -9,11 +9,15 @@ crate-type = ["cdylib", "lib"] name = "incorrect_ix_sequence_1" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] -anchor-lang = "0.29.0" +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } +anchor-lang = "0.30.1" diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/end_registrations.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/end_registrations.rs index f92cee46..d046d876 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/end_registrations.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/end_registrations.rs @@ -2,6 +2,8 @@ pub use anchor_lang::prelude::*; use crate::state::{State, STATE_SEED}; +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _end_registration(ctx: Context) -> Result<()> { let state = &mut ctx.accounts.state; @@ -9,13 +11,13 @@ pub fn _end_registration(ctx: Context) -> Result<()> { Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct EndRegistration<'info> { pub author: Signer<'info>, #[account( mut, has_one = author, - seeds = [author.key().as_ref(), STATE_SEED.as_ref()], + seeds = [author.key().as_ref(), STATE_SEED.as_bytes()], bump = state.bump )] pub state: Account<'info, State>, diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/initialize.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/initialize.rs index 75deb8ae..eaae274e 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/initialize.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/initialize.rs @@ -1,6 +1,7 @@ pub use anchor_lang::prelude::*; use crate::state::{State, STATE_SEED}; +use trident_derive_accounts_snapshots::AccountsSnapshots; pub fn _initialize(ctx: Context) -> Result<()> { let state = &mut ctx.accounts.state; @@ -11,7 +12,7 @@ pub fn _initialize(ctx: Context) -> Result<()> { Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Initialize<'info> { #[account(mut)] pub author: Signer<'info>, @@ -19,7 +20,7 @@ pub struct Initialize<'info> { init, payer = author, space = 8 + State::LEN, - seeds = [author.key().as_ref(), STATE_SEED.as_ref()], + seeds = [author.key().as_ref(), STATE_SEED.as_bytes()], bump )] pub state: Account<'info, State>, diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/invest.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/invest.rs index 248fcf3b..e530e222 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/invest.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/invest.rs @@ -4,6 +4,9 @@ use crate::{ error::CustomError, state::{Project, State, PROJECT_SEED, STATE_SEED}, }; + +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _invest(ctx: Context, amount: u64) -> Result<()> { let project = &mut ctx.accounts.project; let state = &mut ctx.accounts.state; @@ -40,19 +43,19 @@ pub fn _invest(ctx: Context, amount: u64) -> Result<()> { Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Invest<'info> { #[account(mut)] pub investor: Signer<'info>, #[account( mut, - seeds = [project.project_author.key().as_ref(), state.key().as_ref() ,PROJECT_SEED.as_ref()], + seeds = [project.project_author.key().as_ref(), state.key().as_ref(),PROJECT_SEED.as_bytes()], bump = project.bump )] pub project: Account<'info, Project>, #[account( mut, - seeds = [state.author.key().as_ref(), STATE_SEED.as_ref()], + seeds = [state.author.key().as_ref(), STATE_SEED.as_bytes()], bump = state.bump )] pub state: Account<'info, State>, diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/register.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/register.rs index 4607fd0c..7fa2edd4 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/register.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/programs/incorrect-ix-sequence-1/src/instructions/register.rs @@ -2,6 +2,8 @@ pub use anchor_lang::prelude::*; use crate::state::{Project, State, PROJECT_SEED, STATE_SEED}; +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _register(ctx: Context) -> Result<()> { let project = &mut ctx.accounts.project; @@ -12,7 +14,7 @@ pub fn _register(ctx: Context) -> Result<()> { Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Register<'info> { #[account(mut)] pub project_author: Signer<'info>, @@ -20,13 +22,13 @@ pub struct Register<'info> { init, payer = project_author, space = 8 + Project::LEN, - seeds = [project_author.key().as_ref(), state.key().as_ref() ,PROJECT_SEED.as_ref()], + seeds = [project_author.key().as_ref(), state.key().as_ref() ,PROJECT_SEED.as_bytes()], bump )] pub project: Account<'info, Project>, #[account( mut, - seeds = [state.author.key().as_ref(), STATE_SEED.as_ref()], + seeds = [state.author.key().as_ref(), STATE_SEED.as_bytes()], bump = state.bump )] pub state: Account<'info, State>, diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/Cargo.toml index be075577..6d791e7b 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/Cargo.toml @@ -18,3 +18,4 @@ path = "../../../../../crates/client" [dependencies.incorrect-ix-sequence-1] path = "../../programs/incorrect-ix-sequence-1" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index ec363fdd..00000000 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,199 +0,0 @@ -use anchor_lang::prelude::*; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitializeSnapshot<'info> { - pub author: Signer<'info>, - pub state: Option>, - pub system_program: Program<'info, System>, -} -pub struct RegisterSnapshot<'info> { - pub project_author: Signer<'info>, - pub project: Option>, - pub state: Account<'info, incorrect_ix_sequence_1::state::State>, - pub system_program: Program<'info, System>, -} -pub struct EndRegistrationsSnapshot<'info> { - pub author: Signer<'info>, - pub state: Account<'info, incorrect_ix_sequence_1::state::State>, -} -pub struct InvestSnapshot<'info> { - pub investor: Signer<'info>, - pub project: Account<'info, incorrect_ix_sequence_1::state::Project>, - pub state: Account<'info, incorrect_ix_sequence_1::state::State>, - pub system_program: Program<'info, System>, -} -impl<'info> InitializeSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let author: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("author".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("author".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("author".to_string()))?; - let state: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("state".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("state".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "state".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - author, - state, - system_program, - }) - } -} -impl<'info> RegisterSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let project_author: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "project_author".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("project_author".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("project_author".to_string()))?; - let project: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("project".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("project".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "project".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let state: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("state".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("state".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("state".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - project_author, - project, - state, - system_program, - }) - } -} -impl<'info> EndRegistrationsSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let author: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("author".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("author".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("author".to_string()))?; - let state: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("state".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("state".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("state".to_string()))?; - Ok(Self { author, state }) - } -} -impl<'info> InvestSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let investor: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("investor".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("investor".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("investor".to_string()))?; - let project: anchor_lang::accounts::account::Account< - incorrect_ix_sequence_1::state::Project, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("project".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("project".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("project".to_string()))?; - let state: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("state".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("state".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("state".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - investor, - project, - state, - system_program, - }) - } -} diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 8d568e13..ca414898 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,55 +1,50 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { - use crate::accounts_snapshots::*; use incorrect_ix_sequence_1::{PROJECT_SEED, STATE_SEED}; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; + + use incorrect_ix_sequence_1::trident_fuzz_end_registration_snapshot::EndRegistrationAlias; + use incorrect_ix_sequence_1::trident_fuzz_initialize_snapshot::InitializeAlias; + use incorrect_ix_sequence_1::trident_fuzz_invest_snapshot::InvestAlias; + use incorrect_ix_sequence_1::trident_fuzz_register_snapshot::RegisterAlias; + + type EndRegistrationsSnapshot<'info> = EndRegistrationAlias<'info>; + type InitializeSnapshot<'info> = InitializeAlias<'info>; + type InvestSnapshot<'info> = InvestAlias<'info>; + type RegisterSnapshot<'info> = RegisterAlias<'info>; + #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { - Initialize(Initialize), - Register(Register), EndRegistrations(EndRegistrations), + Initialize(Initialize), Invest(Invest), + Register(Register), } #[derive(Arbitrary, Debug)] - pub struct Initialize { - pub accounts: InitializeAccounts, - pub data: InitializeData, + pub struct EndRegistrations { + pub accounts: EndRegistrationsAccounts, + pub data: EndRegistrationsData, } #[derive(Arbitrary, Debug)] - pub struct InitializeAccounts { + pub struct EndRegistrationsAccounts { pub author: AccountId, pub state: AccountId, - pub system_program: AccountId, - } - #[derive(Arbitrary, Debug)] - pub struct InitializeData {} - #[derive(Arbitrary, Debug)] - pub struct Register { - pub accounts: RegisterAccounts, - pub data: RegisterData, - } - #[derive(Arbitrary, Debug)] - pub struct RegisterAccounts { - pub project_author: AccountId, - pub project: AccountId, - pub state: AccountId, - pub system_program: AccountId, } #[derive(Arbitrary, Debug)] - pub struct RegisterData {} + pub struct EndRegistrationsData {} #[derive(Arbitrary, Debug)] - pub struct EndRegistrations { - pub accounts: EndRegistrationsAccounts, - pub data: EndRegistrationsData, + pub struct Initialize { + pub accounts: InitializeAccounts, + pub data: InitializeData, } #[derive(Arbitrary, Debug)] - pub struct EndRegistrationsAccounts { + pub struct InitializeAccounts { pub author: AccountId, pub state: AccountId, + pub system_program: AccountId, } #[derive(Arbitrary, Debug)] - pub struct EndRegistrationsData {} + pub struct InitializeData {} #[derive(Arbitrary, Debug)] pub struct Invest { pub accounts: InvestAccounts, @@ -66,16 +61,30 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { pub struct InvestData { pub amount: u64, } - impl<'info> IxOps<'info> for Initialize { - type IxData = incorrect_ix_sequence_1::instruction::Initialize; + #[derive(Arbitrary, Debug)] + pub struct Register { + pub accounts: RegisterAccounts, + pub data: RegisterData, + } + #[derive(Arbitrary, Debug)] + pub struct RegisterAccounts { + pub project_author: AccountId, + pub project: AccountId, + pub state: AccountId, + pub system_program: AccountId, + } + #[derive(Arbitrary, Debug)] + pub struct RegisterData {} + impl<'info> IxOps<'info> for EndRegistrations { + type IxData = incorrect_ix_sequence_1::instruction::EndRegistrations; type IxAccounts = FuzzAccounts; - type IxSnapshot = InitializeSnapshot<'info>; + type IxSnapshot = EndRegistrationsSnapshot<'info>; fn get_data( &self, _client: &mut impl FuzzClient, _fuzz_accounts: &mut FuzzAccounts, ) -> Result { - let data = incorrect_ix_sequence_1::instruction::Initialize {}; + let data = incorrect_ix_sequence_1::instruction::EndRegistrations {}; Ok(data) } fn get_accounts( @@ -96,28 +105,26 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { &[author.pubkey().as_ref(), STATE_SEED.as_ref()], &incorrect_ix_sequence_1::ID, ) - .ok_or(FuzzingError::Custom(1))? + .ok_or(FuzzingError::Custom(4))? .pubkey(); - - let acc_meta = incorrect_ix_sequence_1::accounts::Initialize { + let acc_meta = incorrect_ix_sequence_1::accounts::EndRegistration { author: author.pubkey(), state, - system_program: SYSTEM_PROGRAM_ID, } .to_account_metas(None); Ok((signers, acc_meta)) } } - impl<'info> IxOps<'info> for Register { - type IxData = incorrect_ix_sequence_1::instruction::Register; + impl<'info> IxOps<'info> for Initialize { + type IxData = incorrect_ix_sequence_1::instruction::Initialize; type IxAccounts = FuzzAccounts; - type IxSnapshot = RegisterSnapshot<'info>; + type IxSnapshot = InitializeSnapshot<'info>; fn get_data( &self, _client: &mut impl FuzzClient, _fuzz_accounts: &mut FuzzAccounts, ) -> Result { - let data = incorrect_ix_sequence_1::instruction::Register {}; + let data = incorrect_ix_sequence_1::instruction::Initialize {}; Ok(data) } fn get_accounts( @@ -125,73 +132,43 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { client: &mut impl FuzzClient, fuzz_accounts: &mut FuzzAccounts, ) -> Result<(Vec, Vec), FuzzingError> { - let project_author = fuzz_accounts.project_author.get_or_create_account( - self.accounts.project_author, + let author = fuzz_accounts.author.get_or_create_account( + self.accounts.author, client, 5 * LAMPORTS_PER_SOL, ); - let signers = vec![project_author.clone()]; + let signers = vec![author.clone()]; let state = fuzz_accounts .state .get_or_create_account( self.accounts.state, - &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], - &incorrect_ix_sequence_1::ID, - ) - .ok_or(FuzzingError::Custom(2))? - .pubkey(); - - let project = fuzz_accounts - .project - .get_or_create_account( - self.accounts.project, - &[ - project_author.pubkey().as_ref(), - state.as_ref(), - PROJECT_SEED.as_ref(), - ], + &[author.pubkey().as_ref(), STATE_SEED.as_ref()], &incorrect_ix_sequence_1::ID, ) - .ok_or(FuzzingError::Custom(3))? + .ok_or(FuzzingError::Custom(1))? .pubkey(); - let acc_meta = incorrect_ix_sequence_1::accounts::Register { - project_author: project_author.pubkey(), - project, + let acc_meta = incorrect_ix_sequence_1::accounts::Initialize { + author: author.pubkey(), state, - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((signers, acc_meta)) } - fn check( - &self, - pre_ix: Self::IxSnapshot, - post_ix: Self::IxSnapshot, - _ix_data: Self::IxData, - ) -> Result<(), FuzzingError> { - // This fuzz check will reveal that registrations can be performed - // even though registration windows is not open. - let state = pre_ix.state; - if let Some(_project) = post_ix.project { - let registrations_round = state.registrations_round; - if !registrations_round { - return Err(FuzzingError::Custom(1)); - } - } - Ok(()) - } } - impl<'info> IxOps<'info> for EndRegistrations { - type IxData = incorrect_ix_sequence_1::instruction::EndRegistrations; + impl<'info> IxOps<'info> for Invest { + type IxData = incorrect_ix_sequence_1::instruction::Invest; type IxAccounts = FuzzAccounts; - type IxSnapshot = EndRegistrationsSnapshot<'info>; + type IxSnapshot = InvestSnapshot<'info>; fn get_data( &self, _client: &mut impl FuzzClient, _fuzz_accounts: &mut FuzzAccounts, ) -> Result { - let data = incorrect_ix_sequence_1::instruction::EndRegistrations {}; + let data = incorrect_ix_sequence_1::instruction::Invest { + amount: self.data.amount, + }; Ok(data) } fn get_accounts( @@ -199,41 +176,61 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { client: &mut impl FuzzClient, fuzz_accounts: &mut FuzzAccounts, ) -> Result<(Vec, Vec), FuzzingError> { - let author = fuzz_accounts.author.get_or_create_account( - self.accounts.author, + let investor = fuzz_accounts.investor.get_or_create_account( + self.accounts.investor, + client, + 5 * LAMPORTS_PER_SOL, + ); + let signers = vec![investor.clone()]; + + let project_author = fuzz_accounts.project_author.get_or_create_account( + self.accounts.project, client, 5 * LAMPORTS_PER_SOL, ); - let signers = vec![author.clone()]; let state = fuzz_accounts .state .get_or_create_account( self.accounts.state, - &[author.pubkey().as_ref(), STATE_SEED.as_ref()], + &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], &incorrect_ix_sequence_1::ID, ) - .ok_or(FuzzingError::Custom(4))? + .ok_or(FuzzingError::Custom(5))? .pubkey(); - let acc_meta = incorrect_ix_sequence_1::accounts::EndRegistration { - author: author.pubkey(), + + let project = fuzz_accounts + .project + .get_or_create_account( + self.accounts.project, + &[ + project_author.pubkey().as_ref(), + state.as_ref(), + PROJECT_SEED.as_ref(), + ], + &incorrect_ix_sequence_1::ID, + ) + .ok_or(FuzzingError::Custom(6))? + .pubkey(); + let acc_meta = incorrect_ix_sequence_1::accounts::Invest { + investor: investor.pubkey(), + project, state, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((signers, acc_meta)) } } - impl<'info> IxOps<'info> for Invest { - type IxData = incorrect_ix_sequence_1::instruction::Invest; + impl<'info> IxOps<'info> for Register { + type IxData = incorrect_ix_sequence_1::instruction::Register; type IxAccounts = FuzzAccounts; - type IxSnapshot = InvestSnapshot<'info>; + type IxSnapshot = RegisterSnapshot<'info>; fn get_data( &self, _client: &mut impl FuzzClient, _fuzz_accounts: &mut FuzzAccounts, ) -> Result { - let data = incorrect_ix_sequence_1::instruction::Invest { - amount: self.data.amount, - }; + let data = incorrect_ix_sequence_1::instruction::Register {}; Ok(data) } fn get_accounts( @@ -241,18 +238,12 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { client: &mut impl FuzzClient, fuzz_accounts: &mut FuzzAccounts, ) -> Result<(Vec, Vec), FuzzingError> { - let investor = fuzz_accounts.investor.get_or_create_account( - self.accounts.investor, - client, - 5 * LAMPORTS_PER_SOL, - ); - let signers = vec![investor.clone()]; - let project_author = fuzz_accounts.project_author.get_or_create_account( - self.accounts.project, + self.accounts.project_author, client, 5 * LAMPORTS_PER_SOL, ); + let signers = vec![project_author.clone()]; let state = fuzz_accounts .state .get_or_create_account( @@ -260,7 +251,7 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { &[project_author.pubkey().as_ref(), STATE_SEED.as_ref()], &incorrect_ix_sequence_1::ID, ) - .ok_or(FuzzingError::Custom(5))? + .ok_or(FuzzingError::Custom(2))? .pubkey(); let project = fuzz_accounts @@ -274,17 +265,35 @@ pub mod incorrect_ix_sequence_1_fuzz_instructions { ], &incorrect_ix_sequence_1::ID, ) - .ok_or(FuzzingError::Custom(6))? + .ok_or(FuzzingError::Custom(3))? .pubkey(); - let acc_meta = incorrect_ix_sequence_1::accounts::Invest { - investor: investor.pubkey(), + + let acc_meta = incorrect_ix_sequence_1::accounts::Register { + project_author: project_author.pubkey(), project, state, - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((signers, acc_meta)) } + fn check( + &self, + pre_ix: Self::IxSnapshot, + post_ix: Self::IxSnapshot, + _ix_data: Self::IxData, + ) -> Result<(), FuzzingError> { + // This fuzz check will reveal that registrations can be performed + // even though registration windows is not open. + let state = pre_ix.state; + if let Some(_project) = post_ix.project { + let registrations_round = state.registrations_round; + if !registrations_round { + return Err(FuzzingError::Custom(1)); + } + } + Ok(()) + } } #[doc = r" Use AccountsStorage where T can be one of:"] #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] diff --git a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 81f0f9af..3785646c 100644 --- a/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/incorrect-ix-sequence-1/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,13 +1,16 @@ use fuzz_instructions::incorrect_ix_sequence_1_fuzz_instructions::Initialize; +use trident_client::fuzzing::*; + +mod fuzz_instructions; + use incorrect_ix_sequence_1::entry as entry_incorrect_ix_sequence_1; use incorrect_ix_sequence_1::ID as PROGRAM_ID_INCORRECT_IX_SEQUENCE_1; + const PROGRAM_NAME_INCORRECT_IX_SEQUENCE_1: &str = "incorrect_ix_sequence_1"; -use fuzz_instructions::incorrect_ix_sequence_1_fuzz_instructions::FuzzInstruction as FuzzInstruction_incorrect_ix_sequence_1; -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_incorrect_ix_sequence_1; +use fuzz_instructions::incorrect_ix_sequence_1_fuzz_instructions::FuzzInstruction as fuzz_instruction_incorrect_ix_sequence_1; + +pub type FuzzInstruction = fuzz_instruction_incorrect_ix_sequence_1; struct MyFuzzData; @@ -18,25 +21,21 @@ impl FuzzDataBuilder for MyFuzzData { } } +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_incorrect_ix_sequence_1 = FuzzingProgram::new( + PROGRAM_NAME_INCORRECT_IX_SEQUENCE_1, + &PROGRAM_ID_INCORRECT_IX_SEQUENCE_1, + processor!(convert_entry!(entry_incorrect_ix_sequence_1)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_incorrect_ix_sequence_1]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_INCORRECT_IX_SEQUENCE_1, &mut client); +} + fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_INCORRECT_IX_SEQUENCE_1, - &PROGRAM_ID_INCORRECT_IX_SEQUENCE_1, - processor!(convert_entry!(entry_incorrect_ix_sequence_1)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_INCORRECT_IX_SEQUENCE_1, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/simple-cpi-6/Cargo.lock b/examples/fuzz-tests/simple-cpi-6/Cargo.lock index cdf69895..6412bbc6 100644 --- a/examples/fuzz-tests/simple-cpi-6/Cargo.lock +++ b/examples/fuzz-tests/simple-cpi-6/Cargo.lock @@ -955,6 +955,8 @@ version = "0.1.0" dependencies = [ "anchor-lang", "callee", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] @@ -6087,16 +6089,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6138,6 +6142,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6145,7 +6150,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6154,7 +6159,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6163,7 +6168,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6197,7 +6202,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", diff --git a/examples/fuzz-tests/simple-cpi-6/programs/caller/Cargo.toml b/examples/fuzz-tests/simple-cpi-6/programs/caller/Cargo.toml index ba3dbe19..b26d47da 100644 --- a/examples/fuzz-tests/simple-cpi-6/programs/caller/Cargo.toml +++ b/examples/fuzz-tests/simple-cpi-6/programs/caller/Cargo.toml @@ -15,7 +15,10 @@ no-entrypoint = [] no-idl = [] no-log-ix-name = [] idl-build = ["anchor-lang/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } anchor-lang = "0.30.1" callee = { path = "../callee", features = ["cpi"] } diff --git a/examples/fuzz-tests/simple-cpi-6/programs/caller/src/lib.rs b/examples/fuzz-tests/simple-cpi-6/programs/caller/src/lib.rs index 96dde54c..80e91e90 100644 --- a/examples/fuzz-tests/simple-cpi-6/programs/caller/src/lib.rs +++ b/examples/fuzz-tests/simple-cpi-6/programs/caller/src/lib.rs @@ -1,6 +1,8 @@ use anchor_lang::prelude::*; use callee::program::Callee; +use trident_derive_accounts_snapshots::AccountsSnapshots; + declare_id!("FWtSodrkUnovFPnNRCxneP6VWh6JH6jtQZ4PHoP8Ejuz"); #[program] @@ -21,7 +23,7 @@ pub mod caller { Ok(()) } } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct InitializeCaller<'info> { pub signer: Signer<'info>, pub program: Program<'info, Callee>, diff --git a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/Cargo.toml index 2009814c..e93ae379 100644 --- a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/Cargo.toml @@ -21,3 +21,4 @@ path = "../../programs/callee" [dependencies.caller] path = "../../programs/caller" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index 9e2777c7..00000000 --- a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,49 +0,0 @@ -use anchor_lang::prelude::*; -use callee::program::Callee; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -// pub struct InitializeCalleeSnapshot<'info> { -// pub signer: Signer<'info>, -// } -// impl<'info> InitializeCalleeSnapshot<'info> { -// pub fn deserialize_option( -// _program_id: &anchor_lang::prelude::Pubkey, -// accounts: &'info mut [Option>], -// ) -> core::result::Result { -// let mut accounts_iter = accounts.iter(); -// let signer: Signer<'_> = accounts_iter -// .next() -// .ok_or(FuzzingError::NotEnoughAccounts("signer".to_string()))? -// .as_ref() -// .map(anchor_lang::accounts::signer::Signer::try_from) -// .ok_or(FuzzingError::AccountNotFound("signer".to_string()))? -// .map_err(|_| FuzzingError::CannotDeserializeAccount("signer".to_string()))?; -// Ok(Self { signer }) -// } -// } -pub struct InitializeCallerSnapshot<'info> { - pub signer: Signer<'info>, - pub program: Program<'info, Callee>, -} -impl<'info> InitializeCallerSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let signer: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("signer".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("signer".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("signer".to_string()))?; - let program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("program".to_string()))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("program".to_string()))?; - Ok(Self { signer, program }) - } -} diff --git a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index 6f92a3c9..45065854 100644 --- a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,57 +1,9 @@ -// pub mod callee_fuzz_instructions { -// use crate::accounts_snapshots::*; -// use trident_client::fuzzing::*; -// #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] -// pub enum FuzzInstruction { -// InitializeCallee(InitializeCallee), -// } -// #[derive(Arbitrary, Debug)] -// pub struct InitializeCallee { -// pub accounts: InitializeCalleeAccounts, -// pub data: InitializeCalleeData, -// } -// #[derive(Arbitrary, Debug)] -// pub struct InitializeCalleeAccounts { -// pub signer: AccountId, -// } -// #[derive(Arbitrary, Debug)] -// pub struct InitializeCalleeData { -// pub input: u8, -// } -// impl<'info> IxOps<'info> for InitializeCallee { -// type IxData = callee::instruction::InitializeCallee; -// type IxAccounts = FuzzAccounts; -// type IxSnapshot = InitializeCalleeSnapshot<'info>; -// fn get_data( -// &self, -// _client: &mut impl FuzzClient, -// _fuzz_accounts: &mut FuzzAccounts, -// ) -> Result { -// let data = callee::instruction::InitializeCallee { input: todo!() }; -// Ok(data) -// } -// fn get_accounts( -// &self, -// client: &mut impl FuzzClient, -// fuzz_accounts: &mut FuzzAccounts, -// ) -> Result<(Vec, Vec), FuzzingError> { -// let signers = vec![todo!()]; -// let acc_meta = -// callee::accounts::InitializeCallee { signer: todo!() }.to_account_metas(None); -// Ok((signers, acc_meta)) -// } -// } -// #[doc = r" Use AccountsStorage where T can be one of:"] -// #[doc = r" Keypair, PdaStore, TokenStore, MintStore, ProgramStore"] -// #[derive(Default)] -// pub struct FuzzAccounts { -// signer: AccountsStorage, -// } -// } - pub mod caller_fuzz_instructions { - use crate::accounts_snapshots::*; use trident_client::fuzzing::*; + + use caller::trident_fuzz_initialize_caller_snapshot::InitializeCallerAlias; + + type InitializeCallerSnapshot<'info> = InitializeCallerAlias<'info>; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { InitializeCaller(InitializeCaller), diff --git a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 7afeed42..9b22b0e2 100644 --- a/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/simple-cpi-6/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,46 +1,45 @@ -use callee::entry as entry_callee; -use caller::entry as entry_caller; +use trident_client::fuzzing::*; + +mod fuzz_instructions; +use callee::entry as entry_callee; use callee::ID as PROGRAM_ID_CALLEE; +use caller::entry as entry_caller; use caller::ID as PROGRAM_ID_CALLER; + const PROGRAM_NAME_CALLEE: &str = "callee"; + const PROGRAM_NAME_CALLER: &str = "caller"; -use fuzz_instructions::caller_fuzz_instructions::FuzzInstruction as FuzzInstruction_caller; -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_caller; +use fuzz_instructions::caller_fuzz_instructions::FuzzInstruction as fuzz_instruction_caller; + +pub type FuzzInstruction = fuzz_instruction_caller; struct MyFuzzData; impl FuzzDataBuilder for MyFuzzData {} +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_callee = FuzzingProgram::new( + PROGRAM_NAME_CALLEE, + &PROGRAM_ID_CALLEE, + processor!(convert_entry!(entry_callee)), + ); + + let fuzzing_program_caller = FuzzingProgram::new( + PROGRAM_NAME_CALLER, + &PROGRAM_ID_CALLER, + processor!(convert_entry!(entry_caller)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_callee, fuzzing_program_caller]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_CALLER, &mut client); +} + fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_CALLER, - &PROGRAM_ID_CALLER, - processor!(convert_entry!(entry_caller)) - ); - - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program2 = FuzzingProgram::new( - PROGRAM_NAME_CALLEE, - &PROGRAM_ID_CALLEE, - processor!(convert_entry!(entry_callee)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1,fuzzing_program2]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_CALLER, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/unauthorized-access-2/Anchor.toml b/examples/fuzz-tests/unauthorized-access-2/Anchor.toml index c98f2961..8aa0b387 100644 --- a/examples/fuzz-tests/unauthorized-access-2/Anchor.toml +++ b/examples/fuzz-tests/unauthorized-access-2/Anchor.toml @@ -1,4 +1,5 @@ [toolchain] +anchor_version = "0.30.1" [features] seeds = false diff --git a/examples/fuzz-tests/unauthorized-access-2/Cargo.lock b/examples/fuzz-tests/unauthorized-access-2/Cargo.lock index 50e953f9..ec1f6a52 100644 --- a/examples/fuzz-tests/unauthorized-access-2/Cargo.lock +++ b/examples/fuzz-tests/unauthorized-access-2/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -69,7 +75,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -119,9 +125,9 @@ dependencies = [ [[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", @@ -131,9 +137,9 @@ dependencies = [ [[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.1", @@ -144,9 +150,9 @@ dependencies = [ [[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", @@ -155,9 +161,9 @@ dependencies = [ [[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", @@ -166,9 +172,9 @@ dependencies = [ [[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", @@ -178,20 +184,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -208,9 +220,9 @@ dependencies = [ [[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", @@ -219,9 +231,9 @@ dependencies = [ [[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", @@ -232,9 +244,9 @@ dependencies = [ [[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", @@ -243,9 +255,9 @@ dependencies = [ [[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", @@ -256,24 +268,51 @@ 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.14", + "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 0.3.3", + "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-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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -310,9 +349,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquamarine" @@ -378,7 +417,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -401,7 +440,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -430,7 +469,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -456,15 +495,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -530,9 +569,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -553,13 +592,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -575,21 +614,21 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -635,9 +674,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -712,11 +751,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.5.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -748,15 +787,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "syn_derive", ] @@ -806,9 +845,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -817,9 +856,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -858,22 +897,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -884,9 +923,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -911,9 +950,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -951,15 +990,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" -version = "1.0.95" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -970,9 +1019,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -986,7 +1035,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1110,9 +1159,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1135,33 +1184,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1187,9 +1236,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1273,12 +1322,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1297,16 +1346,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.60", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1322,13 +1371,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1369,7 +1418,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1408,7 +1457,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1502,13 +1551,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1531,7 +1580,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1595,9 +1644,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1631,13 +1680,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19cbb53d33b57ac4df1f0af6b92c38c107cded663c4aea9fae1189dcfc17cf5" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1646,11 +1695,11 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1674,9 +1723,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1690,9 +1739,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1722,24 +1771,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1828,7 +1877,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1914,9 +1963,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1927,9 +1976,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1960,10 +2009,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tracing", ] @@ -2039,6 +2088,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -2111,9 +2166,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2129,9 +2184,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2222,18 +2277,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -2241,9 +2296,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" [[package]] name = "indexmap" @@ -2257,9 +2312,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2280,9 +2335,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2295,11 +2350,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2321,18 +2376,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2363,15 +2418,15 @@ dependencies = [ [[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.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2379,8 +2434,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2439,15 +2495,15 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "thiserror", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2461,9 +2517,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -2476,9 +2532,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.24.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2486,9 +2542,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2496,9 +2552,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2562,22 +2618,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2684,11 +2750,10 @@ 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", ] @@ -2728,7 +2793,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2742,9 +2807,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2765,9 +2830,9 @@ dependencies = [ [[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", ] @@ -2793,11 +2858,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2809,19 +2874,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2832,9 +2897,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2922,9 +2987,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2938,16 +3003,16 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -3014,7 +3079,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3066,9 +3131,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3078,9 +3143,12 @@ 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 = "predicates" @@ -3098,15 +3166,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3138,7 +3206,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -3153,11 +3221,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -3186,9 +3254,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3210,7 +3278,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3264,9 +3332,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3330,7 +3398,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3385,38 +3453,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3426,9 +3485,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3437,15 +3496,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -3480,7 +3539,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", @@ -3513,7 +3572,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3556,7 +3615,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", "unicode-ident", ] @@ -3572,9 +3631,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3584,9 +3643,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3602,11 +3661,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3658,15 +3717,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3709,7 +3768,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3724,11 +3783,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3737,9 +3796,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3747,9 +3806,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -3765,44 +3824,54 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 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.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3831,10 +3900,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3843,7 +3912,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -3872,7 +3941,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3956,6 +4025,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4014,9 +4089,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142161f13c328e7807fe98fb8f6eaaa5045a8eaf4492414aa81254870c4fc8a0" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -4039,9 +4114,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e8b4b15e353d5f0e0ddd77966c6f01b296bd83569af455da5fd9329356ff642" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" dependencies = [ "arrayref", "bincode", @@ -4065,7 +4140,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4100,9 +4175,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eef9fc8aa3ff804dbf17766ab2d2fe38561adc8b521705faa782c18a108d8" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" dependencies = [ "bincode", "bytemuck", @@ -4121,11 +4196,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ - "borsh 1.5.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -4138,9 +4213,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741279a09bf5ea1a3d17e591db7b189e163722e5c46423308c6a6165bea5e74d" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", @@ -4149,9 +4224,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66768544951feb91c3470e255d4613295b5cc5a58a9cc6a4207ab9a0178cfe9" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" dependencies = [ "bincode", "crossbeam-channel", @@ -4169,9 +4244,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e9dd5e42193260cca0794bf4ab9e248f44b3d9710041f241b130d26ed682bc" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -4188,16 +4263,16 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7b34296d69867253671a71a2231b8d5b4a810bd7a5c1c603e7b542832d5980" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" dependencies = [ "bv", "bytemuck", "log", "memmap2 0.5.10", "modular-bitfield", - "num_enum 0.7.2", + "num_enum 0.7.3", "rand 0.8.5", "solana-measure", "solana-sdk", @@ -4206,9 +4281,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9f61034a61db538a41700b6df0b4b9f0392038adaf780150481923ff94356" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -4223,9 +4298,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -4239,9 +4314,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -4266,16 +4341,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2bd5a986d7cac1b4ffb4344413b70b6f21fd7ffa92a985911756b4ac7682a" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -4299,9 +4374,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca100b2bdd7e455f5f0b9791bc204dacd684a0373ad1032697dbad43f34e527f" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4309,9 +4384,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d28779e92a11e32a89ee453edc7d89394d3a68d8c4b75ef0ffb833944c588" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -4323,15 +4398,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7d0022ded19dca32ced5528c6a050596877fc8b9a89322d876960a89466e1b" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -4345,9 +4420,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd3c63699df1680535daee8e486bd496e2ec849c427de4b6a42d4f1b27430949" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" dependencies = [ "lazy_static", "log", @@ -4369,9 +4444,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4394,21 +4469,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c566ebf0da216efc70054bf2d6d06c16fe44b63402c6f3bb04f6a88d8571d9b" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" dependencies = [ "log", "solana-measure", @@ -4419,9 +4494,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79ef26804612173c95be8da84df3128d648173cf1f746de8f183ec8dbedd92" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -4430,9 +4505,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f716a5f1c2f4b562fb008a0cc7d7c0d889cff802a7f8177fdf28772ae1ed9" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -4440,9 +4515,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf1705d52e4f123856725e1b3842cd4928b954ff62391a95af142a5adc58ac6" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -4455,9 +4530,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f2634fd50743e2ca075e663e07b0bd5c2f94db0ac320ce5bc2022e0002d82d" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4483,9 +4558,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0264d7093d44c239d9eb41beb6877b7b1eea5ad8809c93c1d9ab0c840ba390" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4512,9 +4587,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4522,11 +4597,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4534,7 +4609,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.14", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -4543,7 +4618,7 @@ dependencies = [ "light-poseidon", "log", "memoffset 0.9.1", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", "parking_lot", @@ -4567,9 +4642,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dc9f666a8e4f93166ce58eea9dfbf275e5cad461b2f1bbfa06538718dc3212" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4595,9 +4670,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2760112327ffce892f6a21030f7c9e4b6da3ded8c8eadf1dbfffcb5a754c61db" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ "assert_matches", "async-trait", @@ -4625,9 +4700,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdcbdad685b87475a91909fdb442d2edfabc2870110580c7f0cf7eb7883f97" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" dependencies = [ "crossbeam-channel", "futures-util", @@ -4650,9 +4725,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056e909037b05097d2ff0181cb7e3d26876d8dff6d50701463a61e990cf84afd" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4677,9 +4752,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93a5e1ef891dca2cca907f7196b6a5d3b80af4183f2be0f981906b16711ff5d" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4687,9 +4762,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c06eaf47d9a98ba22e890e68868f5d48c91e01268c541a53b5960288b617d6" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4706,9 +4781,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1d4b6f1f4e3dab7509401e85edc1c1ac208c61819de90178e01cf162c9c051" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4732,9 +4807,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31feddef24d3e0aab189571adea7f109639ef6179fcd3cd34ffc8c73d3409f1" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4754,9 +4829,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1837728262063723c659e4b8c0acf0baa99cd38cb333511456465d2c9e654474" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4767,9 +4842,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3480088ad0ffb701ada496f19754b4ff737e516c6b5f1231508e50ae2e0ea3" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" dependencies = [ "aquamarine", "arrayref", @@ -4798,7 +4873,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4844,15 +4919,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50cac89269a01235f6b421bc580132191f4df388f4265513e78fd00cf864dd" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 1.5.0", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4871,7 +4946,7 @@ dependencies = [ "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -4899,15 +4974,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4918,9 +4993,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0deed4fe8bb31ff178d8b7e8295bc81e6e1d704fc0e2c5565f58d9eb8feec89d" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" dependencies = [ "crossbeam-channel", "log", @@ -4934,9 +5009,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea02d44b82ed0eb271871cf8a1b8179a0ab50f4f995e7d8ae691c1971bd0a0e" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" dependencies = [ "bincode", "log", @@ -4949,16 +5024,16 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a20843e8370adb3c04f47caa79ffdc92ae1bf078ad26530be1bca5d7bdd5d2" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -4982,9 +5057,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01294e45b407b7d4c8ff546af6f60344efd6591cf162c88e231ee3ba2c544672" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -4996,9 +5071,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74da8f36b89b28c47e5ba3bad5279ff3dfea5829154882845d4821fc76ff497" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -5011,14 +5086,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f2fd4b4aeffa14b9c5be9913072ea8e72ca261254a65a999f3d2fd70e7a660" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -5035,9 +5110,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3efa0d30f78dbc74e795638b053dd6ec7230739301e7f0e06b586f7731fd25c8" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -5060,9 +5135,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32af58cadd37be19d04e0f3877104b8640bccc4be8ca1dbf431549b399b784c2" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5075,9 +5150,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c7cef8aa9f1c633bf09dd91b8e635b6b30c40236652031b1800b245dc1bd02" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -5091,9 +5166,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12945ee508c751ffdce58f976be6e58a05529ce0032c1f7db76eed6a8d76b33c" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" dependencies = [ "crossbeam-channel", "itertools", @@ -5110,9 +5185,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725a39044d455c08fe83fca758e94e5ddfaa25f6e2e2cfd5c31d7afdcad8de38" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -5132,9 +5207,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39263f3e47a160b9b67896f2225d56e6872905c066152cbe61f5fd201c52a6d2" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -5146,9 +5221,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630dc0b5f6250cf6a4c8b2bd3895283738915e83eba5453db20bb02b2527f302" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5175,9 +5250,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -5232,9 +5307,9 @@ dependencies = [ [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" dependencies = [ "bytemuck", "solana-program", @@ -5249,7 +5324,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5261,7 +5336,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", "thiserror", ] @@ -5276,9 +5351,9 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" dependencies = [ "borsh 0.10.3", "bytemuck", @@ -5289,9 +5364,9 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ "num-derive 0.4.2", "num-traits", @@ -5309,14 +5384,14 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", @@ -5351,7 +5426,7 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -5410,9 +5485,9 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", @@ -5439,6 +5514,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.24.1" @@ -5486,9 +5567,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5504,7 +5585,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5548,9 +5629,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5594,14 +5675,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5648,7 +5730,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5659,7 +5741,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "test-case-core", ] @@ -5680,22 +5762,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5760,9 +5842,9 @@ 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", ] @@ -5775,32 +5857,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5872,16 +5953,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -5894,11 +5974,26 @@ 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.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5906,27 +6001,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5948,7 +6045,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5987,16 +6084,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6024,7 +6123,7 @@ dependencies = [ "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", @@ -6038,6 +6137,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6045,7 +6145,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6054,7 +6154,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6063,7 +6163,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6097,7 +6197,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", @@ -6142,6 +6242,8 @@ name = "unauthorized-access-2" version = "0.1.0" dependencies = [ "anchor-lang", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] @@ -6173,15 +6275,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -6232,9 +6334,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -6261,9 +6363,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -6304,34 +6406,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6341,9 +6444,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6351,28 +6454,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6411,11 +6514,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6430,7 +6533,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6448,7 +6551,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -6468,18 +6580,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6490,9 +6602,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6502,9 +6614,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6514,15 +6626,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -6532,9 +6644,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6544,9 +6656,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6556,9 +6668,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6568,9 +6680,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -6581,6 +6693,15 @@ 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 = "winreg" version = "0.50.0" @@ -6631,22 +6752,23 @@ dependencies = [ [[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.60", + "syn 2.0.76", ] [[package]] @@ -6666,7 +6788,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -6690,9 +6812,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/Cargo.toml b/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/Cargo.toml index 717a8b74..3b31e36c 100644 --- a/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/Cargo.toml +++ b/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/Cargo.toml @@ -9,11 +9,15 @@ crate-type = ["cdylib", "lib"] name = "unauthorized_access_2" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] -anchor-lang = "0.29.0" +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } +anchor-lang = "0.30.1" diff --git a/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/initialize.rs b/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/initialize.rs index a764babb..7d9e998f 100644 --- a/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/initialize.rs +++ b/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/initialize.rs @@ -2,6 +2,8 @@ use anchor_lang::{prelude::*, system_program}; use crate::state::{Escrow, ESCROW_SEED}; +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _initialize(ctx: Context, receiver: Pubkey, amount: u64) -> Result<()> { let escorw = &mut ctx.accounts.escrow; @@ -24,7 +26,7 @@ pub fn _initialize(ctx: Context, receiver: Pubkey, amount: u64) -> R Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] #[instruction(receiver: Pubkey)] pub struct Initialize<'info> { #[account(mut)] @@ -33,7 +35,7 @@ pub struct Initialize<'info> { init, payer = author, space = 8 + Escrow::LEN, - seeds = [author.key().as_ref(),receiver.as_ref(),ESCROW_SEED.as_ref()], + seeds = [author.key().as_ref(),receiver.as_ref(),ESCROW_SEED.as_bytes()], bump )] pub escrow: Account<'info, Escrow>, diff --git a/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/withdraw.rs b/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/withdraw.rs index 5c454e28..297ce5ee 100644 --- a/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/withdraw.rs +++ b/examples/fuzz-tests/unauthorized-access-2/programs/unauthorized-access-2/src/instructions/withdraw.rs @@ -1,12 +1,14 @@ use crate::state::{Escrow, ESCROW_SEED}; use anchor_lang::prelude::*; +use trident_derive_accounts_snapshots::AccountsSnapshots; + pub fn _withdraw(_ctx: Context) -> Result<()> { // close will transfer everything to the receiver Ok(()) } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Withdraw<'info> { #[account(mut)] pub receiver: Signer<'info>, @@ -14,7 +16,7 @@ pub struct Withdraw<'info> { mut, close = receiver, // INFO: There is a missing check to confirm that the 'receiver' matches the one specified in the Escrow. - seeds = [escrow.author.key().as_ref(),escrow.receiver.as_ref(),ESCROW_SEED.as_ref()], + seeds = [escrow.author.key().as_ref(),escrow.receiver.as_ref(),ESCROW_SEED.as_bytes()], bump = escrow.bump, )] pub escrow: Account<'info, Escrow>, diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/Cargo.toml index 67a84955..2fb70ebd 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/Cargo.toml @@ -18,3 +18,4 @@ path = "../../../../../crates/client" [dependencies.unauthorized-access-2] path = "../../programs/unauthorized-access-2" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index 2690db9c..00000000 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,106 +0,0 @@ -use anchor_lang::prelude::*; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitializeSnapshot<'info> { - pub author: Signer<'info>, - pub escrow: Option>, - pub system_program: Program<'info, System>, -} -pub struct WithdrawSnapshot<'info> { - pub receiver: Signer<'info>, - pub escrow: Option>, - pub system_program: Program<'info, System>, -} -impl<'info> InitializeSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let author: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("author".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("author".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("author".to_string()))?; - let escrow: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("escrow".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("escrow".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "escrow".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - author, - escrow, - system_program, - }) - } -} -impl<'info> WithdrawSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let receiver: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("receiver".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("receiver".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("receiver".to_string()))?; - let escrow: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("escrow".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("escrow".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "escrow".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - receiver, - escrow, - system_program, - }) - } -} diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index b1c3bbea..48549d8b 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,9 +1,13 @@ pub mod unauthorized_access_2_fuzz_instructions { - use crate::accounts_snapshots::*; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; use unauthorized_access_2::ESCROW_SEED; + + use unauthorized_access_2::trident_fuzz_initialize_snapshot::InitializeAlias; + use unauthorized_access_2::trident_fuzz_withdraw_snapshot::WithdrawAlias; + + type InitializeSnapshot<'info> = InitializeAlias<'info>; + type WithdrawSnapshot<'info> = WithdrawAlias<'info>; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), @@ -54,7 +58,7 @@ pub mod unauthorized_access_2_fuzz_instructions { ); let data = unauthorized_access_2::instruction::Initialize { receiver: receiver.pubkey(), - amount: 100, + amount: self.data.amount, }; Ok(data) } @@ -90,7 +94,7 @@ pub mod unauthorized_access_2_fuzz_instructions { let acc_meta = unauthorized_access_2::accounts::Initialize { author: author.pubkey(), escrow: escrow.pubkey(), - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((vec![author], acc_meta)) @@ -135,7 +139,7 @@ pub mod unauthorized_access_2_fuzz_instructions { let acc_meta = unauthorized_access_2::accounts::Withdraw { receiver: receiver.pubkey(), escrow: escrow.pubkey(), - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((vec![receiver], acc_meta)) diff --git a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index f1a1ec49..11acaad3 100644 --- a/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/unauthorized-access-2/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,13 +1,16 @@ use fuzz_instructions::unauthorized_access_2_fuzz_instructions::Initialize; +use trident_client::fuzzing::*; + +mod fuzz_instructions; + use unauthorized_access_2::entry as entry_unauthorized_access_2; use unauthorized_access_2::ID as PROGRAM_ID_UNAUTHORIZED_ACCESS_2; + const PROGRAM_NAME_UNAUTHORIZED_ACCESS_2: &str = "unauthorized_access_2"; -use fuzz_instructions::unauthorized_access_2_fuzz_instructions::FuzzInstruction as FuzzInstruction_unauthorized_access_2; -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_unauthorized_access_2; +use fuzz_instructions::unauthorized_access_2_fuzz_instructions::FuzzInstruction as fuzz_instruction_unauthorized_access_2; + +pub type FuzzInstruction = fuzz_instruction_unauthorized_access_2; struct MyFuzzData; @@ -19,25 +22,21 @@ impl FuzzDataBuilder for MyFuzzData { } } +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_unauthorized_access_2 = FuzzingProgram::new( + PROGRAM_NAME_UNAUTHORIZED_ACCESS_2, + &PROGRAM_ID_UNAUTHORIZED_ACCESS_2, + processor!(convert_entry!(entry_unauthorized_access_2)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_unauthorized_access_2]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_UNAUTHORIZED_ACCESS_2, &mut client); +} + fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_UNAUTHORIZED_ACCESS_2, - &PROGRAM_ID_UNAUTHORIZED_ACCESS_2, - processor!(convert_entry!(entry_unauthorized_access_2)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_UNAUTHORIZED_ACCESS_2, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock b/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock index 040175d6..54b4f221 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock +++ b/examples/fuzz-tests/unchecked-arithmetic-0/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -69,7 +75,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -119,9 +125,9 @@ dependencies = [ [[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", @@ -131,9 +137,9 @@ dependencies = [ [[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.1", @@ -144,9 +150,9 @@ dependencies = [ [[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", @@ -155,9 +161,9 @@ dependencies = [ [[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", @@ -166,9 +172,9 @@ dependencies = [ [[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", @@ -178,20 +184,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -208,9 +220,9 @@ dependencies = [ [[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", @@ -219,9 +231,9 @@ dependencies = [ [[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", @@ -232,9 +244,9 @@ dependencies = [ [[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", @@ -243,9 +255,9 @@ dependencies = [ [[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", @@ -256,24 +268,51 @@ 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.14", + "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 0.3.3", + "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-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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -310,9 +349,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" [[package]] name = "aquamarine" @@ -378,7 +417,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -401,7 +440,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -430,7 +469,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -456,15 +495,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -530,9 +569,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -553,13 +592,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -575,21 +614,21 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -635,9 +674,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -712,11 +751,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dbe5b10e214954177fb1dc9fbd20a1a2608fe99e6c832033bdc7cea287a20d77" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.5.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -748,15 +787,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7a8646f94ab393e43e8b35a2558b1624bed28b97ee09c5d15456e3c9463f46d" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "syn_derive", ] @@ -806,9 +845,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -817,9 +856,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -858,22 +897,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -884,9 +923,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "bzip2" @@ -911,9 +950,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -951,15 +990,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" -version = "1.0.95" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -970,9 +1019,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -986,7 +1035,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -1110,9 +1159,9 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" [[package]] name = "convert_case" @@ -1135,33 +1184,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1187,9 +1236,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1273,12 +1322,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1297,16 +1346,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.60", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1322,13 +1371,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1369,7 +1418,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1408,7 +1457,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1502,13 +1551,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1531,7 +1580,7 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1595,9 +1644,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1631,13 +1680,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19cbb53d33b57ac4df1f0af6b92c38c107cded663c4aea9fae1189dcfc17cf5" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1646,11 +1695,11 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1674,9 +1723,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1690,9 +1739,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1722,24 +1771,24 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.23" +version = "0.2.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.4.1", - "windows-sys 0.52.0", + "libredox", + "windows-sys 0.59.0", ] [[package]] name = "flate2" -version = "1.0.30" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f54427cfd1c7829e2a139fcefea601bf088ebca651d2bf53ebc600eac295dae" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", ] [[package]] @@ -1828,7 +1877,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1914,9 +1963,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1927,9 +1976,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1960,10 +2009,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tracing", ] @@ -2039,6 +2088,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -2111,9 +2166,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2129,9 +2184,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2222,18 +2277,18 @@ dependencies = [ [[package]] name = "include_dir" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18762faeff7122e89e0857b02f7ce6fcc0d101d5e9ad2ad7846cc01d61b7f19e" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" dependencies = [ "include_dir_macros", ] [[package]] name = "include_dir_macros" -version = "0.7.3" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b139284b5cf57ecfa712bcc66950bb635b31aff41c188e8a4cfc758eca374a3f" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" dependencies = [ "proc-macro2", "quote", @@ -2241,9 +2296,9 @@ dependencies = [ [[package]] name = "index_list" -version = "0.2.11" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70891286cb8e844fdfcf1178b47569699f9e20b5ecc4b45a6240a64771444638" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" [[package]] name = "indexmap" @@ -2257,9 +2312,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2280,9 +2335,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2295,11 +2350,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2321,18 +2376,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2363,15 +2418,15 @@ dependencies = [ [[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.154" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae743338b92ff9146ce83992f766a31066a91a8c84a45e0e9f21e7cf6de6d346" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2379,8 +2434,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2439,15 +2495,15 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "thiserror", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2461,9 +2517,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -2476,9 +2532,9 @@ dependencies = [ [[package]] name = "lz4" -version = "1.24.0" +version = "1.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" dependencies = [ "libc", "lz4-sys", @@ -2486,9 +2542,9 @@ dependencies = [ [[package]] name = "lz4-sys" -version = "1.9.4" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" dependencies = [ "cc", "libc", @@ -2496,9 +2552,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2562,22 +2618,32 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] @@ -2684,11 +2750,10 @@ 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", ] @@ -2728,7 +2793,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2742,9 +2807,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2765,9 +2830,9 @@ dependencies = [ [[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", ] @@ -2793,11 +2858,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2809,19 +2874,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2832,9 +2897,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2922,9 +2987,9 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2938,16 +3003,16 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.1", + "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -3014,7 +3079,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3066,9 +3131,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -3078,9 +3143,12 @@ 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 = "predicates" @@ -3098,15 +3166,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.6" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b794032607612e7abeb4db69adb4e33590fa6cf1149e95fd7cb00e634b92f174" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" [[package]] name = "predicates-tree" -version = "1.0.9" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "368ba315fb8c5052ab692e68a0eefec6ec57b23a36959c14496f0b0df2c0cecf" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" dependencies = [ "predicates-core", "termtree", @@ -3138,7 +3206,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -3153,11 +3221,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -3186,9 +3254,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -3210,7 +3278,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3264,9 +3332,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3330,7 +3398,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3385,38 +3453,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3426,9 +3485,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3437,15 +3496,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -3480,7 +3539,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", @@ -3513,7 +3572,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3556,7 +3615,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", "unicode-ident", ] @@ -3572,9 +3631,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3584,9 +3643,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3602,11 +3661,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3658,15 +3717,15 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" [[package]] name = "same-file" @@ -3709,7 +3768,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3724,11 +3783,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3737,9 +3796,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3747,9 +3806,9 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] @@ -3765,44 +3824,54 @@ dependencies = [ [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 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.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3831,10 +3900,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3843,7 +3912,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -3872,7 +3941,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3956,6 +4025,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -4014,9 +4089,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142161f13c328e7807fe98fb8f6eaaa5045a8eaf4492414aa81254870c4fc8a0" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -4039,9 +4114,9 @@ dependencies = [ [[package]] name = "solana-accounts-db" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e8b4b15e353d5f0e0ddd77966c6f01b296bd83569af455da5fd9329356ff642" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" dependencies = [ "arrayref", "bincode", @@ -4065,7 +4140,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4100,9 +4175,9 @@ dependencies = [ [[package]] name = "solana-address-lookup-table-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eef9fc8aa3ff804dbf17766ab2d2fe38561adc8b521705faa782c18a108d8" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" dependencies = [ "bincode", "bytemuck", @@ -4121,11 +4196,11 @@ dependencies = [ [[package]] name = "solana-banks-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ - "borsh 1.5.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -4138,9 +4213,9 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741279a09bf5ea1a3d17e591db7b189e163722e5c46423308c6a6165bea5e74d" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", @@ -4149,9 +4224,9 @@ dependencies = [ [[package]] name = "solana-banks-server" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f66768544951feb91c3470e255d4613295b5cc5a58a9cc6a4207ab9a0178cfe9" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" dependencies = [ "bincode", "crossbeam-channel", @@ -4169,9 +4244,9 @@ dependencies = [ [[package]] name = "solana-bpf-loader-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e9dd5e42193260cca0794bf4ab9e248f44b3d9710041f241b130d26ed682bc" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -4188,16 +4263,16 @@ dependencies = [ [[package]] name = "solana-bucket-map" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7b34296d69867253671a71a2231b8d5b4a810bd7a5c1c603e7b542832d5980" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" dependencies = [ "bv", "bytemuck", "log", "memmap2 0.5.10", "modular-bitfield", - "num_enum 0.7.2", + "num_enum 0.7.3", "rand 0.8.5", "solana-measure", "solana-sdk", @@ -4206,9 +4281,9 @@ dependencies = [ [[package]] name = "solana-clap-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9f61034a61db538a41700b6df0b4b9f0392038adaf780150481923ff94356" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -4223,9 +4298,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -4239,9 +4314,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -4266,16 +4341,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2bd5a986d7cac1b4ffb4344413b70b6f21fd7ffa92a985911756b4ac7682a" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -4299,9 +4374,9 @@ dependencies = [ [[package]] name = "solana-compute-budget-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca100b2bdd7e455f5f0b9791bc204dacd684a0373ad1032697dbad43f34e527f" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" dependencies = [ "solana-program-runtime", "solana-sdk", @@ -4309,9 +4384,9 @@ dependencies = [ [[package]] name = "solana-config-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d28779e92a11e32a89ee453edc7d89394d3a68d8c4b75ef0ffb833944c588" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -4323,15 +4398,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7d0022ded19dca32ced5528c6a050596877fc8b9a89322d876960a89466e1b" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -4345,9 +4420,9 @@ dependencies = [ [[package]] name = "solana-cost-model" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd3c63699df1680535daee8e486bd496e2ec849c427de4b6a42d4f1b27430949" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" dependencies = [ "lazy_static", "log", @@ -4369,9 +4444,9 @@ dependencies = [ [[package]] name = "solana-frozen-abi" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -4394,21 +4469,21 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "solana-loader-v4-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c566ebf0da216efc70054bf2d6d06c16fe44b63402c6f3bb04f6a88d8571d9b" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" dependencies = [ "log", "solana-measure", @@ -4419,9 +4494,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79ef26804612173c95be8da84df3128d648173cf1f746de8f183ec8dbedd92" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -4430,9 +4505,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f716a5f1c2f4b562fb008a0cc7d7c0d889cff802a7f8177fdf28772ae1ed9" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -4440,9 +4515,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf1705d52e4f123856725e1b3842cd4928b954ff62391a95af142a5adc58ac6" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -4455,9 +4530,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f2634fd50743e2ca075e663e07b0bd5c2f94db0ac320ce5bc2022e0002d82d" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4483,9 +4558,9 @@ checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" [[package]] name = "solana-perf" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0264d7093d44c239d9eb41beb6877b7b1eea5ad8809c93c1d9ab0c840ba390" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4512,9 +4587,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4522,11 +4597,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.5.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4534,7 +4609,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.14", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -4543,7 +4618,7 @@ dependencies = [ "light-poseidon", "log", "memoffset 0.9.1", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", "parking_lot", @@ -4567,9 +4642,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dc9f666a8e4f93166ce58eea9dfbf275e5cad461b2f1bbfa06538718dc3212" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4595,9 +4670,9 @@ dependencies = [ [[package]] name = "solana-program-test" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2760112327ffce892f6a21030f7c9e4b6da3ded8c8eadf1dbfffcb5a754c61db" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ "assert_matches", "async-trait", @@ -4625,9 +4700,9 @@ dependencies = [ [[package]] name = "solana-pubsub-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdcbdad685b87475a91909fdb442d2edfabc2870110580c7f0cf7eb7883f97" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" dependencies = [ "crossbeam-channel", "futures-util", @@ -4650,9 +4725,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056e909037b05097d2ff0181cb7e3d26876d8dff6d50701463a61e990cf84afd" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4677,9 +4752,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93a5e1ef891dca2cca907f7196b6a5d3b80af4183f2be0f981906b16711ff5d" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4687,9 +4762,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c06eaf47d9a98ba22e890e68868f5d48c91e01268c541a53b5960288b617d6" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4706,9 +4781,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1d4b6f1f4e3dab7509401e85edc1c1ac208c61819de90178e01cf162c9c051" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4732,9 +4807,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31feddef24d3e0aab189571adea7f109639ef6179fcd3cd34ffc8c73d3409f1" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4754,9 +4829,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1837728262063723c659e4b8c0acf0baa99cd38cb333511456465d2c9e654474" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4767,9 +4842,9 @@ dependencies = [ [[package]] name = "solana-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3480088ad0ffb701ada496f19754b4ff737e516c6b5f1231508e50ae2e0ea3" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" dependencies = [ "aquamarine", "arrayref", @@ -4798,7 +4873,7 @@ dependencies = [ "num-derive 0.4.2", "num-traits", "num_cpus", - "num_enum 0.7.2", + "num_enum 0.7.3", "ouroboros", "percentage", "qualifier_attr", @@ -4844,15 +4919,15 @@ dependencies = [ [[package]] name = "solana-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50cac89269a01235f6b421bc580132191f4df388f4265513e78fd00cf864dd" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 1.5.0", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4871,7 +4946,7 @@ dependencies = [ "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -4899,15 +4974,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4918,9 +4993,9 @@ checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" [[package]] name = "solana-send-transaction-service" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0deed4fe8bb31ff178d8b7e8295bc81e6e1d704fc0e2c5565f58d9eb8feec89d" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" dependencies = [ "crossbeam-channel", "log", @@ -4934,9 +5009,9 @@ dependencies = [ [[package]] name = "solana-stake-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea02d44b82ed0eb271871cf8a1b8179a0ab50f4f995e7d8ae691c1971bd0a0e" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" dependencies = [ "bincode", "log", @@ -4949,16 +5024,16 @@ dependencies = [ [[package]] name = "solana-streamer" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a20843e8370adb3c04f47caa79ffdc92ae1bf078ad26530be1bca5d7bdd5d2" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -4982,9 +5057,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01294e45b407b7d4c8ff546af6f60344efd6591cf162c88e231ee3ba2c544672" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -4996,9 +5071,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74da8f36b89b28c47e5ba3bad5279ff3dfea5829154882845d4821fc76ff497" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -5011,14 +5086,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f2fd4b4aeffa14b9c5be9913072ea8e72ca261254a65a999f3d2fd70e7a660" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -5035,9 +5110,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3efa0d30f78dbc74e795638b053dd6ec7230739301e7f0e06b586f7731fd25c8" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -5060,9 +5135,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32af58cadd37be19d04e0f3877104b8640bccc4be8ca1dbf431549b399b784c2" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -5075,9 +5150,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c7cef8aa9f1c633bf09dd91b8e635b6b30c40236652031b1800b245dc1bd02" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -5091,9 +5166,9 @@ dependencies = [ [[package]] name = "solana-vote" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12945ee508c751ffdce58f976be6e58a05529ce0032c1f7db76eed6a8d76b33c" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" dependencies = [ "crossbeam-channel", "itertools", @@ -5110,9 +5185,9 @@ dependencies = [ [[package]] name = "solana-vote-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725a39044d455c08fe83fca758e94e5ddfaa25f6e2e2cfd5c31d7afdcad8de38" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -5132,9 +5207,9 @@ dependencies = [ [[package]] name = "solana-zk-token-proof-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39263f3e47a160b9b67896f2225d56e6872905c066152cbe61f5fd201c52a6d2" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" dependencies = [ "bytemuck", "num-derive 0.4.2", @@ -5146,9 +5221,9 @@ dependencies = [ [[package]] name = "solana-zk-token-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630dc0b5f6250cf6a4c8b2bd3895283738915e83eba5453db20bb02b2527f302" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -5175,9 +5250,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -5232,9 +5307,9 @@ dependencies = [ [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" dependencies = [ "bytemuck", "solana-program", @@ -5249,7 +5324,7 @@ checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5261,7 +5336,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", "thiserror", ] @@ -5276,9 +5351,9 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" dependencies = [ "borsh 0.10.3", "bytemuck", @@ -5289,9 +5364,9 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" dependencies = [ "num-derive 0.4.2", "num-traits", @@ -5309,14 +5384,14 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.5.2" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f335787add7fa711819f9e7c573f8145a5358a709446fe2d24bf2a88117c90" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", @@ -5351,7 +5426,7 @@ dependencies = [ "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", @@ -5410,9 +5485,9 @@ dependencies = [ [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" dependencies = [ "bytemuck", "solana-program", @@ -5439,6 +5514,12 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + [[package]] name = "strum" version = "0.24.1" @@ -5486,9 +5567,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -5504,7 +5585,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5548,9 +5629,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.40" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b16afcea1f22891c49a00c751c7b63b2233284064f11a200fc624137c51e2ddb" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" dependencies = [ "filetime", "libc", @@ -5594,14 +5675,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5648,7 +5730,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5659,7 +5741,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "test-case-core", ] @@ -5680,22 +5762,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5760,9 +5842,9 @@ 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", ] @@ -5775,32 +5857,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5872,16 +5953,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -5894,11 +5974,26 @@ 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.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5906,27 +6001,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5948,7 +6045,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5987,16 +6084,18 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", @@ -6024,7 +6123,7 @@ dependencies = [ "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", @@ -6038,6 +6137,7 @@ name = "trident-derive-accounts-snapshots" version = "0.0.1" dependencies = [ "anchor-syn", + "convert_case", "proc-macro2", "quote", "syn 1.0.109", @@ -6045,7 +6145,7 @@ dependencies = [ [[package]] name = "trident-derive-displayix" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6054,7 +6154,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6063,7 +6163,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -6097,7 +6197,7 @@ dependencies = [ [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", "quote", @@ -6142,6 +6242,8 @@ name = "unchecked-arithmetic-0" version = "0.1.0" dependencies = [ "anchor-lang", + "trident-derive-accounts-snapshots", + "trident-fuzz", ] [[package]] @@ -6173,15 +6275,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -6232,9 +6334,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -6261,9 +6363,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -6304,34 +6406,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -6341,9 +6444,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -6351,28 +6454,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -6411,11 +6514,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -6430,7 +6533,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -6448,7 +6551,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -6468,18 +6580,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -6490,9 +6602,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -6502,9 +6614,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -6514,15 +6626,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -6532,9 +6644,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -6544,9 +6656,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -6556,9 +6668,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -6568,9 +6680,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -6581,6 +6693,15 @@ 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 = "winreg" version = "0.50.0" @@ -6631,22 +6752,23 @@ dependencies = [ [[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.60", + "syn 2.0.76", ] [[package]] @@ -6666,7 +6788,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -6690,9 +6812,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/Cargo.toml b/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/Cargo.toml index 326f4b2e..5ea06186 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/Cargo.toml +++ b/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/Cargo.toml @@ -9,11 +9,15 @@ crate-type = ["cdylib", "lib"] name = "unchecked_arithmetic_0" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build"] +trident-fuzzing = ["dep:trident-fuzz"] [dependencies] -anchor-lang = "0.29.0" +trident-derive-accounts-snapshots = { path = "../../../../../crates/fuzz/derive/accounts_snapshots" } +trident-fuzz = { path = "../../../../../crates/fuzz", optional = true } +anchor-lang = "0.30.1" diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/src/lib.rs b/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/src/lib.rs index aba9ce07..fbdd2fb8 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/src/lib.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/programs/unchecked-arithmetic-0/src/lib.rs @@ -2,6 +2,8 @@ use anchor_lang::prelude::*; const MAGIC_NUMBER: u8 = 254; +use trident_derive_accounts_snapshots::AccountsSnapshots; + declare_id!("BM8vocQeC2VuDf1KhbHLsZxTh7owzDNTAkKyZoTxFiUs"); #[program] @@ -36,7 +38,7 @@ pub fn buggy_math_function(input1: u8, input2: u8) -> u8 { input1 / divisor } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Initialize<'info> { #[account(init, payer = user, space = 8 + 40)] pub counter: Account<'info, Counter>, @@ -47,7 +49,7 @@ pub struct Initialize<'info> { pub system_program: Program<'info, System>, } -#[derive(Accounts)] +#[derive(Accounts, AccountsSnapshots)] pub struct Update<'info> { #[account(mut, has_one = authority)] pub counter: Account<'info, Counter>, diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/Cargo.toml b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/Cargo.toml index 8da1ab85..9d2e4caf 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/Cargo.toml +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/Cargo.toml @@ -18,3 +18,4 @@ path = "../../../../../crates/client" [dependencies.unchecked-arithmetic-0] path = "../../programs/unchecked-arithmetic-0" +features = ["trident-fuzzing"] diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs deleted file mode 100644 index b53ed2ad..00000000 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/accounts_snapshots.rs +++ /dev/null @@ -1,82 +0,0 @@ -use anchor_lang::prelude::*; -use trident_client::fuzzing::{anchor_lang, FuzzingError}; -pub struct InitializeSnapshot<'info> { - pub counter: Option>, - pub user: Signer<'info>, - pub system_program: Program<'info, System>, -} -pub struct UpdateSnapshot<'info> { - pub counter: Account<'info, unchecked_arithmetic_0::Counter>, - pub authority: Signer<'info>, -} -impl<'info> InitializeSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let counter: Option< - anchor_lang::accounts::account::Account, - > = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("counter".to_string()))? - .as_ref() - .map(|acc| { - if acc.key() != *_program_id { - anchor_lang::accounts::account::Account::try_from(acc) - .map_err(|_| FuzzingError::CannotDeserializeAccount("counter".to_string())) - } else { - Err(FuzzingError::OptionalAccountNotProvided( - "counter".to_string(), - )) - } - }) - .transpose() - .unwrap_or(None); - let user: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("user".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("user".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("user".to_string()))?; - let system_program: anchor_lang::accounts::program::Program = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts( - "system_program".to_string(), - ))? - .as_ref() - .map(anchor_lang::accounts::program::Program::try_from) - .ok_or(FuzzingError::AccountNotFound("system_program".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("system_program".to_string()))?; - Ok(Self { - counter, - user, - system_program, - }) - } -} -impl<'info> UpdateSnapshot<'info> { - pub fn deserialize_option( - _program_id: &anchor_lang::prelude::Pubkey, - accounts: &'info mut [Option>], - ) -> core::result::Result { - let mut accounts_iter = accounts.iter(); - let counter: anchor_lang::accounts::account::Account = - accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("counter".to_string()))? - .as_ref() - .map(anchor_lang::accounts::account::Account::try_from) - .ok_or(FuzzingError::AccountNotFound("counter".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("counter".to_string()))?; - let authority: Signer<'_> = accounts_iter - .next() - .ok_or(FuzzingError::NotEnoughAccounts("authority".to_string()))? - .as_ref() - .map(anchor_lang::accounts::signer::Signer::try_from) - .ok_or(FuzzingError::AccountNotFound("authority".to_string()))? - .map_err(|_| FuzzingError::CannotDeserializeAccount("authority".to_string()))?; - Ok(Self { counter, authority }) - } -} diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs index b4aa2c23..5a9fbe94 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/fuzz_instructions.rs @@ -1,8 +1,12 @@ pub mod unchecked_arithmetic_0_fuzz_instructions { - use crate::accounts_snapshots::*; use solana_sdk::native_token::LAMPORTS_PER_SOL; - use solana_sdk::system_program::ID as SYSTEM_PROGRAM_ID; use trident_client::fuzzing::*; + + use unchecked_arithmetic_0::trident_fuzz_initialize_snapshot::InitializeAlias; + use unchecked_arithmetic_0::trident_fuzz_update_snapshot::UpdateAlias; + + type InitializeSnapshot<'info> = InitializeAlias<'info>; + type UpdateSnapshot<'info> = UpdateAlias<'info>; #[derive(Arbitrary, DisplayIx, FuzzTestExecutor, FuzzDeserialize)] pub enum FuzzInstruction { Initialize(Initialize), @@ -67,7 +71,7 @@ pub mod unchecked_arithmetic_0_fuzz_instructions { let acc_meta = unchecked_arithmetic_0::accounts::Initialize { counter: counter.pubkey(), user: user.pubkey(), - system_program: SYSTEM_PROGRAM_ID, + system_program: solana_sdk::system_program::ID, } .to_account_metas(None); Ok((vec![user, counter], acc_meta)) diff --git a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs index 87ebeff7..0e0c18aa 100644 --- a/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs +++ b/examples/fuzz-tests/unchecked-arithmetic-0/trident-tests/fuzz_tests/fuzz_0/test_fuzz.rs @@ -1,13 +1,17 @@ use fuzz_instructions::unchecked_arithmetic_0_fuzz_instructions::Initialize; +use fuzz_instructions::unchecked_arithmetic_0_fuzz_instructions::Update; +use trident_client::fuzzing::*; + +mod fuzz_instructions; + use unchecked_arithmetic_0::entry as entry_unchecked_arithmetic_0; use unchecked_arithmetic_0::ID as PROGRAM_ID_UNCHECKED_ARITHMETIC_0; + const PROGRAM_NAME_UNCHECKED_ARITHMETIC_0: &str = "unchecked_arithmetic_0"; -use fuzz_instructions::unchecked_arithmetic_0_fuzz_instructions::FuzzInstruction as FuzzInstruction_unchecked_arithmetic_0; -use trident_client::fuzzing::*; -mod accounts_snapshots; -mod fuzz_instructions; -pub type FuzzInstruction = FuzzInstruction_unchecked_arithmetic_0; +use fuzz_instructions::unchecked_arithmetic_0_fuzz_instructions::FuzzInstruction as fuzz_instruction_unchecked_arithmetic_0; + +pub type FuzzInstruction = fuzz_instruction_unchecked_arithmetic_0; struct MyFuzzData; @@ -16,27 +20,30 @@ impl FuzzDataBuilder for MyFuzzData { let init = FuzzInstruction::Initialize(Initialize::arbitrary(u)?); Ok(vec![init]) } + fn ixs(u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + let update = FuzzInstruction::Update(Update::arbitrary(u)?); + Ok(vec![update]) + } + fn post_ixs(_u: &mut arbitrary::Unstructured) -> arbitrary::Result> { + Ok(vec![]) + } +} + +fn fuzz_iteration + std::fmt::Display, U>(fuzz_data: FuzzData) { + let fuzzing_program_unchecked_arithmetic_0 = FuzzingProgram::new( + PROGRAM_NAME_UNCHECKED_ARITHMETIC_0, + &PROGRAM_ID_UNCHECKED_ARITHMETIC_0, + processor!(convert_entry!(entry_unchecked_arithmetic_0)), + ); + + let mut client = + ProgramTestClientBlocking::new(&[fuzzing_program_unchecked_arithmetic_0]).unwrap(); + + let _ = fuzz_data.run_with_runtime(PROGRAM_ID_UNCHECKED_ARITHMETIC_0, &mut client); } fn main() { loop { - fuzz_trident!(fuzz_ix: FuzzInstruction, |fuzz_data: MyFuzzData| { - - // Specify programs you want to include in genesis - // Programs without an `entry_fn`` will be searched for within `trident-genesis` folder. - // `entry_fn`` example: processor!(convert_entry!(program_entry)) - let fuzzing_program1 = FuzzingProgram::new( - PROGRAM_NAME_UNCHECKED_ARITHMETIC_0, - &PROGRAM_ID_UNCHECKED_ARITHMETIC_0, - processor!(convert_entry!(entry_unchecked_arithmetic_0)) - ); - - let mut client = - ProgramTestClientBlocking::new(&[fuzzing_program1]) - .unwrap(); - - // fill Program ID of program you are going to call - let _ = fuzz_data.run_with_runtime(PROGRAM_ID_UNCHECKED_ARITHMETIC_0, &mut client); - }); + fuzz_trident ! (fuzz_ix : FuzzInstruction , | fuzz_data : MyFuzzData | { fuzz_iteration (fuzz_data) ; }); } } diff --git a/examples/integration-tests/escrow/.program_client/src/lib.rs b/examples/integration-tests/escrow/.program_client/src/lib.rs index 4e1defe5..4653c102 100644 --- a/examples/integration-tests/escrow/.program_client/src/lib.rs +++ b/examples/integration-tests/escrow/.program_client/src/lib.rs @@ -2,70 +2,7 @@ pub mod escrow_instruction { use trident_client::prelude::*; use trident_client::test::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, - 68u8, 170u8, 153u8, 74u8, 59u8, - ]); - pub async fn initialize_escrow( - client: &Client, - i_initializer_amount: u64, - i_taker_amount: u64, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - signers: impl IntoIterator + Send + 'static, - ) -> Result { - client - .send_instruction( - PROGRAM_ID, - escrow::instruction::InitializeEscrow { - initializer_amount: i_initializer_amount, - taker_amount: i_taker_amount, - }, - escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, - }, - signers, - ) - .await - } - pub fn initialize_escrow_ix( - i_initializer_amount: u64, - i_taker_amount: u64, - a_initializer: Pubkey, - a_initializer_deposit_token_account: Pubkey, - a_initializer_receive_token_account: Pubkey, - a_escrow_account: Pubkey, - a_system_program: Pubkey, - a_token_program: Pubkey, - ) -> Instruction { - Instruction { - program_id: PROGRAM_ID, - data: escrow::instruction::InitializeEscrow { - initializer_amount: i_initializer_amount, - taker_amount: i_taker_amount, - } - .data(), - accounts: escrow::accounts::InitializeEscrow { - initializer: a_initializer, - initializer_deposit_token_account: a_initializer_deposit_token_account, - initializer_receive_token_account: a_initializer_receive_token_account, - escrow_account: a_escrow_account, - system_program: a_system_program, - token_program: a_token_program, - } - .to_account_metas(None), - } - } + pub const PROGRAM_ID: Pubkey = pubkey!("Po1RaS8BEDbNcn5oXsFryAeQ6Wn8fvmE111DJaKCgPC"); pub async fn cancel_escrow( client: &Client, a_initializer: Pubkey, @@ -170,4 +107,63 @@ pub mod escrow_instruction { .to_account_metas(None), } } + pub async fn initialize_escrow( + client: &Client, + i_initializer_amount: u64, + i_taker_amount: u64, + a_initializer: Pubkey, + a_initializer_deposit_token_account: Pubkey, + a_initializer_receive_token_account: Pubkey, + a_escrow_account: Pubkey, + a_system_program: Pubkey, + a_token_program: Pubkey, + signers: impl IntoIterator + Send + 'static, + ) -> Result { + client + .send_instruction( + PROGRAM_ID, + escrow::instruction::InitializeEscrow { + initializer_amount: i_initializer_amount, + taker_amount: i_taker_amount, + }, + escrow::accounts::InitializeEscrow { + initializer: a_initializer, + initializer_deposit_token_account: a_initializer_deposit_token_account, + initializer_receive_token_account: a_initializer_receive_token_account, + escrow_account: a_escrow_account, + system_program: a_system_program, + token_program: a_token_program, + }, + signers, + ) + .await + } + pub fn initialize_escrow_ix( + i_initializer_amount: u64, + i_taker_amount: u64, + a_initializer: Pubkey, + a_initializer_deposit_token_account: Pubkey, + a_initializer_receive_token_account: Pubkey, + a_escrow_account: Pubkey, + a_system_program: Pubkey, + a_token_program: Pubkey, + ) -> Instruction { + Instruction { + program_id: PROGRAM_ID, + data: escrow::instruction::InitializeEscrow { + initializer_amount: i_initializer_amount, + taker_amount: i_taker_amount, + } + .data(), + accounts: escrow::accounts::InitializeEscrow { + initializer: a_initializer, + initializer_deposit_token_account: a_initializer_deposit_token_account, + initializer_receive_token_account: a_initializer_receive_token_account, + escrow_account: a_escrow_account, + system_program: a_system_program, + token_program: a_token_program, + } + .to_account_metas(None), + } + } } diff --git a/examples/integration-tests/escrow/Anchor.toml b/examples/integration-tests/escrow/Anchor.toml index 58886066..bd98b325 100644 --- a/examples/integration-tests/escrow/Anchor.toml +++ b/examples/integration-tests/escrow/Anchor.toml @@ -1,5 +1,11 @@ +[toolchain] +anchor_version = "0.30.1" + [features] -seeds = false +resolution = true +skip-lint = false + + [programs.localnet] escrow = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS" diff --git a/examples/integration-tests/escrow/Cargo.lock b/examples/integration-tests/escrow/Cargo.lock index d4f78ab3..3a6637ce 100644 --- a/examples/integration-tests/escrow/Cargo.lock +++ b/examples/integration-tests/escrow/Cargo.lock @@ -14,9 +14,9 @@ dependencies = [ [[package]] name = "addr2line" -version = "0.21.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] @@ -27,6 +27,12 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "adler2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" + [[package]] name = "aead" version = "0.4.3" @@ -69,7 +75,7 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", ] @@ -81,7 +87,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" dependencies = [ "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "once_cell", "version_check", "zerocopy", @@ -96,6 +102,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -113,9 +125,9 @@ dependencies = [ [[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", @@ -125,9 +137,9 @@ dependencies = [ [[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.1", @@ -138,9 +150,9 @@ dependencies = [ [[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", @@ -149,9 +161,9 @@ dependencies = [ [[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", @@ -160,9 +172,9 @@ dependencies = [ [[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", @@ -172,20 +184,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -202,9 +220,9 @@ dependencies = [ [[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", @@ -213,9 +231,9 @@ dependencies = [ [[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", @@ -226,9 +244,9 @@ dependencies = [ [[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", @@ -237,9 +255,9 @@ dependencies = [ [[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", @@ -250,38 +268,66 @@ dependencies = [ "anchor-derive-accounts", "anchor-derive-serde", "anchor-derive-space", - "anchor-syn", + "anchor-lang-idl", "arrayref", - "base64 0.13.1", + "base64 0.21.7", "bincode", "borsh 0.10.3", "bytemuck", - "getrandom 0.2.14", + "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 0.3.3", + "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", - "solana-program", - "spl-associated-token-account", + "spl-associated-token-account 3.0.4", + "spl-pod 0.2.5", "spl-token", - "spl-token-2022 0.9.0", + "spl-token-2022 3.0.4", + "spl-token-group-interface 0.2.5", + "spl-token-metadata-interface 0.3.5", ] [[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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -318,9 +364,23 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.82" +version = "1.0.86" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b3d1d046238990b9cf5bcde22a3fb3584ee5cf65fb2765f454ed428c7a0063da" + +[[package]] +name = "aquamarine" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] [[package]] name = "arbitrary" @@ -372,7 +432,7 @@ dependencies = [ "derivative", "digest 0.10.7", "itertools", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "paste", "rustc_version", @@ -395,7 +455,7 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", @@ -424,7 +484,7 @@ dependencies = [ "ark-serialize-derive", "ark-std", "digest 0.10.7", - "num-bigint 0.4.4", + "num-bigint 0.4.6", ] [[package]] @@ -450,15 +510,15 @@ 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" -version = "0.7.4" +version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" +checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "ascii" @@ -524,9 +584,9 @@ dependencies = [ [[package]] name = "async-compression" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" +checksum = "fec134f64e2bc57411226dfc4e52dec859ddfc7e711fc5e07b612584f000e4aa" dependencies = [ "brotli", "flate2", @@ -547,13 +607,13 @@ dependencies = [ [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -569,21 +629,21 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.71" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", "cc", "cfg-if", "libc", - "miniz_oxide", + "miniz_oxide 0.7.4", "object", "rustc-demangle", ] @@ -629,9 +689,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.5.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" +checksum = "b048fb63fd8b5923fc5aa7b340d8e156aec7ec02f0c78fa8a6ddc2613f6f71de" dependencies = [ "serde", ] @@ -706,11 +766,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0901fc8eb0aca4c83be0106d6f2db17d86a08dfc2c25f0e84464bf381158add6" +checksum = "a6362ed55def622cddc70a4746a68554d7b687713770de539e59a739b249f8ed" dependencies = [ - "borsh-derive 1.4.0", + "borsh-derive 1.5.1", "cfg_aliases", ] @@ -742,15 +802,15 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.4.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51670c3aa053938b0ee3bd67c3817e471e626151131b934038e83c5bf8de48f5" +checksum = "c3ef8005764f53cd4dca619f5bf64cafd4664dada50ece25e4d81de54c80cc0b" dependencies = [ "once_cell", - "proc-macro-crate 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "syn_derive", ] @@ -800,9 +860,9 @@ dependencies = [ [[package]] name = "brotli" -version = "5.0.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19483b140a7ac7174d34b5a581b406c64f84da5409d3e09cf4fff604f9270e67" +checksum = "74f7971dbd9326d58187408ab83117d8ac1bb9c17b085fdacd1cf2f598719b6b" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -811,9 +871,9 @@ dependencies = [ [[package]] name = "brotli-decompressor" -version = "4.0.0" +version = "4.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6221fe77a248b9117d431ad93761222e1cf8ff282d9d1d5d9f53d6299a1cf76" +checksum = "9a45bd2e4095a8b518033b128020dd4a55aab1c0a381ba4404a472630f4bc362" dependencies = [ "alloc-no-stdlib", "alloc-stdlib", @@ -852,22 +912,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.15.0" +version = "1.17.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" +checksum = "773d90827bc3feecfb67fab12e24de0749aad83c74b9504ecde46237b5cd24e2" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" +checksum = "0cc8b54b395f2fcfbb3d90c47b01c7f444d94d05bdeb775811dec868ac3bbc26" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -878,15 +938,36 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" + +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] [[package]] name = "camino" -version = "1.1.6" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" +checksum = "8b96ec4966b5813e2c0507c1f86115c8c5abaadc3980879c3424042a02fd1ad3" dependencies = [ "serde", ] @@ -924,15 +1005,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.19", +] + [[package]] name = "cc" -version = "1.0.95" +version = "1.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" +checksum = "57b6a275aa2903740dc87da01c62040406b8812552e97129a63ea8850a17c6e6" dependencies = [ "jobserver", "libc", - "once_cell", + "shlex", ] [[package]] @@ -943,9 +1034,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "cfg_aliases" -version = "0.1.1" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" +checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" @@ -959,7 +1050,16 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "chrono-humanize" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" +dependencies = [ + "chrono", ] [[package]] @@ -1074,9 +1174,18 @@ checksum = "e4c78c047431fee22c1a7bb92e00ad095a02a983affe4d8a72e2a2c62c1b94f3" [[package]] name = "constant_time_eq" -version = "0.3.0" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" + +[[package]] +name = "convert_case" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] [[package]] name = "core-foundation" @@ -1090,33 +1199,33 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.6" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" +checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "cpufeatures" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] [[package]] name = "crc32fast" -version = "1.4.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" +checksum = "a97769d94ddab943e4510d138150169a2758b5ef3eb191a9ee688de3e23ef7b3" dependencies = [ "cfg-if", ] [[package]] name = "crossbeam-channel" -version = "0.5.12" +version = "0.5.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" +checksum = "33480d6946193aa8033910124896ca395333cae7e2d1113d1fef6c3272217df2" dependencies = [ "crossbeam-utils", ] @@ -1142,9 +1251,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.19" +version = "0.8.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" +checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" [[package]] name = "crunchy" @@ -1228,12 +1337,12 @@ dependencies = [ [[package]] name = "darling" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" +checksum = "6f63b86c8a8826a49b8c21f08a2d07338eec8d900540f8630dc76284be802989" dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", + "darling_core 0.20.10", + "darling_macro 0.20.10", ] [[package]] @@ -1252,16 +1361,16 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" +checksum = "95133861a8032aaea082871032f5815eb9e98cef03fa916ab4500513994df9e5" dependencies = [ "fnv", "ident_case", "proc-macro2", "quote", - "strsim 0.10.0", - "syn 2.0.60", + "strsim 0.11.1", + "syn 2.0.76", ] [[package]] @@ -1277,13 +1386,13 @@ dependencies = [ [[package]] name = "darling_macro" -version = "0.20.8" +version = "0.20.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" +checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ - "darling_core 0.20.8", + "darling_core 0.20.10", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1297,6 +1406,7 @@ dependencies = [ "lock_api", "once_cell", "parking_lot_core", + "rayon", ] [[package]] @@ -1323,7 +1433,7 @@ dependencies = [ "asn1-rs", "displaydoc", "nom", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "rusticata-macros", ] @@ -1362,7 +1472,7 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1377,6 +1487,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.9.0" @@ -1397,6 +1513,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "dir-diff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +dependencies = [ + "walkdir", +] + [[package]] name = "dirs" version = "5.0.1" @@ -1441,13 +1566,13 @@ dependencies = [ [[package]] name = "displaydoc" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "487585f4d0c6655fe74905e2504d8ad6908e4db67f744eb140876906c2f3175d" +checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1470,9 +1595,15 @@ checksum = "a6cbae11b3de8fce2a456e8ea3dada226b35fe791f0dc1d360c0941f0bb681f3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "eager" version = "0.1.0" @@ -1528,9 +1659,9 @@ dependencies = [ [[package]] name = "either" -version = "1.11.0" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" +checksum = "60b1af1c220855b6ceac025d3f6ecdd2b7c4894bfe9cd9bda4fbb4bc7c0d4cf0" [[package]] name = "encode_unicode" @@ -1564,13 +1695,13 @@ dependencies = [ [[package]] name = "enum-iterator-derive" -version = "1.3.1" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19cbb53d33b57ac4df1f0af6b92c38c107cded663c4aea9fae1189dcfc17cf5" +checksum = "a1ab991c1362ac86c61ab6f556cff143daa22e5a15e4e189df818b2fd19fe65b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1579,11 +1710,11 @@ version = "3.1.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1bf1fa3f06bbff1ea5b1a9c7b14aa992a39657db60a2759457328d7e058f49ee" dependencies = [ - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-traits", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1607,9 +1738,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "errno" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" +checksum = "534c5cf6194dfab3db3242765c03bbe257cf92f22b38f6bc0c58d59108a820ba" dependencies = [ "libc", "windows-sys 0.52.0", @@ -1631,9 +1762,9 @@ checksum = "0206175f82b8d6bf6652ff7d71a1e27fd2e4efde587fd368662814d6ec1d9ce0" [[package]] name = "fastrand" -version = "2.1.0" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" +checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" [[package]] name = "feature-probe" @@ -1661,14 +1792,35 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "filetime" +version = "0.2.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "35c0522e981e68cbfa8c3f978441a5f34b30b96e146b33cd3359176b50fe8586" +dependencies = [ + "cfg-if", + "libc", + "libredox", + "windows-sys 0.59.0", +] + [[package]] name = "flate2" -version = "1.0.29" +version = "1.0.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4556222738635b7a3417ae6130d8f52201e45a0c4d1a907f0826383adb5f85e7" +checksum = "324a1be68054ef05ad64b861cc9eaf1d623d2d8cb25b4bf2cb9cdd902b4bf253" dependencies = [ "crc32fast", - "miniz_oxide", + "miniz_oxide 0.8.0", +] + +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", ] [[package]] @@ -1686,6 +1838,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "futures" version = "0.3.30" @@ -1742,7 +1900,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -1817,9 +1975,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" +checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" dependencies = [ "cfg-if", "js-sys", @@ -1830,9 +1988,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.28.1" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -1863,10 +2021,10 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.2.6", + "indexmap 2.4.0", "slab", "tokio", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tracing", ] @@ -1893,6 +2051,9 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] [[package]] name = "hashbrown" @@ -1939,6 +2100,12 @@ version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" +[[package]] +name = "hermit-abi" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbf6a919d6cf397374f7dfeeea91d974c7c0a7221d0d0f4f20d859d329e53fcc" + [[package]] name = "histogram" version = "0.6.9" @@ -1975,6 +2142,18 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "honggfuzz" +version = "0.5.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505" +dependencies = [ + "arbitrary", + "lazy_static", + "memmap2 0.9.4", + "rustc_version", +] + [[package]] name = "http" version = "0.2.12" @@ -1999,9 +2178,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.8.0" +version = "1.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +checksum = "0fcc0b4a115bf80b728eb8ea024ad5bd707b615bfed49e0665b6e0f86fd082d9" [[package]] name = "httpdate" @@ -2017,9 +2196,9 @@ checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" [[package]] name = "hyper" -version = "0.14.28" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -2108,6 +2287,31 @@ dependencies = [ "version_check", ] +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "index_list" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" + [[package]] name = "indexmap" version = "1.9.3" @@ -2120,9 +2324,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.2.6" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -2143,9 +2347,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" +checksum = "e0242819d153cba4b4b05a5a8f2a7e9bbf97b6055b2a002b395c96b5ff3c0222" dependencies = [ "cfg-if", ] @@ -2158,11 +2362,11 @@ checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "is-terminal" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" +checksum = "261f68e344040fbd0edea105bef17c66edf46f984ddb1115b775ce31be948f4b" dependencies = [ - "hermit-abi 0.3.9", + "hermit-abi 0.4.0", "libc", "windows-sys 0.52.0", ] @@ -2184,18 +2388,18 @@ checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" [[package]] name = "jobserver" -version = "0.1.31" +version = "0.1.32" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" +checksum = "48d1dbcbbeb6a7fec7e059840aa538bd62aaccf972c7346c4d9d2059312853d0" dependencies = [ "libc", ] [[package]] name = "js-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" +checksum = "1868808506b929d7b0cfa8f75951347aa71bb21144b7791bae35d9bccfcfe37a" dependencies = [ "wasm-bindgen", ] @@ -2226,15 +2430,15 @@ dependencies = [ [[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.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libredox" @@ -2242,8 +2446,9 @@ version = "0.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "libc", + "redox_syscall", ] [[package]] @@ -2302,15 +2507,15 @@ checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" dependencies = [ "ark-bn254", "ark-ff", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "thiserror", ] [[package]] name = "linux-raw-sys" -version = "0.4.13" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" +checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89" [[package]] name = "lock_api" @@ -2324,15 +2529,44 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" + +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lz4" +version = "1.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +dependencies = [ + "cc", + "libc", +] [[package]] name = "memchr" -version = "2.7.2" +version = "2.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" +checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "memmap2" @@ -2343,6 +2577,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.7.1" @@ -2387,31 +2630,89 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.7.2" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ "adler", ] +[[package]] +name = "miniz_oxide" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +dependencies = [ + "adler2", +] + [[package]] name = "mio" -version = "0.8.11" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" +checksum = "80e04d1dcff3aae0704555fe5fee3bcfaf3d1fdf8a7e521d5b9d2b42acb52cec" dependencies = [ + "hermit-abi 0.3.9", "libc", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] -name = "nix" -version = "0.26.4" +name = "mockall" +version = "0.11.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" dependencies = [ - "bitflags 1.3.2", + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "nix" +version = "0.26.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" +dependencies = [ + "bitflags 1.3.2", "cfg-if", "libc", "memoffset 0.7.1", @@ -2428,6 +2729,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + [[package]] name = "num" version = "0.2.1" @@ -2455,11 +2762,10 @@ 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", ] @@ -2499,7 +2805,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2513,9 +2819,9 @@ dependencies = [ [[package]] name = "num-iter" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" +checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" dependencies = [ "autocfg", "num-integer", @@ -2536,9 +2842,9 @@ dependencies = [ [[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", ] @@ -2564,11 +2870,11 @@ dependencies = [ [[package]] name = "num_enum" -version = "0.7.2" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" +checksum = "4e613fc340b2220f734a8595782c551f1250e969d87d3be1ae0579e8d4065179" dependencies = [ - "num_enum_derive 0.7.2", + "num_enum_derive 0.7.3", ] [[package]] @@ -2580,19 +2886,19 @@ dependencies = [ "proc-macro-crate 1.3.1", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[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 3.1.0", + "proc-macro-crate 3.2.0", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2603,9 +2909,9 @@ checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" [[package]] name = "object" -version = "0.32.2" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -2668,11 +2974,34 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "parking_lot" -version = "0.12.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e4af0ca4f6caed20e900d564c242b8e5d4903fdacf31d3daf527b66fe6f42fb" +checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" dependencies = [ "lock_api", "parking_lot_core", @@ -2688,14 +3017,14 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] name = "paste" -version = "1.0.14" +version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" +checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "pathdiff" @@ -2762,7 +3091,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2825,9 +3154,9 @@ dependencies = [ [[package]] name = "portable-atomic" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" +checksum = "da544ee218f0d287a911e9c99a39a8c9bc8fcad3cb8db5959940044ecfc67265" [[package]] name = "powerfmt" @@ -2837,9 +3166,42 @@ 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 = "77957b295656769bb8ad2b6a6b09d897d94f05c41b069aede1fcdaa675eaea04" +dependencies = [ + "zerocopy", +] + +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" + +[[package]] +name = "predicates-tree" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +dependencies = [ + "predicates-core", + "termtree", +] [[package]] name = "pretty-hex" @@ -2867,7 +3229,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -2882,11 +3244,11 @@ dependencies = [ [[package]] name = "proc-macro-crate" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" +checksum = "8ecf48c7ca261d60b74ab1a7b20da18bede46776b2e55535cb958eb595c5fa7b" dependencies = [ - "toml_edit 0.21.1", + "toml_edit 0.22.20", ] [[package]] @@ -2898,6 +3260,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", + "syn 1.0.109", "version_check", ] @@ -2914,9 +3277,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.81" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" +checksum = "5e719e8df665df0d1c8fbfd238015744736151d4445ec0836b8e628aae103b77" dependencies = [ "unicode-ident", ] @@ -2946,7 +3309,7 @@ checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -2972,6 +3335,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ + "arbitrary", "bytes", "rand 0.8.5", "ring 0.16.20", @@ -2999,9 +3363,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.36" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" +checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" dependencies = [ "proc-macro2", ] @@ -3065,7 +3429,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", ] [[package]] @@ -3120,29 +3484,29 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", ] [[package]] name = "redox_users" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd283d9651eeda4b2a83a43c1c91b266c40fd76ecd39a50a8c630ae69dc72891" +checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" dependencies = [ - "getrandom 0.2.14", + "getrandom 0.2.15", "libredox", "thiserror", ] [[package]] name = "regex" -version = "1.10.4" +version = "1.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" +checksum = "4219d74c6b67a3654a9fbebc4b419e22126d13d2f3c4a07ee0cb61ff79a79619" dependencies = [ "aho-corasick", "memchr", @@ -3152,9 +3516,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" +checksum = "38caf58cc5ef2fed281f89292ef23f6365465ed9a41b7a7754eb4e26496c92df" dependencies = [ "aho-corasick", "memchr", @@ -3163,15 +3527,15 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" +checksum = "7a66a03ae7c801facd77a29370b4faec201768915ac14a721ba36f20bc9c209b" [[package]] name = "relative-path" -version = "1.9.2" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e898588f33fdd5b9420719948f9f2a32c922a246964576f71ba7f24f80610fbc" +checksum = "ba39f3699c378cd8970968dcbff9c43159ea4cfbd88d43c00b22f2ef10a435d2" [[package]] name = "reqwest" @@ -3206,7 +3570,7 @@ dependencies = [ "system-configuration", "tokio", "tokio-rustls", - "tokio-util 0.7.10", + "tokio-util 0.7.11", "tower-service", "url", "wasm-bindgen", @@ -3239,7 +3603,7 @@ checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" dependencies = [ "cc", "cfg-if", - "getrandom 0.2.14", + "getrandom 0.2.15", "libc", "spin 0.9.8", "untrusted 0.9.0", @@ -3282,7 +3646,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", "unicode-ident", ] @@ -3298,9 +3662,9 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.23" +version = "0.1.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" +checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" [[package]] name = "rustc-hash" @@ -3310,9 +3674,9 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" dependencies = [ "semver", ] @@ -3328,11 +3692,11 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.34" +version = "0.38.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" +checksum = "a85d50532239da68e9addb745ba38ff4612a242c1c7ceea689c4bc7c2f43c36f" dependencies = [ - "bitflags 2.5.0", + "bitflags 2.6.0", "errno", "libc", "linux-raw-sys", @@ -3384,15 +3748,24 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.15" +version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" +checksum = "955d28af4278de8121b7ebeb796b6a45735dc01436d898801014aced2773a3d6" [[package]] name = "ryu" -version = "1.0.17" +version = "1.0.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3cb5ba0dc43242ce17de99c180e96db90b235b8a9fdc9543c96d2209116bd9f" + +[[package]] +name = "same-file" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] [[package]] name = "schannel" @@ -3426,7 +3799,7 @@ checksum = "1db149f81d46d2deba7cd3c50772474707729550221e69588478ebf9ada425ae" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3441,11 +3814,11 @@ dependencies = [ [[package]] name = "security-framework" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "770452e37cad93e0a50d5abc3990d2bc351c36d0328f86cefec2f2fb206eaef6" +checksum = "897b2245f0b511c87893af39b033e5ca9cce68824c4d7e7630b5a1d339658d02" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.6.0", "core-foundation", "core-foundation-sys", "libc", @@ -3454,9 +3827,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.10.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f3cc463c0ef97e11c3461a9d3787412d30e8e7eb907c79180c4a57bf7c04ef" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -3464,53 +3837,72 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" +checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" dependencies = [ "serde", ] +[[package]] +name = "seqlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5c67b6f14ecc5b86c66fa63d76b5092352678545a8a3cdae80aef5128371910" +dependencies = [ + "parking_lot", +] + [[package]] name = "serde" -version = "1.0.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c9f6e76df036c77cd94996771fb40db98187f096dd0b9af39c6c6e452ba966a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" 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.199" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11bd257a6541e141e42ca6d24ae26f7714887b47e89aa739099104c7e4d3b7fc" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] name = "serde_json" -version = "1.0.116" +version = "1.0.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" +checksum = "8043c06d9f82bd7271361ed64f415fe5e12a77fdb52e573e7f06a516dea329ad" dependencies = [ "itoa", + "memchr", "ryu", "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3539,10 +3931,10 @@ version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" dependencies = [ - "darling 0.20.8", + "darling 0.20.10", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3551,7 +3943,7 @@ version = "0.9.34+deprecated" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "itoa", "ryu", "serde", @@ -3580,7 +3972,7 @@ checksum = "91d129178576168c589c9ec973feedf7d3126c01ac2bf08795109aa35b69fb8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -3664,6 +4056,12 @@ dependencies = [ "dirs", ] +[[package]] +name = "shlex" +version = "1.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" + [[package]] name = "signal-hook-registry" version = "1.4.2" @@ -3722,9 +4120,9 @@ dependencies = [ [[package]] name = "solana-account-decoder" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142161f13c328e7807fe98fb8f6eaaa5045a8eaf4492414aa81254870c4fc8a0" +checksum = "b4185d569c062983fc2a618ae4ee6fe1a139b36bce7a25045647c49bf0020a53" dependencies = [ "Inflector", "base64 0.21.7", @@ -3739,19 +4137,101 @@ dependencies = [ "solana-sdk", "spl-token", "spl-token-2022 1.0.0", - "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", "thiserror", "zstd", ] +[[package]] +name = "solana-accounts-db" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c156ddd42a2746e14fe267f85a2f802567dfa7c1702836b0ce69ea3be15a3c3" +dependencies = [ + "arrayref", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lz4", + "memmap2 0.5.10", + "modular-bitfield", + "num-derive 0.4.2", + "num-traits", + "num_cpus", + "num_enum 0.7.3", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "seqlock", + "serde", + "serde_derive", + "smallvec", + "solana-bucket-map", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-nohash-hasher", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", + "static_assertions", + "strum", + "strum_macros", + "tar", + "tempfile", + "thiserror", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7f5967c234aa8281f36999ded250403ddacb77863e2a1e157a3203884a13cfa" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.4.2", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + [[package]] name = "solana-banks-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4cbe27e78987b706caf90cbd16da9da3955c09a660b8107a96c2cb32f1124" +checksum = "d78204433cdb1945ef3622905f806423f5536cc91205dc8e325efe521394d3ca" dependencies = [ - "borsh 1.4.0", + "borsh 1.5.1", "futures", "solana-banks-interface", "solana-program", @@ -3764,20 +4244,40 @@ dependencies = [ [[package]] name = "solana-banks-interface" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "741279a09bf5ea1a3d17e591db7b189e163722e5c46423308c6a6165bea5e74d" +checksum = "f959539e11afaa554c0ae445bb3c726ad658aa33d8b577b76ab7e0ad6e313405" dependencies = [ "serde", "solana-sdk", "tarpc", ] +[[package]] +name = "solana-banks-server" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5224477dc90857c98bec8ff746926facf525e0216fdfbde51e28d92d5b11b236" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-accounts-db", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + [[package]] name = "solana-bpf-loader-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60e9dd5e42193260cca0794bf4ab9e248f44b3d9710041f241b130d26ed682bc" +checksum = "bfab3aa028e4feac760f28e7fb24760813d451e7cff5a13584509ddab4a94311" dependencies = [ "bincode", "byteorder", @@ -3792,11 +4292,29 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-bucket-map" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "06f781213cf76d8840e688d52fbc3876ae8522d2ac594c1c11ab9b982d7f0336" +dependencies = [ + "bv", + "bytemuck", + "log", + "memmap2 0.5.10", + "modular-bitfield", + "num_enum 0.7.3", + "rand 0.8.5", + "solana-measure", + "solana-sdk", + "tempfile", +] + [[package]] name = "solana-clap-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8e9f61034a61db538a41700b6df0b4b9f0392038adaf780150481923ff94356" +checksum = "c817832e71886dbea877d1aa911c9ce2e984a39081bb56ee30d4c835567827a6" dependencies = [ "chrono", "clap 2.34.0", @@ -3811,9 +4329,9 @@ dependencies = [ [[package]] name = "solana-cli-config" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c11246ea0930c3e95dc489d42f1020ea423a3daced137904d42ecc10a838436" +checksum = "7a3d0ab58e2a883f36082c736fec6e6d5872dc902c3b2cc960ed67d8eaf8994d" dependencies = [ "dirs-next", "lazy_static", @@ -3827,9 +4345,9 @@ dependencies = [ [[package]] name = "solana-cli-output" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea94deca7268b61a245429a7798f3e673baccb5cee5909e7de403b322d4c130a" +checksum = "a398964bb920e7606a8c4b2c01cb6d394ab9b5eb8a6f214fcdc7c5f90f470f36" dependencies = [ "Inflector", "base64 0.21.7", @@ -3854,16 +4372,16 @@ dependencies = [ [[package]] name = "solana-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13f2bd5a986d7cac1b4ffb4344413b70b6f21fd7ffa92a985911756b4ac7682a" +checksum = "7fa9cc6e8e59adf70acbf5cac21342ae8b5e41cbf05519fe5f6287e84ab40f63" dependencies = [ "async-trait", "bincode", "dashmap", "futures", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "quinn", @@ -3885,11 +4403,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-compute-budget-program" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b176bad40620d1c443365daf24e19fbfccafe8daff60eb3ddd6cbd9cf0fbec58" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + [[package]] name = "solana-config-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "970d28779e92a11e32a89ee453edc7d89394d3a68d8c4b75ef0ffb833944c588" +checksum = "d02fb29934427f1487d2149fe8bcb405306729b2f22a2ad616bb8ffd024cee7b" dependencies = [ "bincode", "chrono", @@ -3901,15 +4429,15 @@ dependencies = [ [[package]] name = "solana-connection-cache" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd7d0022ded19dca32ced5528c6a050596877fc8b9a89322d876960a89466e1b" +checksum = "d8e5a2e26448b3e04ce673794994ff27f3972ec8a806c224eccc02e09f751ca5" dependencies = [ "async-trait", "bincode", "crossbeam-channel", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "log", "rand 0.8.5", "rayon", @@ -3921,11 +4449,35 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-cost-model" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c4564996ef9f2983efeedb14a38315fa606d3d2cc0a2c8d899c507c5893fe79" +dependencies = [ + "lazy_static", + "log", + "rustc_version", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", +] + [[package]] name = "solana-frozen-abi" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35a0b24cc4d0ebd5fd45d6bd47bed3790f8a75ade67af8ff24a3d719a8bc93bc" +checksum = "20a6ef2db80dceb124b7bf81cca3300804bf427d2711973fc3df450ed7dfb26d" dependencies = [ "block-buffer 0.10.4", "bs58 0.4.0", @@ -3935,7 +4487,7 @@ dependencies = [ "im", "lazy_static", "log", - "memmap2", + "memmap2 0.5.10", "rustc_version", "serde", "serde_bytes", @@ -3948,21 +4500,34 @@ dependencies = [ [[package]] name = "solana-frozen-abi-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51600f4066d3663ab2981fd24e77a8c2e65f5d20ea71b550b853ca9ae40eee7f" +checksum = "70088de7d4067d19a7455609e2b393e6086bd847bb39c4d2bf234fc14827ef9e" dependencies = [ "proc-macro2", "quote", "rustc_version", - "syn 2.0.60", + "syn 2.0.76", +] + +[[package]] +name = "solana-loader-v4-program" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3fde1ab49eb031882f4803bf5a8008dca84356717e120ba9276d229ff24633c" +dependencies = [ + "log", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", ] [[package]] name = "solana-logger" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd79ef26804612173c95be8da84df3128d648173cf1f746de8f183ec8dbedd92" +checksum = "b129da15193f26db62d62ae6bb9f72361f361bcdc36054be3ab8bc04cc7a4f31" dependencies = [ "env_logger", "lazy_static", @@ -3971,9 +4536,9 @@ dependencies = [ [[package]] name = "solana-measure" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "300f716a5f1c2f4b562fb008a0cc7d7c0d889cff802a7f8177fdf28772ae1ed9" +checksum = "6d195b73093a4964ba6b5943418054a5fcbba23eafdd0842fd973fcceac1a967" dependencies = [ "log", "solana-sdk", @@ -3981,9 +4546,9 @@ dependencies = [ [[package]] name = "solana-metrics" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf1705d52e4f123856725e1b3842cd4928b954ff62391a95af142a5adc58ac6" +checksum = "fe7b06860ffbf4cf4714182e1b7eb00eb3ff0bcc9cff615d05e01e488923883c" dependencies = [ "crossbeam-channel", "gethostname", @@ -3996,9 +4561,9 @@ dependencies = [ [[package]] name = "solana-net-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f2634fd50743e2ca075e663e07b0bd5c2f94db0ac320ce5bc2022e0002d82d" +checksum = "9400b50b8439868a99b5fa2d961d74e37b7a6c1d5865759d0b1c906c2ad6b2a9" dependencies = [ "bincode", "clap 3.2.25", @@ -4016,11 +4581,17 @@ dependencies = [ "url", ] +[[package]] +name = "solana-nohash-hasher" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" + [[package]] name = "solana-perf" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0264d7093d44c239d9eb41beb6877b7b1eea5ad8809c93c1d9ab0c840ba390" +checksum = "b01a386e852df67031195094628851b8d239dd71fe17b721c3993277e68cb3ab" dependencies = [ "ahash 0.8.11", "bincode", @@ -4047,9 +4618,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a5513a02d622ba89e76baf4b49d25ae20c2c2c623fced12b0d6dd7b8f23e006" +checksum = "fb2b2c8babfae4cace1a25b6efa00418f3acd852cf55d7cecc0360d3c5050479" dependencies = [ "ark-bn254", "ark-ec", @@ -4057,11 +4628,11 @@ dependencies = [ "ark-serialize", "base64 0.21.7", "bincode", - "bitflags 2.5.0", + "bitflags 2.6.0", "blake3", "borsh 0.10.3", "borsh 0.9.3", - "borsh 1.4.0", + "borsh 1.5.1", "bs58 0.4.0", "bv", "bytemuck", @@ -4069,7 +4640,7 @@ dependencies = [ "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.2.14", + "getrandom 0.2.15", "itertools", "js-sys", "lazy_static", @@ -4078,7 +4649,7 @@ dependencies = [ "light-poseidon", "log", "memoffset 0.9.1", - "num-bigint 0.4.4", + "num-bigint 0.4.6", "num-derive 0.4.2", "num-traits", "parking_lot", @@ -4102,9 +4673,9 @@ dependencies = [ [[package]] name = "solana-program-runtime" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64dc9f666a8e4f93166ce58eea9dfbf275e5cad461b2f1bbfa06538718dc3212" +checksum = "0444f9440f4459d377c41470b2eb48b527def81f3052b7a121f6aa8c7350cc52" dependencies = [ "base64 0.21.7", "bincode", @@ -4129,14 +4700,44 @@ dependencies = [ ] [[package]] -name = "solana-pubsub-client" -version = "1.18.12" +name = "solana-program-test" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ffdcbdad685b87475a91909fdb442d2edfabc2870110580c7f0cf7eb7883f97" +checksum = "c76274336971f37dbbd3508aaaa4c98ca0061abd31fb309ad1c6ad132f0c6c0e" dependencies = [ - "crossbeam-channel", - "futures-util", - "log", + "assert_matches", + "async-trait", + "base64 0.21.7", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-accounts-db", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "solana_rbpf", + "test-case", + "thiserror", + "tokio", +] + +[[package]] +name = "solana-pubsub-client" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0ee4a39e41e789b6f100c97d9f40c1d08381bf6e3d0e351065e542091cddb039" +dependencies = [ + "crossbeam-channel", + "futures-util", + "log", "reqwest", "semver", "serde", @@ -4155,9 +4756,9 @@ dependencies = [ [[package]] name = "solana-quic-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056e909037b05097d2ff0181cb7e3d26876d8dff6d50701463a61e990cf84afd" +checksum = "baad755c76ee0aab8890f0ef873e61b8b3012c523d33bfa5b062fe9be8cef370" dependencies = [ "async-mutex", "async-trait", @@ -4182,9 +4783,9 @@ dependencies = [ [[package]] name = "solana-rayon-threadlimit" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e93a5e1ef891dca2cca907f7196b6a5d3b80af4183f2be0f981906b16711ff5d" +checksum = "c1c2a0ccb0be7ca79e8ff0d7c786bce586433a5687ffbea522453d0b41c4bf4a" dependencies = [ "lazy_static", "num_cpus", @@ -4192,9 +4793,9 @@ dependencies = [ [[package]] name = "solana-remote-wallet" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52c06eaf47d9a98ba22e890e68868f5d48c91e01268c541a53b5960288b617d6" +checksum = "3d042a812537e3507e1c163c7573fc04c96e12d3eba512e3fe74c7393229fa39" dependencies = [ "console", "dialoguer", @@ -4211,9 +4812,9 @@ dependencies = [ [[package]] name = "solana-rpc-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed1d4b6f1f4e3dab7509401e85edc1c1ac208c61819de90178e01cf162c9c051" +checksum = "3c6f5560283bd0a6833d1bd816299785058a870fff51b0df399fdb3ce92c8484" dependencies = [ "async-trait", "base64 0.21.7", @@ -4237,9 +4838,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-api" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31feddef24d3e0aab189571adea7f109639ef6179fcd3cd34ffc8c73d3409f1" +checksum = "2e4ca77f89caa9071acadb1eed19c28a6691fd63d0563ed927c96bf734cf1c9c" dependencies = [ "base64 0.21.7", "bs58 0.4.0", @@ -4259,9 +4860,9 @@ dependencies = [ [[package]] name = "solana-rpc-client-nonce-utils" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1837728262063723c659e4b8c0acf0baa99cd38cb333511456465d2c9e654474" +checksum = "42a6ea9ad81d63f18fb8b3a9b39643cc43eaf909199d67037e724562301d1df7" dependencies = [ "clap 2.34.0", "solana-clap-utils", @@ -4270,17 +4871,94 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-runtime" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d7c4b50b29b6f5938d2c9b151e9187d4687ca9c26be2c6ebe53ba34826283441" +dependencies = [ + "aquamarine", + "arrayref", + "base64 0.21.7", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2 0.5.10", + "mockall", + "modular-bitfield", + "num-derive 0.4.2", + "num-traits", + "num_cpus", + "num_enum 0.7.3", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "serde_json", + "solana-accounts-db", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-bucket-map", + "solana-compute-budget-program", + "solana-config-program", + "solana-cost-model", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-version", + "solana-vote", + "solana-vote-program", + "solana-zk-token-proof-program", + "solana-zk-token-sdk", + "static_assertions", + "strum", + "strum_macros", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + [[package]] name = "solana-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f50cac89269a01235f6b421bc580132191f4df388f4265513e78fd00cf864dd" +checksum = "b5e0f0def5c5af07f53d321cea7b104487b522cfff77c3cae3da361bfe956e9e" dependencies = [ "assert_matches", "base64 0.21.7", "bincode", - "bitflags 2.5.0", - "borsh 1.4.0", + "bitflags 2.6.0", + "borsh 1.5.1", "bs58 0.4.0", "bytemuck", "byteorder", @@ -4296,10 +4974,10 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "memmap2", + "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "pbkdf2 0.11.0", "qstring", "qualifier_attr", @@ -4327,15 +5005,15 @@ dependencies = [ [[package]] name = "solana-sdk-macro" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cb099b2f9c0a65a6f23ced791325141cd68c27b04d11c04fef838a00f613861" +checksum = "c55c196c8050834c391a34b58e3c9fd86b15452ef1feeeafa1dbeb9d2291dfec" dependencies = [ "bs58 0.4.0", "proc-macro2", "quote", "rustversion", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4344,18 +5022,49 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" +[[package]] +name = "solana-send-transaction-service" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f7c5fc9df712efd671a5a5b68e58a448dc13b70f59ef16bdd0e8d644813eb67a" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624f6d0c84c19a17bf882259303e99e1ed2562a0316c989f847a067aa99d4940" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + [[package]] name = "solana-streamer" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a20843e8370adb3c04f47caa79ffdc92ae1bf078ad26530be1bca5d7bdd5d2" +checksum = "749720d82c5f31f7ec326da1e0baac098201de70f0874719172a55309433b449" dependencies = [ "async-channel", "bytes", "crossbeam-channel", "futures-util", "histogram", - "indexmap 2.2.6", + "indexmap 2.4.0", "itertools", "libc", "log", @@ -4379,9 +5088,9 @@ dependencies = [ [[package]] name = "solana-system-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01294e45b407b7d4c8ff546af6f60344efd6591cf162c88e231ee3ba2c544672" +checksum = "5a449f40a516a8e83dcc2ce07643bb3feec4da690f170d438849af06c503cc28" dependencies = [ "bincode", "log", @@ -4393,9 +5102,9 @@ dependencies = [ [[package]] name = "solana-thin-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c74da8f36b89b28c47e5ba3bad5279ff3dfea5829154882845d4821fc76ff497" +checksum = "84535de1253afb6ccc4ae6852eb013ca734c439a902ec5e4684b90ed649a37c2" dependencies = [ "bincode", "log", @@ -4408,14 +5117,14 @@ dependencies = [ [[package]] name = "solana-tpu-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f2fd4b4aeffa14b9c5be9913072ea8e72ca261254a65a999f3d2fd70e7a660" +checksum = "3ff514462bb715aaea9bc5c0ee60f83ab3f91e04279337c6b07d054153b616dc" dependencies = [ "async-trait", "bincode", "futures-util", - "indexmap 2.2.6", + "indexmap 2.4.0", "indicatif", "log", "rayon", @@ -4432,9 +5141,9 @@ dependencies = [ [[package]] name = "solana-transaction-status" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3efa0d30f78dbc74e795638b053dd6ec7230739301e7f0e06b586f7731fd25c8" +checksum = "670e387049812d42bdc8fcc4ff75452ff3cb00657af979a90f55f6d37dba9dd9" dependencies = [ "Inflector", "base64 0.21.7", @@ -4448,7 +5157,7 @@ dependencies = [ "serde_json", "solana-account-decoder", "solana-sdk", - "spl-associated-token-account", + "spl-associated-token-account 2.3.0", "spl-memo", "spl-token", "spl-token-2022 1.0.0", @@ -4457,9 +5166,9 @@ dependencies = [ [[package]] name = "solana-udp-client" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32af58cadd37be19d04e0f3877104b8640bccc4be8ca1dbf431549b399b784c2" +checksum = "11183dae826f942ebd0401712c8a52367a4a6312f1cd325f304cd9551226fc8b" dependencies = [ "async-trait", "solana-connection-cache", @@ -4472,9 +5181,9 @@ dependencies = [ [[package]] name = "solana-version" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42c7cef8aa9f1c633bf09dd91b8e635b6b30c40236652031b1800b245dc1bd02" +checksum = "8e8d518e61ce22c812df23d9c61ab9bcbef4df3e3d3dcaa74a999625f11bcf07" dependencies = [ "log", "rustc_version", @@ -4486,11 +5195,30 @@ dependencies = [ "solana-sdk", ] +[[package]] +name = "solana-vote" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ae2a4908ac4df02a4adb78f09fe938b31c75f42ba64401b8ac88193eb446943" +dependencies = [ + "crossbeam-channel", + "itertools", + "log", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", + "solana-vote-program", + "thiserror", +] + [[package]] name = "solana-vote-program" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "725a39044d455c08fe83fca758e94e5ddfaa25f6e2e2cfd5c31d7afdcad8de38" +checksum = "5743503143fb2259c41a973a78e9aeeb8e21f1b03543c3bb85449926ea692719" dependencies = [ "bincode", "log", @@ -4508,11 +5236,25 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-zk-token-proof-program" +version = "1.18.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5813dc267bea898ff40d3bd662a0a7659170dd19ae5e7c46e8dc0a414a205868" +dependencies = [ + "bytemuck", + "num-derive 0.4.2", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + [[package]] name = "solana-zk-token-sdk" -version = "1.18.12" +version = "1.18.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "630dc0b5f6250cf6a4c8b2bd3895283738915e83eba5453db20bb02b2527f302" +checksum = "57ee07fa523b4cfcff68de774db7aa87d2da2c4357155a90bacd9a0a0af70a99" dependencies = [ "aes-gcm-siv", "base64 0.21.7", @@ -4539,9 +5281,9 @@ dependencies = [ [[package]] name = "solana_rbpf" -version = "0.8.0" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d457cc2ba742c120492a64b7fa60e22c575e891f6b55039f4d736568fb112a3" +checksum = "da5d083187e3b3f453e140f292c09186881da8a02a7b5e27f645ee26de3d9cc5" dependencies = [ "byteorder", "combine", @@ -4594,15 +5336,42 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-associated-token-account" +version = "3.0.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "143109d789171379e6143ef23191786dfaac54289ad6e7917cfb26b36c432b10" +dependencies = [ + "assert_matches", + "borsh 1.5.1", + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-token", + "spl-token-2022 3.0.4", + "thiserror", +] + [[package]] name = "spl-discriminator" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daa600f2fe56f32e923261719bae640d873edadbc5237681a39b8e37bfd4d263" +checksum = "cce5d563b58ef1bb2cdbbfe0dfb9ffdc24903b10ae6a4df2d8f425ece375033f" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator-derive", + "spl-discriminator-derive 0.1.2", +] + +[[package]] +name = "spl-discriminator" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "210101376962bb22bb13be6daea34656ea1cbc248fce2164b146e39203b55e03" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator-derive 0.2.0", ] [[package]] @@ -4612,8 +5381,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07fd7858fc4ff8fb0e34090e41d7eb06a823e1057945c26d480bfc21d2338a93" dependencies = [ "quote", - "spl-discriminator-syn", - "syn 2.0.60", + "spl-discriminator-syn 0.1.2", + "syn 2.0.76", +] + +[[package]] +name = "spl-discriminator-derive" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" +dependencies = [ + "quote", + "spl-discriminator-syn 0.2.0", + "syn 2.0.76", ] [[package]] @@ -4625,7 +5405,20 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", + "thiserror", +] + +[[package]] +name = "spl-discriminator-syn" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c1f05593b7ca9eac7caca309720f2eafb96355e037e6d373b909a80fe7b69b9" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.76", "thiserror", ] @@ -4640,27 +5433,53 @@ dependencies = [ [[package]] name = "spl-pod" -version = "0.1.1" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85a5db7e4efb1107b0b8e52a13f035437cdcb36ef99c58f6d467f089d9b2915a" +checksum = "2881dddfca792737c0706fa0175345ab282b1b0879c7d877bad129645737c079" dependencies = [ "borsh 0.10.3", "bytemuck", "solana-program", "solana-zk-token-sdk", - "spl-program-error", + "spl-program-error 0.3.0", +] + +[[package]] +name = "spl-pod" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c52d84c55efeef8edcc226743dc089d7e3888b8e3474569aa3eff152b37b9996" +dependencies = [ + "borsh 1.5.1", + "bytemuck", + "solana-program", + "solana-zk-token-sdk", + "spl-program-error 0.4.4", ] [[package]] name = "spl-program-error" -version = "0.3.1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "249e0318493b6bcf27ae9902600566c689b7dfba9f1bdff5893e92253374e78c" +dependencies = [ + "num-derive 0.4.2", + "num-traits", + "solana-program", + "spl-program-error-derive 0.3.2", + "thiserror", +] + +[[package]] +name = "spl-program-error" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0657b6490196971d9e729520ba934911ff41fbb2cb9004463dbe23cf8b4b4f" +checksum = "e45a49acb925db68aa501b926096b2164adbdcade7a0c24152af9f0742d0a602" dependencies = [ "num-derive 0.4.2", "num-traits", "solana-program", - "spl-program-error-derive", + "spl-program-error-derive 0.4.1", "thiserror", ] @@ -4673,35 +5492,47 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.60", + "syn 2.0.76", +] + +[[package]] +name = "spl-program-error-derive" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +dependencies = [ + "proc-macro2", + "quote", + "sha2 0.10.8", + "syn 2.0.76", ] [[package]] name = "spl-tlv-account-resolution" -version = "0.4.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "062e148d3eab7b165582757453632ffeef490c02c86a48bfdb4988f63eefb3b9" +checksum = "615d381f48ddd2bb3c57c7f7fb207591a2a05054639b18a62e785117dd7a8683" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", + "spl-type-length-value 0.3.0", ] [[package]] name = "spl-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", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", + "spl-type-length-value 0.4.6", ] [[package]] @@ -4721,47 +5552,49 @@ dependencies = [ [[package]] name = "spl-token-2022" -version = "0.9.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" +checksum = "d697fac19fd74ff472dfcc13f0b442dd71403178ce1de7b5d16f83a33561c059" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", + "solana-security-txt", "solana-zk-token-sdk", "spl-memo", - "spl-pod", + "spl-pod 0.1.0", "spl-token", - "spl-token-metadata-interface", - "spl-transfer-hook-interface 0.3.0", - "spl-type-length-value", + "spl-token-group-interface 0.1.0", + "spl-token-metadata-interface 0.2.0", + "spl-transfer-hook-interface 0.4.1", + "spl-type-length-value 0.3.0", "thiserror", ] [[package]] name = "spl-token-2022" -version = "1.0.0" +version = "3.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d697fac19fd74ff472dfcc13f0b442dd71403178ce1de7b5d16f83a33561c059" +checksum = "b01d1b2851964e257187c0bca43a0de38d0af59192479ca01ac3e2b58b1bd95a" dependencies = [ "arrayref", "bytemuck", "num-derive 0.4.2", "num-traits", - "num_enum 0.7.2", + "num_enum 0.7.3", "solana-program", "solana-security-txt", "solana-zk-token-sdk", "spl-memo", - "spl-pod", + "spl-pod 0.2.5", "spl-token", - "spl-token-group-interface", - "spl-token-metadata-interface", - "spl-transfer-hook-interface 0.4.1", - "spl-type-length-value", + "spl-token-group-interface 0.2.5", + "spl-token-metadata-interface 0.3.5", + "spl-transfer-hook-interface 0.6.5", + "spl-type-length-value 0.4.6", "thiserror", ] @@ -4773,9 +5606,22 @@ checksum = "b889509d49fa74a4a033ca5dae6c2307e9e918122d97e58562f5c4ffa795c75d" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", +] + +[[package]] +name = "spl-token-group-interface" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "014817d6324b1e20c4bbc883e8ee30a5faa13e59d91d1b2b95df98b920150c17" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", ] [[package]] @@ -4786,55 +5632,82 @@ checksum = "4c16ce3ba6979645fb7627aa1e435576172dd63088dc7848cb09aa331fa1fe4f" dependencies = [ "borsh 0.10.3", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-type-length-value", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", + "spl-type-length-value 0.3.0", +] + +[[package]] +name = "spl-token-metadata-interface" +version = "0.3.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f3da00495b602ebcf5d8ba8b3ecff1ee454ce4c125c9077747be49c2d62335ba" +dependencies = [ + "borsh 1.5.1", + "solana-program", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", + "spl-type-length-value 0.4.6", ] [[package]] name = "spl-transfer-hook-interface" -version = "0.3.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "051d31803f873cabe71aec3c1b849f35248beae5d19a347d93a5c9cccc5d5a9b" +checksum = "7aabdb7c471566f6ddcee724beb8618449ea24b399e58d464d6b5bc7db550259" dependencies = [ "arrayref", "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution 0.4.0", - "spl-type-length-value", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", + "spl-tlv-account-resolution 0.5.1", + "spl-type-length-value 0.3.0", ] [[package]] name = "spl-transfer-hook-interface" -version = "0.4.1" +version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7aabdb7c471566f6ddcee724beb8618449ea24b399e58d464d6b5bc7db550259" +checksum = "a9b5c08a89838e5a2931f79b17f611857f281a14a2100968a3ccef352cb7414b" dependencies = [ "arrayref", "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", - "spl-tlv-account-resolution 0.5.2", - "spl-type-length-value", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", + "spl-tlv-account-resolution 0.6.5", + "spl-type-length-value 0.4.6", ] [[package]] name = "spl-type-length-value" -version = "0.3.1" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a468e6f6371f9c69aae760186ea9f1a01c2908351b06a5e0026d21cfc4d7ecac" +dependencies = [ + "bytemuck", + "solana-program", + "spl-discriminator 0.1.0", + "spl-pod 0.1.0", + "spl-program-error 0.3.0", +] + +[[package]] +name = "spl-type-length-value" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f9ebd75d29c5f48de5f6a9c114e08531030b75b8ac2c557600ac7da0b73b1e8" +checksum = "c872f93d0600e743116501eba2d53460e73a12c9a496875a42a7d70e034fe06d" dependencies = [ "bytemuck", "solana-program", - "spl-discriminator", - "spl-pod", - "spl-program-error", + "spl-discriminator 0.2.5", + "spl-pod 0.2.5", + "spl-program-error 0.4.4", ] [[package]] @@ -4855,12 +5728,46 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strsim" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" + +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + [[package]] name = "syn" version = "1.0.109" @@ -4874,9 +5781,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.60" +version = "2.0.76" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" +checksum = "578e081a14e0cefc3279b0472138c513f37b41a08d5a3cca9b6e4e8ceb6cd525" dependencies = [ "proc-macro2", "quote", @@ -4892,7 +5799,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -4934,6 +5841,17 @@ dependencies = [ "libc", ] +[[package]] +name = "tar" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "tarpc" version = "0.29.0" @@ -4971,14 +5889,15 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.10.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" +checksum = "04cbcdd0c794ebb0d4cf35e88edd2f7d2c4c3e9a5a6dab322839b321c6a87a64" dependencies = [ "cfg-if", "fastrand", + "once_cell", "rustix", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5001,6 +5920,45 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "test-case" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" +dependencies = [ + "test-case-macros", +] + +[[package]] +name = "test-case-core" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.76", +] + +[[package]] +name = "test-case-macros" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.76", + "test-case-core", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -5018,22 +5976,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.59" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5098,9 +6056,9 @@ 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", ] @@ -5113,32 +6071,31 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.37.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", "libc", "mio", - "num_cpus", "parking_lot", "pin-project-lite", "signal-hook-registry", "socket2", "tokio-macros", - "windows-sys 0.48.0", + "windows-sys 0.52.0", ] [[package]] name = "tokio-macros" -version = "2.2.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" +checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5210,16 +6167,15 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.10" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", "futures-sink", "pin-project-lite", "tokio", - "tracing", ] [[package]] @@ -5232,11 +6188,26 @@ 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.5" +version = "0.6.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5244,27 +6215,29 @@ version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] name = "toml_edit" -version = "0.21.1" +version = "0.22.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" +checksum = "583c44c02ad26b0c3f3066fe629275e50627026c51ac2e595cca4c230ce1ce1d" dependencies = [ - "indexmap 2.2.6", + "indexmap 2.4.0", + "serde", + "serde_spanned", "toml_datetime", - "winnow", + "winnow 0.6.18", ] [[package]] name = "tower-service" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" +checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" @@ -5286,7 +6259,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5325,29 +6298,29 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", - "anchor-spl", + "anchor-lang-idl-spec", "anchor-syn", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", "heck 0.4.1", + "honggfuzz", "indicatif", - "lazy_static", "log", "pathdiff", - "prettytable", "proc-macro2", + "quinn-proto", "quote", - "rand 0.8.5", "regex", "rstest", "serde", @@ -5355,29 +6328,38 @@ dependencies = [ "serial_test", "shellexpand", "solana-account-decoder", - "solana-banks-client", - "solana-bpf-loader-program", "solana-cli-output", - "solana-program", + "solana-program-test", "solana-sdk", - "solana-sdk-macro", - "solana-system-program", "solana-transaction-status", - "spl-associated-token-account", + "spl-associated-token-account 2.3.0", "spl-token", "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", + "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", + "trident-fuzz", "trident-test", ] [[package]] -name = "trident-derive-displayix" +name = "trident-derive-accounts-snapshots" version = "0.0.1" +dependencies = [ + "anchor-syn", + "convert_case", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "trident-derive-displayix" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -5386,7 +6368,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -5395,19 +6377,37 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "trident-fuzz" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "arbitrary", + "prettytable", + "regex", + "serde", + "serde_json", + "solana-banks-client", + "solana-program-runtime", + "solana-program-test", + "solana-sdk", + "spl-token", + "thiserror", + "tokio", +] + [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", - "proc-macro2", "quote", "syn 1.0.109", ] @@ -5474,15 +6474,15 @@ checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.12" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f5e5f3158ecfd4b8ff6fe086db7c8467a2dfdac97fe420f2b7c4aa97af66d6" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.4" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "universal-hash" @@ -5533,9 +6533,9 @@ dependencies = [ [[package]] name = "url" -version = "2.5.0" +version = "2.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" +checksum = "22784dbdf76fdde8af1aeda5622b546b422b6fc585325248a2bf9f5e41e94d6c" dependencies = [ "form_urlencoded", "idna", @@ -5562,9 +6562,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[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 = "void" @@ -5572,6 +6572,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -5595,34 +6605,35 @@ checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" [[package]] name = "wasm-bindgen" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" +checksum = "a82edfc16a6c469f5f44dc7b571814045d60404b55a0ee849f9bcfa2e63dd9b5" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" +checksum = "9de396da306523044d3302746f1208fa71d7532227f15e347e2d93e4145dd77b" dependencies = [ "bumpalo", "log", "once_cell", "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-futures" -version = "0.4.42" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" +checksum = "61e9300f63a621e96ed275155c108eb6f843b6a26d053f122ab69724559dc8ed" dependencies = [ "cfg-if", "js-sys", @@ -5632,9 +6643,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" +checksum = "585c4c91a46b072c92e908d99cb1dcdf95c5218eeb6f3bf1efa991ee7a68cccf" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -5642,28 +6653,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" +checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.92" +version = "0.2.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" +checksum = "c62a0a307cb4a311d3a07867860911ca130c3494e8c2719593806c08bc5d0484" [[package]] name = "web-sys" -version = "0.3.69" +version = "0.3.70" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" +checksum = "26fdeaafd9bd129f65e7c031593c24d62186301e0c72c8978fa1678be7d532c0" dependencies = [ "js-sys", "wasm-bindgen", @@ -5702,11 +6713,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d4cc384e1e73b93bafa6fb4f1df8c41695c8a91cf9c4c64358067d15a7b6c6b" +checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -5721,7 +6732,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -5739,7 +6750,16 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.59.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" +dependencies = [ + "windows-targets 0.52.6", ] [[package]] @@ -5759,18 +6779,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", ] [[package]] @@ -5781,9 +6801,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -5793,9 +6813,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -5805,15 +6825,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -5823,9 +6843,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -5835,9 +6855,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -5847,9 +6867,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -5859,9 +6879,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -5872,6 +6892,15 @@ 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 = "winreg" version = "0.50.0" @@ -5900,6 +6929,17 @@ dependencies = [ "time", ] +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + [[package]] name = "yasna" version = "0.5.2" @@ -5911,22 +6951,23 @@ dependencies = [ [[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.60", + "syn 2.0.76", ] [[package]] @@ -5946,7 +6987,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.60", + "syn 2.0.76", ] [[package]] @@ -5970,9 +7011,9 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.10+zstd.1.5.6" +version = "2.0.13+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" +checksum = "38ff0f21cfee8f97d94cef41359e0c89aa6113028ab0291aa8ca0038995a95aa" dependencies = [ "cc", "pkg-config", diff --git a/examples/integration-tests/escrow/programs/escrow/Cargo.toml b/examples/integration-tests/escrow/programs/escrow/Cargo.toml index f28fe9d4..86f1a340 100644 --- a/examples/integration-tests/escrow/programs/escrow/Cargo.toml +++ b/examples/integration-tests/escrow/programs/escrow/Cargo.toml @@ -9,12 +9,13 @@ crate-type = ["cdylib", "lib"] name = "escrow" [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] -anchor-lang = "0.29.0" -anchor-spl = "0.29.0" +anchor-lang = "0.30.1" +anchor-spl = "0.30.1" diff --git a/examples/integration-tests/escrow/trident-tests/poc_tests/Cargo.toml b/examples/integration-tests/escrow/trident-tests/poc_tests/Cargo.toml index 9f83b271..5f62568a 100644 --- a/examples/integration-tests/escrow/trident-tests/poc_tests/Cargo.toml +++ b/examples/integration-tests/escrow/trident-tests/poc_tests/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" [dev-dependencies] fehler = "1.0.0" -anchor-spl = "0.29.0" +anchor-spl = "0.30.1" [dev-dependencies.trident-client] path = "../../../../../crates/client" diff --git a/examples/integration-tests/turnstile/.program_client/src/lib.rs b/examples/integration-tests/turnstile/.program_client/src/lib.rs index db57dde3..805a5c9f 100644 --- a/examples/integration-tests/turnstile/.program_client/src/lib.rs +++ b/examples/integration-tests/turnstile/.program_client/src/lib.rs @@ -2,68 +2,64 @@ pub mod turnstile_instruction { use trident_client::prelude::*; use trident_client::test::*; - pub static PROGRAM_ID: Pubkey = Pubkey::new_from_array([ - 5u8, 214u8, 204u8, 101u8, 166u8, 163u8, 239u8, 244u8, 13u8, 110u8, 64u8, 106u8, 230u8, - 81u8, 141u8, 186u8, 208u8, 155u8, 78u8, 83u8, 194u8, 215u8, 103u8, 17u8, 94u8, 15u8, 137u8, - 68u8, 170u8, 153u8, 74u8, 59u8, - ]); - pub async fn initialize( + pub const PROGRAM_ID: Pubkey = pubkey!("Po1RaS8BEDbNcn5oXsFryAeQ6Wn8fvmE111DJaKCgPC"); + pub async fn coin( client: &Client, + i_dummy_arg: String, a_state: Pubkey, - a_user: Pubkey, - a_system_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { client .send_instruction( PROGRAM_ID, - turnstile::instruction::Initialize {}, - turnstile::accounts::Initialize { - state: a_state, - user: a_user, - system_program: a_system_program, + turnstile::instruction::Coin { + dummy_arg: i_dummy_arg, }, + turnstile::accounts::UpdateState { state: a_state }, signers, ) .await } - pub fn initialize_ix(a_state: Pubkey, a_user: Pubkey, a_system_program: Pubkey) -> Instruction { + pub fn coin_ix(i_dummy_arg: String, a_state: Pubkey) -> Instruction { Instruction { program_id: PROGRAM_ID, - data: turnstile::instruction::Initialize {}.data(), - accounts: turnstile::accounts::Initialize { - state: a_state, - user: a_user, - system_program: a_system_program, + data: turnstile::instruction::Coin { + dummy_arg: i_dummy_arg, } - .to_account_metas(None), + .data(), + accounts: turnstile::accounts::UpdateState { state: a_state }.to_account_metas(None), } } - pub async fn coin( + pub async fn initialize( client: &Client, - i_dummy_arg: String, a_state: Pubkey, + a_user: Pubkey, + a_system_program: Pubkey, signers: impl IntoIterator + Send + 'static, ) -> Result { client .send_instruction( PROGRAM_ID, - turnstile::instruction::Coin { - dummy_arg: i_dummy_arg, + turnstile::instruction::Initialize {}, + turnstile::accounts::Initialize { + state: a_state, + user: a_user, + system_program: a_system_program, }, - turnstile::accounts::UpdateState { state: a_state }, signers, ) .await } - pub fn coin_ix(i_dummy_arg: String, a_state: Pubkey) -> Instruction { + pub fn initialize_ix(a_state: Pubkey, a_user: Pubkey, a_system_program: Pubkey) -> Instruction { Instruction { program_id: PROGRAM_ID, - data: turnstile::instruction::Coin { - dummy_arg: i_dummy_arg, + data: turnstile::instruction::Initialize {}.data(), + accounts: turnstile::accounts::Initialize { + state: a_state, + user: a_user, + system_program: a_system_program, } - .data(), - accounts: turnstile::accounts::UpdateState { state: a_state }.to_account_metas(None), + .to_account_metas(None), } } pub async fn push( diff --git a/examples/integration-tests/turnstile/Anchor.toml b/examples/integration-tests/turnstile/Anchor.toml index b8848811..917146f3 100644 --- a/examples/integration-tests/turnstile/Anchor.toml +++ b/examples/integration-tests/turnstile/Anchor.toml @@ -1,3 +1,10 @@ +[toolchain] +anchor_version = "0.30.1" + +[features] +resolution = true +skip-lint = false + [programs.localnet] turnstile = "Cn1Xg8FR4fnXH9GEgNcYrCoAYnHV7izyJBUBTuamanLS" diff --git a/examples/integration-tests/turnstile/Cargo.lock b/examples/integration-tests/turnstile/Cargo.lock index 765c78be..b675ee8e 100644 --- a/examples/integration-tests/turnstile/Cargo.lock +++ b/examples/integration-tests/turnstile/Cargo.lock @@ -96,6 +96,12 @@ dependencies = [ "memchr", ] +[[package]] +name = "aliasable" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "250f629c0161ad8107cf89319e990051fae62832fd343083bea452d93e2205fd" + [[package]] name = "alloc-no-stdlib" version = "2.0.4" @@ -113,9 +119,9 @@ dependencies = [ [[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", @@ -125,9 +131,9 @@ dependencies = [ [[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.1", @@ -138,9 +144,9 @@ dependencies = [ [[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", @@ -149,9 +155,9 @@ dependencies = [ [[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", @@ -160,9 +166,9 @@ dependencies = [ [[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", @@ -172,20 +178,26 @@ dependencies = [ [[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 0.3.3", + "proc-macro2", "quote", + "serde_json", "syn 1.0.109", ] [[package]] name = "anchor-client" -version = "0.29.0" +version = "0.30.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb48c4a7911038da546dc752655a29fa49f6bd50ebc1edca218bac8da1012acd" +checksum = "95b4397af9b7d6919df3342210d897c0ffda1a31d052abc8eee3e6035ee71567" dependencies = [ "anchor-lang", "anyhow", @@ -202,9 +214,9 @@ dependencies = [ [[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", @@ -213,9 +225,9 @@ dependencies = [ [[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", @@ -226,9 +238,9 @@ dependencies = [ [[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", @@ -237,9 +249,9 @@ dependencies = [ [[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", @@ -250,9 +262,9 @@ dependencies = [ "anchor-derive-accounts", "anchor-derive-serde", "anchor-derive-space", - "anchor-syn", + "anchor-lang-idl", "arrayref", - "base64 0.13.1", + "base64 0.21.7", "bincode", "borsh 0.10.3", "bytemuck", @@ -262,26 +274,39 @@ dependencies = [ ] [[package]] -name = "anchor-spl" -version = "0.29.0" +name = "anchor-lang-idl" +version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c4fd6e43b2ca6220d2ef1641539e678bfc31b6cc393cf892b373b5997b6a39a" +checksum = "31cf97b4e6f7d6144a05e435660fcf757dbc3446d38d0e2b851d11ed13625bba" dependencies = [ - "anchor-lang", - "solana-program", - "spl-associated-token-account", - "spl-token", - "spl-token-2022 0.9.0", + "anchor-lang-idl-spec", + "anyhow", + "heck 0.3.3", + "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-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.1", + "cargo_toml", "heck 0.3.3", "proc-macro2", "quote", @@ -322,6 +347,20 @@ version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" +[[package]] +name = "aquamarine" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1da02abba9f9063d786eab1509833ebb2fac0f966862ca59439c76b9c566760" +dependencies = [ + "include_dir", + "itertools", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "arbitrary" version = "1.3.2" @@ -882,6 +921,27 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +[[package]] +name = "bzip2" +version = "0.4.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" +dependencies = [ + "bzip2-sys", + "libc", +] + +[[package]] +name = "bzip2-sys" +version = "0.1.11+1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "camino" version = "1.1.6" @@ -924,6 +984,16 @@ dependencies = [ "thiserror", ] +[[package]] +name = "cargo_toml" +version = "0.19.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" +dependencies = [ + "serde", + "toml 0.8.12", +] + [[package]] name = "cc" version = "1.0.95" @@ -962,6 +1032,15 @@ dependencies = [ "windows-targets 0.52.5", ] +[[package]] +name = "chrono-humanize" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" +dependencies = [ + "chrono", +] + [[package]] name = "cipher" version = "0.3.0" @@ -1078,6 +1157,15 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" +[[package]] +name = "convert_case" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" +dependencies = [ + "unicode-segmentation", +] + [[package]] name = "core-foundation" version = "0.9.4" @@ -1297,6 +1385,7 @@ dependencies = [ "lock_api", "once_cell", "parking_lot_core", + "rayon", ] [[package]] @@ -1377,6 +1466,12 @@ dependencies = [ "zeroize", ] +[[package]] +name = "difflib" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" + [[package]] name = "digest" version = "0.9.0" @@ -1397,6 +1492,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "dir-diff" +version = "0.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7ad16bf5f84253b50d6557681c58c3ab67c47c77d39fed9aeb56e947290bd10" +dependencies = [ + "walkdir", +] + [[package]] name = "dirs" version = "5.0.1" @@ -1473,6 +1577,12 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "downcast" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" + [[package]] name = "eager" version = "0.1.0" @@ -1653,6 +1763,18 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "filetime" +version = "0.2.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ee447700ac8aa0b2f2bd7bc4462ad686ba06baa6727ac149a2d6277f0d240fd" +dependencies = [ + "cfg-if", + "libc", + "redox_syscall 0.4.1", + "windows-sys 0.52.0", +] + [[package]] name = "flate2" version = "1.0.30" @@ -1663,6 +1785,15 @@ dependencies = [ "miniz_oxide", ] +[[package]] +name = "float-cmp" +version = "0.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" +dependencies = [ + "num-traits", +] + [[package]] name = "fnv" version = "1.0.7" @@ -1678,6 +1809,12 @@ dependencies = [ "percent-encoding", ] +[[package]] +name = "fragile" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c2141d6d6c8512188a7891b4b01590a45f6dac67afb4f255c4124dbb86d4eaa" + [[package]] name = "futures" version = "0.3.30" @@ -1885,6 +2022,9 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash 0.7.8", +] [[package]] name = "hashbrown" @@ -1967,6 +2107,18 @@ dependencies = [ "hmac 0.8.1", ] +[[package]] +name = "honggfuzz" +version = "0.5.56" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7c76b6234c13c9ea73946d1379d33186151148e0da231506b964b44f3d023505" +dependencies = [ + "arbitrary", + "lazy_static", + "memmap2 0.9.4", + "rustc_version", +] + [[package]] name = "http" version = "0.2.12" @@ -2100,6 +2252,31 @@ dependencies = [ "version_check", ] +[[package]] +name = "include_dir" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "923d117408f1e49d914f1a379a309cffe4f18c05cf4e3d12e613a15fc81bd0dd" +dependencies = [ + "include_dir_macros", +] + +[[package]] +name = "include_dir_macros" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7cab85a7ed0bd5f0e76d93846e0147172bed2e2d3f859bcc33a8d9699cad1a75" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "index_list" +version = "0.2.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4e6ba961c14e98151cd6416dd3685efe786a94c38bc1a535c06ceff0a1600813" + [[package]] name = "indexmap" version = "1.9.3" @@ -2320,6 +2497,35 @@ version = "0.4.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +[[package]] +name = "lru" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e999beba7b6e8345721bd280141ed958096a2e4abdf74f67ff4ce49b4b54e47a" +dependencies = [ + "hashbrown 0.12.3", +] + +[[package]] +name = "lz4" +version = "1.26.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "958b4caa893816eea05507c20cfe47574a43d9a697138a7872990bba8a0ece68" +dependencies = [ + "libc", + "lz4-sys", +] + +[[package]] +name = "lz4-sys" +version = "1.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "109de74d5d2353660401699a4174a4ff23fcc649caf553df71933c7fb45ad868" +dependencies = [ + "cc", + "libc", +] + [[package]] name = "memchr" version = "2.7.2" @@ -2335,6 +2541,15 @@ dependencies = [ "libc", ] +[[package]] +name = "memmap2" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" +dependencies = [ + "libc", +] + [[package]] name = "memoffset" version = "0.7.1" @@ -2397,6 +2612,54 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "mockall" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c84490118f2ee2d74570d114f3d0493cbf02790df303d2707606c3e14e07c96" +dependencies = [ + "cfg-if", + "downcast", + "fragile", + "lazy_static", + "mockall_derive", + "predicates", + "predicates-tree", +] + +[[package]] +name = "mockall_derive" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "22ce75669015c4f47b289fd4d4f56e894e4c96003ffdf3ac51313126f94c6cbb" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "modular-bitfield" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a53d79ba8304ac1c4f9eb3b9d281f21f7be9d4626f72ce7df4ad8fbde4f38a74" +dependencies = [ + "modular-bitfield-impl", + "static_assertions", +] + +[[package]] +name = "modular-bitfield-impl" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a7d5f7076603ebc68de2dc6a650ec331a062a13abaa346975be747bbfa4b789" +dependencies = [ + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "nix" version = "0.26.4" @@ -2420,6 +2683,12 @@ dependencies = [ "minimal-lexical", ] +[[package]] +name = "normalize-line-endings" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" + [[package]] name = "num" version = "0.2.1" @@ -2660,6 +2929,29 @@ version = "6.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2355d85b9a3786f481747ced0e0ff2ba35213a1f9bd406ed906554d7af805a1" +[[package]] +name = "ouroboros" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1358bd1558bd2a083fed428ffeda486fbfb323e698cdda7794259d592ca72db" +dependencies = [ + "aliasable", + "ouroboros_macro", +] + +[[package]] +name = "ouroboros_macro" +version = "0.15.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5f7d21ccd03305a674437ee1248f3ab5d4b1db095cf1caf49f1713ddf61956b7" +dependencies = [ + "Inflector", + "proc-macro-error", + "proc-macro2", + "quote", + "syn 1.0.109", +] + [[package]] name = "parking_lot" version = "0.12.2" @@ -2678,7 +2970,7 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall", + "redox_syscall 0.5.1", "smallvec", "windows-targets 0.52.5", ] @@ -2832,6 +3124,36 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" +[[package]] +name = "predicates" +version = "2.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" +dependencies = [ + "difflib", + "float-cmp", + "itertools", + "normalize-line-endings", + "predicates-core", + "regex", +] + +[[package]] +name = "predicates-core" +version = "1.0.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ae8177bee8e75d6846599c6b9ff679ed51e882816914eec639944d7c9aa11931" + +[[package]] +name = "predicates-tree" +version = "1.0.11" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41b740d195ed3166cd147c8047ec98db0e22ec019eb8eeb76d343b795304fb13" +dependencies = [ + "predicates-core", + "termtree", +] + [[package]] name = "pretty-hex" version = "0.3.0" @@ -2858,7 +3180,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" dependencies = [ - "toml", + "toml 0.5.11", ] [[package]] @@ -2889,6 +3211,7 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2", "quote", + "syn 1.0.109", "version_check", ] @@ -2963,6 +3286,7 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "141bf7dfde2fbc246bfd3fe12f2455aa24b0fbd9af535d8c86c7bd1381ff2b1a" dependencies = [ + "arbitrary", "bytes", "rand 0.8.5", "ring 0.16.20", @@ -3111,11 +3435,20 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.1" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" dependencies = [ - "bitflags 2.5.0", + "bitflags 1.3.2", +] + +[[package]] +name = "redox_syscall" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "469052894dcb553421e483e4209ee581a45100d31b4018de03e5a7ad86374a7e" +dependencies = [ + "bitflags 2.5.0", ] [[package]] @@ -3385,6 +3718,15 @@ version = "1.0.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" +[[package]] +name = "same-file" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +dependencies = [ + "winapi-util", +] + [[package]] name = "schannel" version = "0.1.23" @@ -3462,6 +3804,15 @@ dependencies = [ "serde", ] +[[package]] +name = "seqlock" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b5c67b6f14ecc5b86c66fa63d76b5092352678545a8a3cdae80aef5128371910" +dependencies = [ + "parking_lot", +] + [[package]] name = "serde" version = "1.0.199" @@ -3502,6 +3853,15 @@ dependencies = [ "serde", ] +[[package]] +name = "serde_spanned" +version = "0.6.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb5b1b31579f3811bf615c144393417496f152e12ac8b7663bf664f4a815306d" +dependencies = [ + "serde", +] + [[package]] name = "serde_urlencoded" version = "0.7.1" @@ -3729,13 +4089,95 @@ dependencies = [ "solana-config-program", "solana-sdk", "spl-token", - "spl-token-2022 1.0.0", + "spl-token-2022", "spl-token-group-interface", "spl-token-metadata-interface", "thiserror", "zstd", ] +[[package]] +name = "solana-accounts-db" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e8b4b15e353d5f0e0ddd77966c6f01b296bd83569af455da5fd9329356ff642" +dependencies = [ + "arrayref", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lz4", + "memmap2 0.5.10", + "modular-bitfield", + "num-derive 0.4.2", + "num-traits", + "num_cpus", + "num_enum 0.7.2", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "seqlock", + "serde", + "serde_derive", + "smallvec", + "solana-bucket-map", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-measure", + "solana-metrics", + "solana-nohash-hasher", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", + "static_assertions", + "strum", + "strum_macros", + "tar", + "tempfile", + "thiserror", +] + +[[package]] +name = "solana-address-lookup-table-program" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c4eef9fc8aa3ff804dbf17766ab2d2fe38561adc8b521705faa782c18a108d8" +dependencies = [ + "bincode", + "bytemuck", + "log", + "num-derive 0.4.2", + "num-traits", + "rustc_version", + "serde", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-program", + "solana-program-runtime", + "solana-sdk", + "thiserror", +] + [[package]] name = "solana-banks-client" version = "1.18.12" @@ -3764,6 +4206,26 @@ dependencies = [ "tarpc", ] +[[package]] +name = "solana-banks-server" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f66768544951feb91c3470e255d4613295b5cc5a58a9cc6a4207ab9a0178cfe9" +dependencies = [ + "bincode", + "crossbeam-channel", + "futures", + "solana-accounts-db", + "solana-banks-interface", + "solana-client", + "solana-runtime", + "solana-sdk", + "solana-send-transaction-service", + "tarpc", + "tokio", + "tokio-serde", +] + [[package]] name = "solana-bpf-loader-program" version = "1.18.12" @@ -3783,6 +4245,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-bucket-map" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a7b34296d69867253671a71a2231b8d5b4a810bd7a5c1c603e7b542832d5980" +dependencies = [ + "bv", + "bytemuck", + "log", + "memmap2 0.5.10", + "modular-bitfield", + "num_enum 0.7.2", + "rand 0.8.5", + "solana-measure", + "solana-sdk", + "tempfile", +] + [[package]] name = "solana-clap-utils" version = "1.18.12" @@ -3876,6 +4356,16 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-compute-budget-program" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ca100b2bdd7e455f5f0b9791bc204dacd684a0373ad1032697dbad43f34e527f" +dependencies = [ + "solana-program-runtime", + "solana-sdk", +] + [[package]] name = "solana-config-program" version = "1.18.12" @@ -3912,6 +4402,30 @@ dependencies = [ "tokio", ] +[[package]] +name = "solana-cost-model" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd3c63699df1680535daee8e486bd496e2ec849c427de4b6a42d4f1b27430949" +dependencies = [ + "lazy_static", + "log", + "rustc_version", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-compute-budget-program", + "solana-config-program", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-metrics", + "solana-program-runtime", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-vote-program", +] + [[package]] name = "solana-frozen-abi" version = "1.18.12" @@ -3926,7 +4440,7 @@ dependencies = [ "im", "lazy_static", "log", - "memmap2", + "memmap2 0.5.10", "rustc_version", "serde", "serde_bytes", @@ -3949,6 +4463,19 @@ dependencies = [ "syn 2.0.60", ] +[[package]] +name = "solana-loader-v4-program" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c566ebf0da216efc70054bf2d6d06c16fe44b63402c6f3bb04f6a88d8571d9b" +dependencies = [ + "log", + "solana-measure", + "solana-program-runtime", + "solana-sdk", + "solana_rbpf", +] + [[package]] name = "solana-logger" version = "1.18.12" @@ -4007,6 +4534,12 @@ dependencies = [ "url", ] +[[package]] +name = "solana-nohash-hasher" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b8a731ed60e89177c8a7ab05fe0f1511cedd3e70e773f288f9de33a9cfdc21e" + [[package]] name = "solana-perf" version = "1.18.12" @@ -4119,6 +4652,36 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-program-test" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2760112327ffce892f6a21030f7c9e4b6da3ded8c8eadf1dbfffcb5a754c61db" +dependencies = [ + "assert_matches", + "async-trait", + "base64 0.21.7", + "bincode", + "chrono-humanize", + "crossbeam-channel", + "log", + "serde", + "solana-accounts-db", + "solana-banks-client", + "solana-banks-interface", + "solana-banks-server", + "solana-bpf-loader-program", + "solana-logger", + "solana-program-runtime", + "solana-runtime", + "solana-sdk", + "solana-vote-program", + "solana_rbpf", + "test-case", + "thiserror", + "tokio", +] + [[package]] name = "solana-pubsub-client" version = "1.18.12" @@ -4244,7 +4807,7 @@ dependencies = [ "solana-sdk", "solana-transaction-status", "solana-version", - "spl-token-2022 1.0.0", + "spl-token-2022", "thiserror", ] @@ -4261,6 +4824,83 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-runtime" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9a3480088ad0ffb701ada496f19754b4ff737e516c6b5f1231508e50ae2e0ea3" +dependencies = [ + "aquamarine", + "arrayref", + "base64 0.21.7", + "bincode", + "blake3", + "bv", + "bytemuck", + "byteorder", + "bzip2", + "crossbeam-channel", + "dashmap", + "dir-diff", + "flate2", + "fnv", + "im", + "index_list", + "itertools", + "lazy_static", + "log", + "lru", + "lz4", + "memmap2 0.5.10", + "mockall", + "modular-bitfield", + "num-derive 0.4.2", + "num-traits", + "num_cpus", + "num_enum 0.7.2", + "ouroboros", + "percentage", + "qualifier_attr", + "rand 0.8.5", + "rayon", + "regex", + "rustc_version", + "serde", + "serde_derive", + "serde_json", + "solana-accounts-db", + "solana-address-lookup-table-program", + "solana-bpf-loader-program", + "solana-bucket-map", + "solana-compute-budget-program", + "solana-config-program", + "solana-cost-model", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-loader-v4-program", + "solana-measure", + "solana-metrics", + "solana-perf", + "solana-program-runtime", + "solana-rayon-threadlimit", + "solana-sdk", + "solana-stake-program", + "solana-system-program", + "solana-version", + "solana-vote", + "solana-vote-program", + "solana-zk-token-proof-program", + "solana-zk-token-sdk", + "static_assertions", + "strum", + "strum_macros", + "symlink", + "tar", + "tempfile", + "thiserror", + "zstd", +] + [[package]] name = "solana-sdk" version = "1.18.12" @@ -4287,7 +4927,7 @@ dependencies = [ "lazy_static", "libsecp256k1", "log", - "memmap2", + "memmap2 0.5.10", "num-derive 0.4.2", "num-traits", "num_enum 0.7.2", @@ -4335,6 +4975,37 @@ version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "468aa43b7edb1f9b7b7b686d5c3aeb6630dc1708e86e31343499dd5c4d775183" +[[package]] +name = "solana-send-transaction-service" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0deed4fe8bb31ff178d8b7e8295bc81e6e1d704fc0e2c5565f58d9eb8feec89d" +dependencies = [ + "crossbeam-channel", + "log", + "solana-client", + "solana-measure", + "solana-metrics", + "solana-runtime", + "solana-sdk", + "solana-tpu-client", +] + +[[package]] +name = "solana-stake-program" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ea02d44b82ed0eb271871cf8a1b8179a0ab50f4f995e7d8ae691c1971bd0a0e" +dependencies = [ + "bincode", + "log", + "rustc_version", + "solana-config-program", + "solana-program-runtime", + "solana-sdk", + "solana-vote-program", +] + [[package]] name = "solana-streamer" version = "1.18.12" @@ -4442,7 +5113,7 @@ dependencies = [ "spl-associated-token-account", "spl-memo", "spl-token", - "spl-token-2022 1.0.0", + "spl-token-2022", "thiserror", ] @@ -4477,6 +5148,25 @@ dependencies = [ "solana-sdk", ] +[[package]] +name = "solana-vote" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "12945ee508c751ffdce58f976be6e58a05529ce0032c1f7db76eed6a8d76b33c" +dependencies = [ + "crossbeam-channel", + "itertools", + "log", + "rustc_version", + "serde", + "serde_derive", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk", + "solana-vote-program", + "thiserror", +] + [[package]] name = "solana-vote-program" version = "1.18.12" @@ -4499,6 +5189,20 @@ dependencies = [ "thiserror", ] +[[package]] +name = "solana-zk-token-proof-program" +version = "1.18.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "39263f3e47a160b9b67896f2225d56e6872905c066152cbe61f5fd201c52a6d2" +dependencies = [ + "bytemuck", + "num-derive 0.4.2", + "num-traits", + "solana-program-runtime", + "solana-sdk", + "solana-zk-token-sdk", +] + [[package]] name = "solana-zk-token-sdk" version = "1.18.12" @@ -4581,7 +5285,7 @@ dependencies = [ "num-traits", "solana-program", "spl-token", - "spl-token-2022 1.0.0", + "spl-token-2022", "thiserror", ] @@ -4667,20 +5371,6 @@ dependencies = [ "syn 2.0.60", ] -[[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", -] - [[package]] name = "spl-tlv-account-resolution" version = "0.5.2" @@ -4710,28 +5400,6 @@ dependencies = [ "thiserror", ] -[[package]] -name = "spl-token-2022" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4abf34a65ba420584a0c35f3903f8d727d1f13ababbdc3f714c6b065a686e86" -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" @@ -4751,7 +5419,7 @@ 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", ] @@ -4783,22 +5451,6 @@ dependencies = [ "spl-type-length-value", ] -[[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" @@ -4811,7 +5463,7 @@ dependencies = [ "spl-discriminator", "spl-pod", "spl-program-error", - "spl-tlv-account-resolution 0.5.2", + "spl-tlv-account-resolution", "spl-type-length-value", ] @@ -4846,12 +5498,40 @@ version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" +[[package]] +name = "strum" +version = "0.24.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "063e6045c0e62079840579a7e47a355ae92f60eb74daaf156fb1e84ba164e63f" +dependencies = [ + "strum_macros", +] + +[[package]] +name = "strum_macros" +version = "0.24.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e385be0d24f186b4ce2f9982191e7101bb737312ad61c1f2f984f34bcf85d59" +dependencies = [ + "heck 0.4.1", + "proc-macro2", + "quote", + "rustversion", + "syn 1.0.109", +] + [[package]] name = "subtle" version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" +[[package]] +name = "symlink" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7973cce6668464ea31f176d85b13c7ab3bba2cb3b77a2ed26abd7801688010a" + [[package]] name = "syn" version = "1.0.109" @@ -4925,6 +5605,17 @@ dependencies = [ "libc", ] +[[package]] +name = "tar" +version = "0.4.41" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb797dad5fb5b76fcf519e702f4a589483b5ef06567f160c392832c1f5e44909" +dependencies = [ + "filetime", + "libc", + "xattr", +] + [[package]] name = "tarpc" version = "0.29.0" @@ -4992,6 +5683,45 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "termtree" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3369f5ac52d5eb6ab48c6b4ffdc8efbcad6b89c765749064ba298f2c68a16a76" + +[[package]] +name = "test-case" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eb2550dd13afcd286853192af8601920d959b14c401fcece38071d53bf0768a8" +dependencies = [ + "test-case-macros", +] + +[[package]] +name = "test-case-core" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "adcb7fd841cd518e279be3d5a3eb0636409487998a4aff22f3de87b81e88384f" +dependencies = [ + "cfg-if", + "proc-macro2", + "quote", + "syn 2.0.60", +] + +[[package]] +name = "test-case-macros" +version = "3.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.60", + "test-case-core", +] + [[package]] name = "textwrap" version = "0.11.0" @@ -5223,11 +5953,26 @@ dependencies = [ "serde", ] +[[package]] +name = "toml" +version = "0.8.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e9dd1545e8208b4a5af1aa9bbd0b4cf7e9ea08fabc5d0a5c67fcaafa17433aa3" +dependencies = [ + "serde", + "serde_spanned", + "toml_datetime", + "toml_edit 0.22.12", +] + [[package]] name = "toml_datetime" version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" +dependencies = [ + "serde", +] [[package]] name = "toml_edit" @@ -5237,7 +5982,7 @@ checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.2.6", "toml_datetime", - "winnow", + "winnow 0.5.40", ] [[package]] @@ -5248,7 +5993,20 @@ checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" dependencies = [ "indexmap 2.2.6", "toml_datetime", - "winnow", + "winnow 0.5.40", +] + +[[package]] +name = "toml_edit" +version = "0.22.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d3328d4f68a705b2a4498da1d580585d39a6510f98318a2cec3018a7ec61ddef" +dependencies = [ + "indexmap 2.2.6", + "serde", + "serde_spanned", + "toml_datetime", + "winnow 0.6.18", ] [[package]] @@ -5316,29 +6074,28 @@ dependencies = [ [[package]] name = "trident-client" -version = "0.6.0" +version = "0.7.0" dependencies = [ "anchor-client", "anchor-lang", - "anchor-spl", - "anchor-syn", + "anchor-lang-idl-spec", "anyhow", "arbitrary", "bincode", "borsh 0.10.3", "cargo_metadata", + "convert_case", "ed25519-dalek", "fehler", "futures", "heck 0.4.1", + "honggfuzz", "indicatif", - "lazy_static", "log", "pathdiff", - "prettytable", "proc-macro2", + "quinn-proto", "quote", - "rand 0.8.5", "regex", "rstest", "serde", @@ -5346,29 +6103,38 @@ dependencies = [ "serial_test", "shellexpand", "solana-account-decoder", - "solana-banks-client", - "solana-bpf-loader-program", "solana-cli-output", - "solana-program", + "solana-program-test", "solana-sdk", - "solana-sdk-macro", - "solana-system-program", "solana-transaction-status", "spl-associated-token-account", "spl-token", "syn 1.0.109", "thiserror", "tokio", - "toml", + "toml 0.5.11", + "trident-derive-accounts-snapshots", "trident-derive-displayix", "trident-derive-fuzz-deserialize", "trident-derive-fuzz-test-executor", + "trident-fuzz", "trident-test", ] [[package]] -name = "trident-derive-displayix" +name = "trident-derive-accounts-snapshots" version = "0.0.1" +dependencies = [ + "anchor-syn", + "convert_case", + "proc-macro2", + "quote", + "syn 1.0.109", +] + +[[package]] +name = "trident-derive-displayix" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -5377,7 +6143,7 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-deserialize" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", @@ -5386,19 +6152,37 @@ dependencies = [ [[package]] name = "trident-derive-fuzz-test-executor" -version = "0.0.1" +version = "0.0.2" dependencies = [ "proc-macro2", "quote", "syn 1.0.109", ] +[[package]] +name = "trident-fuzz" +version = "0.1.0" +dependencies = [ + "anchor-lang", + "arbitrary", + "prettytable", + "regex", + "serde", + "serde_json", + "solana-banks-client", + "solana-program-runtime", + "solana-program-test", + "solana-sdk", + "spl-token", + "thiserror", + "tokio", +] + [[package]] name = "trident-test" -version = "0.3.2" +version = "0.3.3" dependencies = [ "darling 0.13.4", - "proc-macro2", "quote", "syn 1.0.109", ] @@ -5570,6 +6354,16 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +[[package]] +name = "walkdir" +version = "2.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" +dependencies = [ + "same-file", + "winapi-util", +] + [[package]] name = "want" version = "0.3.1" @@ -5870,6 +6664,15 @@ 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 = "winreg" version = "0.50.0" @@ -5898,6 +6701,17 @@ dependencies = [ "time", ] +[[package]] +name = "xattr" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8da84f1a25939b27f6820d92aed108f83ff920fdf11a7b19366c27c4cda81d4f" +dependencies = [ + "libc", + "linux-raw-sys", + "rustix", +] + [[package]] name = "yasna" version = "0.5.2" diff --git a/examples/integration-tests/turnstile/programs/turnstile/Cargo.toml b/examples/integration-tests/turnstile/programs/turnstile/Cargo.toml index 5d5ada32..f9a6a663 100644 --- a/examples/integration-tests/turnstile/programs/turnstile/Cargo.toml +++ b/examples/integration-tests/turnstile/programs/turnstile/Cargo.toml @@ -10,11 +10,12 @@ name = "turnstile" doctest = false [features] +default = [] +cpi = ["no-entrypoint"] no-entrypoint = [] no-idl = [] no-log-ix-name = [] -cpi = ["no-entrypoint"] -default = [] +idl-build = ["anchor-lang/idl-build"] [dependencies] -anchor-lang = "0.29.0" +anchor-lang = "0.30.1"