From 84b4e02c2ca27702a79c4db698af9e36132eedae Mon Sep 17 00:00:00 2001 From: Kyrylo Stepanov Date: Tue, 17 Sep 2024 12:36:45 +0300 Subject: [PATCH] merge two crates --- Cargo.lock | 10 - Cargo.toml | 1 - program-states/Cargo.lock | 2784 ----------------- program-states/Cargo.toml | 20 - program-states/src/lib.rs | 10 - programs/voter-stake-registry/Cargo.toml | 1 - .../src/cpi_instructions.rs | 2 +- .../voter-stake-registry}/src/error.rs | 0 .../src/instructions/change_delegate.rs | 2 +- .../src/instructions/claim.rs | 2 +- .../src/instructions/close_deposit_entry.rs | 4 +- .../src/instructions/close_voter.rs | 8 +- .../src/instructions/configure_voting_mint.rs | 6 +- .../src/instructions/create_deposit_entry.rs | 8 +- .../src/instructions/create_registrar.rs | 2 +- .../src/instructions/create_voter.rs | 4 +- .../src/instructions/deposit.rs | 6 +- .../src/instructions/extend_stake.rs | 4 +- .../src/instructions/log_voter_info.rs | 2 +- .../src/instructions/stake.rs | 2 +- .../src/instructions/unlock_tokens.rs | 4 +- .../update_voter_weight_record.rs | 2 +- .../src/instructions/withdraw.rs | 6 +- programs/voter-stake-registry/src/lib.rs | 11 +- .../src/state/deposit_entry.rs | 1 + .../voter-stake-registry/src/state/lockup.rs | 279 ++ .../voter-stake-registry}/src/state/mod.rs | 0 .../src/state/registrar.rs | 1 + .../voter-stake-registry}/src/state/voter.rs | 1 + .../src/state/voting_mint_config.rs | 1 + programs/voter-stake-registry/src/voter.rs | 2 +- .../tests/program_test/addin.rs | 2 +- .../tests/program_test/rewards.rs | 2 +- .../tests/program_test/utils.rs | 2 +- .../tests/test_all_deposits.rs | 2 +- .../voter-stake-registry/tests/test_basic.rs | 2 +- .../tests/test_change_delegate.rs | 2 +- .../voter-stake-registry/tests/test_claim.rs | 2 +- .../tests/test_deposit_constant.rs | 2 +- .../tests/test_deposit_no_locking.rs | 2 +- .../tests/test_extend_deposit.rs | 2 +- .../voter-stake-registry/tests/test_lockup.rs | 2 +- .../tests/test_log_voter_info.rs | 2 +- .../voter-stake-registry/tests/test_stake.rs | 2 +- .../voter-stake-registry/tests/test_voting.rs | 2 +- 45 files changed, 334 insertions(+), 2880 deletions(-) delete mode 100644 program-states/Cargo.lock delete mode 100644 program-states/Cargo.toml delete mode 100644 program-states/src/lib.rs rename {program-states => programs/voter-stake-registry}/src/error.rs (100%) rename {program-states => programs/voter-stake-registry}/src/state/deposit_entry.rs (99%) create mode 100644 programs/voter-stake-registry/src/state/lockup.rs rename {program-states => programs/voter-stake-registry}/src/state/mod.rs (100%) rename {program-states => programs/voter-stake-registry}/src/state/registrar.rs (98%) rename {program-states => programs/voter-stake-registry}/src/state/voter.rs (98%) rename {program-states => programs/voter-stake-registry}/src/state/voting_mint_config.rs (95%) diff --git a/Cargo.lock b/Cargo.lock index 1ea14216..ef5f3032 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1987,7 +1987,6 @@ dependencies = [ "bytemuck", "env_logger", "log", - "mplx-staking-states", "solana-program", "solana-program-test", "solana-sdk", @@ -1998,15 +1997,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "mplx-staking-states" -version = "0.0.1" -dependencies = [ - "anchor-lang", - "anchor-spl", - "static_assertions", -] - [[package]] name = "nix" version = "0.24.3" diff --git a/Cargo.toml b/Cargo.toml index 7fddbb6d..6ed286ea 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,6 @@ [workspace] members = [ "programs/*", - "program-states" # Drop everything below this line before running "anchor publish": # Otherwise the build will fail since Anchor uploads only parts of the source tree. ] diff --git a/program-states/Cargo.lock b/program-states/Cargo.lock deleted file mode 100644 index dccf59f5..00000000 --- a/program-states/Cargo.lock +++ /dev/null @@ -1,2784 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aead" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b613b8e1e3cf911a086f53f03bf286f52fd7a7258e4fa606f0ef220d39d8877" -dependencies = [ - "generic-array", -] - -[[package]] -name = "aes" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", - "opaque-debug", -] - -[[package]] -name = "aes-gcm-siv" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589c637f0e68c877bbd59a4599bbe849cac8e5f3e4b5a3ebae8f528cd218dcdc" -dependencies = [ - "aead", - "aes", - "cipher", - "ctr", - "polyval", - "subtle", - "zeroize", -] - -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.14", - "once_cell", - "version_check", -] - -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "anchor-attribute-access-control" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-account" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" -dependencies = [ - "anchor-syn", - "anyhow", - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-constant" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" -dependencies = [ - "anchor-syn", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-error" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" -dependencies = [ - "anchor-syn", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-event" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-interface" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" -dependencies = [ - "anchor-syn", - "anyhow", - "heck", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-program" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-attribute-state" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-derive-accounts" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" -dependencies = [ - "anchor-syn", - "anyhow", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "anchor-lang" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" -dependencies = [ - "anchor-attribute-access-control", - "anchor-attribute-account", - "anchor-attribute-constant", - "anchor-attribute-error", - "anchor-attribute-event", - "anchor-attribute-interface", - "anchor-attribute-program", - "anchor-attribute-state", - "anchor-derive-accounts", - "arrayref", - "base64 0.13.1", - "bincode", - "borsh 0.9.3", - "bytemuck", - "solana-program", - "thiserror", -] - -[[package]] -name = "anchor-spl" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f32390ce8356f54c0f0245ea156f8190717e37285b8bf4f406a613dc4b954cde" -dependencies = [ - "anchor-lang", - "solana-program", - "spl-associated-token-account", - "spl-token", -] - -[[package]] -name = "anchor-syn" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc" -dependencies = [ - "anyhow", - "bs58 0.3.1", - "heck", - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "serde", - "serde_json", - "sha2 0.9.9", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anyhow" -version = "1.0.82" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" - -[[package]] -name = "ark-bn254" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a22f4561524cd949590d78d7d4c5df8f592430d221f7f3c9497bbafd8972120f" -dependencies = [ - "ark-ec", - "ark-ff", - "ark-std", -] - -[[package]] -name = "ark-ec" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defd9a439d56ac24968cca0571f598a61bc8c55f71d50a89cda591cb750670ba" -dependencies = [ - "ark-ff", - "ark-poly", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", - "itertools", - "num-traits", - "zeroize", -] - -[[package]] -name = "ark-ff" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" -dependencies = [ - "ark-ff-asm", - "ark-ff-macros", - "ark-serialize", - "ark-std", - "derivative", - "digest 0.10.7", - "itertools", - "num-bigint", - "num-traits", - "paste", - "rustc_version", - "zeroize", -] - -[[package]] -name = "ark-ff-asm" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" -dependencies = [ - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-ff-macros" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" -dependencies = [ - "num-bigint", - "num-traits", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-poly" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d320bfc44ee185d899ccbadfa8bc31aab923ce1558716e1997a1e74057fe86bf" -dependencies = [ - "ark-ff", - "ark-serialize", - "ark-std", - "derivative", - "hashbrown 0.13.2", -] - -[[package]] -name = "ark-serialize" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" -dependencies = [ - "ark-serialize-derive", - "ark-std", - "digest 0.10.7", - "num-bigint", -] - -[[package]] -name = "ark-serialize-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae3281bc6d0fd7e549af32b52511e1302185bd688fd3359fa36423346ff682ea" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "ark-std" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" -dependencies = [ - "num-traits", - "rand 0.8.5", -] - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "assert_matches" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b34d609dfbaf33d6889b2b7106d3ca345eacad44200913df5ba02bfd31d2ba9" - -[[package]] -name = "atty" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" -dependencies = [ - "hermit-abi", - "libc", - "winapi", -] - -[[package]] -name = "autocfg" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" - -[[package]] -name = "base64" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "bincode" -version = "1.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" -dependencies = [ - "serde", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" -dependencies = [ - "serde", -] - -[[package]] -name = "bitmaps" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2" -dependencies = [ - "typenum", -] - -[[package]] -name = "blake3" -version = "1.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30cca6d3674597c30ddf2c587bf8d9d65c9a84d2326d941cc79c9842dfe0ef52" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq", - "digest 0.10.7", -] - -[[package]] -name = "block-buffer" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" -dependencies = [ - "block-padding", - "generic-array", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "block-padding" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d696c370c750c948ada61c69a0ee2cbbb9c50b1019ddb86d9317157a99c2cae" - -[[package]] -name = "borsh" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" -dependencies = [ - "borsh-derive 0.9.3", - "hashbrown 0.11.2", -] - -[[package]] -name = "borsh" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4114279215a005bc675e386011e594e1d9b800918cea18fcadadcce864a2046b" -dependencies = [ - "borsh-derive 0.10.3", - "hashbrown 0.13.2", -] - -[[package]] -name = "borsh" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0901fc8eb0aca4c83be0106d6f2db17d86a08dfc2c25f0e84464bf381158add6" -dependencies = [ - "borsh-derive 1.4.0", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6441c552f230375d18e3cc377677914d2ca2b0d36e52129fe15450a2dce46775" -dependencies = [ - "borsh-derive-internal 0.9.3", - "borsh-schema-derive-internal 0.9.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0754613691538d51f329cce9af41d7b7ca150bc973056f1156611489475f54f7" -dependencies = [ - "borsh-derive-internal 0.10.3", - "borsh-schema-derive-internal 0.10.3", - "proc-macro-crate 0.1.5", - "proc-macro2", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51670c3aa053938b0ee3bd67c3817e471e626151131b934038e83c5bf8de48f5" -dependencies = [ - "once_cell", - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.60", - "syn_derive", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5449c28a7b352f2d1e592a8a28bf139bc71afb0764a14f3c02500935d8c44065" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afb438156919598d2c7bad7e1c0adf3d26ed3840dbc010db1a882a65583ca2fb" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdbd5696d8bfa21d53d9fe39a714a18538bad11492a42d066dbbc395fb1951c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "borsh-schema-derive-internal" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634205cc43f74a1b9046ef87c4540ebda95696ec0f315024860cad7c5b0f5ccd" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "bs58" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "476e9cd489f9e121e02ffa6014a8ef220ecb15c05ed23fc34cca13925dc283fb" - -[[package]] -name = "bs58" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "771fe0050b883fcc3ea2359b1a96bcfbc090b7116eae7c3c512c7a083fdf23d3" - -[[package]] -name = "bumpalo" -version = "3.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" - -[[package]] -name = "bv" -version = "0.11.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8834bb1d8ee5dc048ee3124f2c7c1afcc6bc9aed03f11e9dfd8c69470a5db340" -dependencies = [ - "feature-probe", - "serde", -] - -[[package]] -name = "bytemuck" -version = "1.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" -dependencies = [ - "bytemuck_derive", -] - -[[package]] -name = "bytemuck_derive" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "cc" -version = "1.0.95" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" -dependencies = [ - "jobserver", - "libc", - "once_cell", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_aliases" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd16c4719339c4530435d38e511904438d07cce7950afa3718a84ac36c10e89e" - -[[package]] -name = "chrono" -version = "0.4.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "num-traits", - "serde", - "windows-targets 0.52.5", -] - -[[package]] -name = "cipher" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" -dependencies = [ - "generic-array", -] - -[[package]] -name = "console_error_panic_hook" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06aeb73f470f66dcdbf7223caeebb85984942f22f1adb2a088cf9668146bbbc" -dependencies = [ - "cfg-if", - "wasm-bindgen", -] - -[[package]] -name = "console_log" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89f72f65e8501878b8a004d5a1afb780987e2ce2b4532c562e367a72c57499f" -dependencies = [ - "log", - "web-sys", -] - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "crypto-mac" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b584a330336237c1eecd3e94266efb216c56ed91225d634cb2991c5f3fd1aeab" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "ctr" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" -dependencies = [ - "cipher", -] - -[[package]] -name = "curve25519-dalek" -version = "3.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f9d052967f590a76e62eb387bd0bbb1b000182c3cefe5364db6b7211651bc0" -dependencies = [ - "byteorder", - "digest 0.9.0", - "rand_core 0.5.1", - "serde", - "subtle", - "zeroize", -] - -[[package]] -name = "darling" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" -dependencies = [ - "darling_core", - "darling_macro", -] - -[[package]] -name = "darling_core" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim", - "syn 2.0.60", -] - -[[package]] -name = "darling_macro" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" -dependencies = [ - "darling_core", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derivation-path" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" - -[[package]] -name = "derivative" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "digest" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" -dependencies = [ - "generic-array", -] - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer 0.10.4", - "crypto-common", - "subtle", -] - -[[package]] -name = "ed25519" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91cff35c70bba8a626e3185d8cd48cc11b5437e1a5bcd15b9b5fa3c64b6dfee7" -dependencies = [ - "signature", -] - -[[package]] -name = "ed25519-dalek" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c762bae6dcaf24c4c84667b8579785430908723d5c889f469d76a41d59cc7a9d" -dependencies = [ - "curve25519-dalek", - "ed25519", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "zeroize", -] - -[[package]] -name = "ed25519-dalek-bip32" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d2be62a4061b872c8c0873ee4fc6f101ce7b889d039f019c5fa2af471a59908" -dependencies = [ - "derivation-path", - "ed25519-dalek", - "hmac 0.12.1", - "sha2 0.10.8", -] - -[[package]] -name = "either" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" - -[[package]] -name = "env_logger" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a12e6657c4c97ebab115a42dcee77225f7f482cdd841cf7088c657a42e9e00e7" -dependencies = [ - "atty", - "humantime", - "log", - "regex", - "termcolor", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "feature-probe" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835a3dc7d1ec9e75e2b5fb4ba75396837112d2060b03f7d43bc1897c7f7211da" - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "serde", - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "getrandom" -version = "0.2.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "wasm-bindgen", -] - -[[package]] -name = "hashbrown" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" -dependencies = [ - "ahash 0.7.8", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash 0.8.11", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" - -[[package]] -name = "heck" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621efb26863f0e9924c6ac577e8275e5e6b77455db64ffa6c65c904e9e132c" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "hermit-abi" -version = "0.1.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62b467343b94ba476dcb2500d242dadbb39557df889310ac77c5d99100aaac33" -dependencies = [ - "libc", -] - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "126888268dcc288495a26bf004b38c5fdbb31682f992c84ceb046a1f0fe38840" -dependencies = [ - "crypto-mac", - "digest 0.9.0", -] - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "hmac-drbg" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" -dependencies = [ - "digest 0.9.0", - "generic-array", - "hmac 0.8.1", -] - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "im" -version = "15.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0acd33ff0285af998aaf9b57342af478078f53492322fafc47450e09397e0e9" -dependencies = [ - "bitmaps", - "rand_core 0.6.4", - "rand_xoshiro", - "rayon", - "serde", - "sized-chunks", - "typenum", - "version_check", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", - "serde", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" - -[[package]] -name = "jobserver" -version = "0.1.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2b099aaa34a9751c5bf0878add70444e1ed2dd73f347be99003d4577277de6e" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "keccak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" -dependencies = [ - "cpufeatures", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libsecp256k1" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9d220bc1feda2ac231cb78c3d26f27676b8cf82c96971f7aeef3d0cf2797c73" -dependencies = [ - "arrayref", - "base64 0.12.3", - "digest 0.9.0", - "hmac-drbg", - "libsecp256k1-core", - "libsecp256k1-gen-ecmult", - "libsecp256k1-gen-genmult", - "rand 0.7.3", - "serde", - "sha2 0.9.9", - "typenum", -] - -[[package]] -name = "libsecp256k1-core" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0f6ab710cec28cef759c5f18671a27dae2a5f952cdaaee1d8e2908cb2478a80" -dependencies = [ - "crunchy", - "digest 0.9.0", - "subtle", -] - -[[package]] -name = "libsecp256k1-gen-ecmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccab96b584d38fac86a83f07e659f0deafd0253dc096dab5a36d53efe653c5c3" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "libsecp256k1-gen-genmult" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67abfe149395e3aa1c48a2beb32b068e2334402df8181f818d3aee2b304c4f5d" -dependencies = [ - "libsecp256k1-core", -] - -[[package]] -name = "light-poseidon" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c9a85a9752c549ceb7578064b4ed891179d20acd85f27318573b64d2d7ee7ee" -dependencies = [ - "ark-bn254", - "ark-ff", - "num-bigint", - "thiserror", -] - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "memmap2" -version = "0.5.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83faa42c0a078c393f6b29d5db232d8be22776a891f8f56e5284faee4a20b327" -dependencies = [ - "libc", -] - -[[package]] -name = "memoffset" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "merlin" -version = "3.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58c38e2799fc0978b65dfff8023ec7843e2330bb462f19198840b34b6582397d" -dependencies = [ - "byteorder", - "keccak", - "rand_core 0.6.4", - "zeroize", -] - -[[package]] -name = "mplx-staking-sdk" -version = "1.2.0" -dependencies = [ - "anchor-lang", - "anchor-spl", - "borsh 0.9.3", - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "serde", - "serde_with 3.7.0", - "static_assertions", - "thiserror", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-derive" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num-derive" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", -] - -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive 0.5.11", -] - -[[package]] -name = "num_enum" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02339744ee7253741199f897151b38e72257d13802d4ee837285cc2990a90845" -dependencies = [ - "num_enum_derive 0.7.2", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate 1.3.1", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_enum_derive" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "681030a937600a36906c185595136d26abfebb4aa9c65701cefcaf8578bb982b" -dependencies = [ - "proc-macro-crate 3.1.0", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "opaque-debug" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08d65885ee38876c4f86fa503fb49d7b507c2b62552df7c70b2fce627e06381" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216eaa586a190f0a738f2f918511eecfa90f13295abec0e457cdebcceda80cbd" -dependencies = [ - "crypto-mac", -] - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest 0.10.7", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "polyval" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8419d2b623c7c0896ff2d5d96e2cb4ede590fed28fcc34934f4c33c036e620a1" -dependencies = [ - "cfg-if", - "cpufeatures", - "opaque-debug", - "universal-hash", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "proc-macro-crate" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d6ea3c4595b96363c13943497db34af4460fb474a95c43f4446ad341b8c9785" -dependencies = [ - "toml", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit 0.19.15", -] - -[[package]] -name = "proc-macro-crate" -version = "3.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d37c51ca738a55da99dc0c4a34860fd675453b8b36209178c2249bb13651284" -dependencies = [ - "toml_edit 0.21.1", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.81" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proc-macro2-diagnostics" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4bf29726d67464d49fa6224a1d07936a8c08bb3fba727c7493f6cf1616fdaada" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", - "yansi", -] - -[[package]] -name = "qstring" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "qualifier_attr" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e2e25ee72f5b24d773cae88422baddefff7714f97aab68d96fe2b6fc4a28fb2" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "quote" -version = "1.0.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" -dependencies = [ - "getrandom 0.1.16", - "libc", - "rand_chacha 0.2.2", - "rand_core 0.5.1", - "rand_hc", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_chacha" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" -dependencies = [ - "ppv-lite86", - "rand_core 0.5.1", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.4", -] - -[[package]] -name = "rand_core" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" -dependencies = [ - "getrandom 0.1.16", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom 0.2.14", -] - -[[package]] -name = "rand_hc" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" -dependencies = [ - "rand_core 0.5.1", -] - -[[package]] -name = "rand_xoshiro" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f97cdb2a36ed4183de61b2f824cc45c9f1037f28afe0a322e9fff4c108b5aaa" -dependencies = [ - "rand_core 0.6.4", -] - -[[package]] -name = "rayon" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "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 = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustversion" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80af6f9131f277a45a3fba6ce8e2258037bb0477a67e610d3c1fe046ab31de47" - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" - -[[package]] -name = "serde" -version = "1.0.198" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_bytes" -version = "0.11.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b8497c313fd43ab992087548117643f6fcd935cbf36f176ffda0aacf9591734" -dependencies = [ - "serde", -] - -[[package]] -name = "serde_derive" -version = "1.0.198" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "serde_json" -version = "1.0.116" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" -dependencies = [ - "serde", - "serde_with_macros 2.3.3", -] - -[[package]] -name = "serde_with" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee80b0e361bbf88fd2f6e242ccd19cfda072cb0faa6ae694ecee08199938569a" -dependencies = [ - "base64 0.21.7", - "chrono", - "hex", - "indexmap 1.9.3", - "indexmap 2.2.6", - "serde", - "serde_derive", - "serde_json", - "serde_with_macros 3.7.0", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "serde_with_macros" -version = "3.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6561dc161a9224638a31d876ccdfefbc1df91d3f3a8342eddb35f055d48c7655" -dependencies = [ - "darling", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "sha2" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d58a1e1bf39749807d89cf2d98ac2dfa0ff1cb3faa38fbb64dd88ac8013d800" -dependencies = [ - "block-buffer 0.9.0", - "cfg-if", - "cpufeatures", - "digest 0.9.0", - "opaque-debug", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest 0.10.7", -] - -[[package]] -name = "sha3" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81199417d4e5de3f04b1e871023acea7389672c4135918f05aa9cbf2f2fa809" -dependencies = [ - "block-buffer 0.9.0", - "digest 0.9.0", - "keccak", - "opaque-debug", -] - -[[package]] -name = "sha3" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" -dependencies = [ - "digest 0.10.7", - "keccak", -] - -[[package]] -name = "signature" -version = "1.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "sized-chunks" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16d69225bde7a69b235da73377861095455d298f2b970996eec25ddbb42b3d1e" -dependencies = [ - "bitmaps", - "typenum", -] - -[[package]] -name = "smallvec" -version = "1.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" - -[[package]] -name = "solana-frozen-abi" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b8177685ab2bc8cc8b3bf63aa1eaa0580d5af850ecefac323ca1c2473085d77" -dependencies = [ - "block-buffer 0.10.4", - "bs58 0.4.0", - "bv", - "either", - "generic-array", - "im", - "lazy_static", - "log", - "memmap2", - "rustc_version", - "serde", - "serde_bytes", - "serde_derive", - "sha2 0.10.8", - "solana-frozen-abi-macro", - "subtle", - "thiserror", -] - -[[package]] -name = "solana-frozen-abi-macro" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a68241cad17b74c6034a68ba4890632d409a2c886e7bead9c1e1432befdb7c9" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 2.0.60", -] - -[[package]] -name = "solana-logger" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea560989ef67ba4a1a0fd62a248721f1aa5bac8fa5ede9ccf4fe9ee484ccadf" -dependencies = [ - "env_logger", - "lazy_static", - "log", -] - -[[package]] -name = "solana-program" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bddf573103c890b4ab8f9a6641d4f969d4148bce9a451c263f4a62afa949fae" -dependencies = [ - "ark-bn254", - "ark-ec", - "ark-ff", - "ark-serialize", - "base64 0.21.7", - "bincode", - "bitflags 2.5.0", - "blake3", - "borsh 0.10.3", - "borsh 0.9.3", - "borsh 1.4.0", - "bs58 0.4.0", - "bv", - "bytemuck", - "cc", - "console_error_panic_hook", - "console_log", - "curve25519-dalek", - "getrandom 0.2.14", - "itertools", - "js-sys", - "lazy_static", - "libc", - "libsecp256k1", - "light-poseidon", - "log", - "memoffset", - "num-bigint", - "num-derive 0.4.2", - "num-traits", - "parking_lot", - "rand 0.8.5", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "sha2 0.10.8", - "sha3 0.10.8", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-sdk-macro", - "thiserror", - "tiny-bip39", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "solana-sdk" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08b24b06fa176209ddb2a2f8172a00b07e8a3b18229fbfc49f1eb3ce6ad11ff1" -dependencies = [ - "assert_matches", - "base64 0.21.7", - "bincode", - "bitflags 2.5.0", - "borsh 1.4.0", - "bs58 0.4.0", - "bytemuck", - "byteorder", - "chrono", - "derivation-path", - "digest 0.10.7", - "ed25519-dalek", - "ed25519-dalek-bip32", - "generic-array", - "hmac 0.12.1", - "itertools", - "js-sys", - "lazy_static", - "libsecp256k1", - "log", - "memmap2", - "num-derive 0.4.2", - "num-traits", - "num_enum 0.7.2", - "pbkdf2 0.11.0", - "qstring", - "qualifier_attr", - "rand 0.7.3", - "rand 0.8.5", - "rustc_version", - "rustversion", - "serde", - "serde_bytes", - "serde_derive", - "serde_json", - "serde_with 2.3.3", - "sha2 0.10.8", - "sha3 0.10.8", - "siphasher", - "solana-frozen-abi", - "solana-frozen-abi-macro", - "solana-logger", - "solana-program", - "solana-sdk-macro", - "thiserror", - "uriparse", - "wasm-bindgen", -] - -[[package]] -name = "solana-sdk-macro" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "869483c05f18d37d4d95a08d9e05e00a4f76a8c8349aeedeee9ba2d013cbacde" -dependencies = [ - "bs58 0.4.0", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.60", -] - -[[package]] -name = "solana-zk-token-sdk" -version = "1.18.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "459c27f7b954798677d8243aa53b8080cfb314ecfecbf8889a5a65c91ad11fee" -dependencies = [ - "aes-gcm-siv", - "base64 0.21.7", - "bincode", - "bytemuck", - "byteorder", - "curve25519-dalek", - "getrandom 0.1.16", - "itertools", - "lazy_static", - "merlin", - "num-derive 0.4.2", - "num-traits", - "rand 0.7.3", - "serde", - "serde_json", - "sha3 0.9.1", - "solana-program", - "solana-sdk", - "subtle", - "thiserror", - "zeroize", -] - -[[package]] -name = "spl-associated-token-account" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978dba3bcbe88d0c2c58366c254d9ea41c5f73357e72fc0bdee4d6b5fc99c8f4" -dependencies = [ - "assert_matches", - "borsh 0.9.3", - "num-derive 0.3.3", - "num-traits", - "solana-program", - "spl-token", - "spl-token-2022", - "thiserror", -] - -[[package]] -name = "spl-memo" -version = "3.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd0dc6f70db6bacea7ff25870b016a65ba1d1b6013536f08e4fd79a8f9005325" -dependencies = [ - "solana-program", -] - -[[package]] -name = "spl-token" -version = "3.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "num_enum 0.5.11", - "solana-program", - "thiserror", -] - -[[package]] -name = "spl-token-2022" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0043b590232c400bad5ee9eb983ced003d15163c4c5d56b090ac6d9a57457b47" -dependencies = [ - "arrayref", - "bytemuck", - "num-derive 0.3.3", - "num-traits", - "num_enum 0.5.11", - "solana-program", - "solana-zk-token-sdk", - "spl-memo", - "spl-token", - "thiserror", -] - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "subtle" -version = "2.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1329189c02ff984e9736652b1631330da25eaa6bc639089ed4915d25446cbe7b" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "thiserror" -version = "1.0.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.59" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "time" -version = "0.3.36" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dfd88e563464686c916c7e46e623e520ddc6d79fa6641390f2e3fa86e83e885" -dependencies = [ - "deranged", - "itoa", - "num-conv", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f252a68540fde3a3877aeea552b832b40ab9a69e318efd078774a01ddee1ccf" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tiny-bip39" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc59cb9dfc85bb312c3a78fd6aa8a8582e310b0fa885d5bb877f6dcc601839d" -dependencies = [ - "anyhow", - "hmac 0.8.1", - "once_cell", - "pbkdf2 0.4.0", - "rand 0.7.3", - "rustc-hash", - "sha2 0.9.9", - "thiserror", - "unicode-normalization", - "wasm-bindgen", - "zeroize", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "toml" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -dependencies = [ - "serde", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow", -] - -[[package]] -name = "toml_edit" -version = "0.21.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8534fd7f78b5405e860340ad6575217ce99f38d4d5c8f2442cb5ecb50090e1" -dependencies = [ - "indexmap 2.2.6", - "toml_datetime", - "winnow", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "universal-hash" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f214e8f697e925001e66ec2c6e37a4ef93f0f78c2eed7814394e10c62025b05" -dependencies = [ - "generic-array", - "subtle", -] - -[[package]] -name = "uriparse" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0200d0fc04d809396c2ad43f3c95da3582a2556eba8d453c1087f4120ee352ff" -dependencies = [ - "fnv", - "lazy_static", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.60", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.5", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" -dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", - "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", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" - -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] - -[[package]] -name = "zeroize" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4756f7db3f7b5574938c3eb1c117038b8e07f95ee6718c0efad4ac21508f1efd" -dependencies = [ - "zeroize_derive", -] - -[[package]] -name = "zeroize_derive" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.60", -] diff --git a/program-states/Cargo.toml b/program-states/Cargo.toml deleted file mode 100644 index c24dcf71..00000000 --- a/program-states/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -cargo-features = ["workspace-inheritance"] -[package] -name = "mplx-staking-states" -version = "0.0.1" -homepage = "https://github.com/blockworks-foundation/voter-stake-registry" -description = "MPLX staking program's state dependencies" -license = "GPL-3.0-or-later" -edition = "2021" -readme = "README.md" - -[lib] -crate-type = ["cdylib", "lib"] - -[features] -test-sbf = [] - -[dependencies] -anchor-lang = { workspace = true, features = ["init-if-needed"] } -anchor-spl = { workspace = true } -static_assertions = { workspace = true } \ No newline at end of file diff --git a/program-states/src/lib.rs b/program-states/src/lib.rs deleted file mode 100644 index a5afd1e4..00000000 --- a/program-states/src/lib.rs +++ /dev/null @@ -1,10 +0,0 @@ -use anchor_lang::prelude::*; - -#[macro_use] -extern crate static_assertions; - -pub mod error; -pub mod state; - -// Requires by Anchor to declare accounts in crate -declare_id!("9XZ7Ku7FYGVk3veKba6BRKTFXoYJyh4b4ZHC6MfaTUE8"); diff --git a/programs/voter-stake-registry/Cargo.toml b/programs/voter-stake-registry/Cargo.toml index b83caeaa..c4433e9f 100644 --- a/programs/voter-stake-registry/Cargo.toml +++ b/programs/voter-stake-registry/Cargo.toml @@ -30,7 +30,6 @@ static_assertions = { workspace = true } bytemuck = "1.9.1" spl-governance = { version = "3.1.1", features = ["no-entrypoint"] } spl-governance-addin-api = "0.1.3" -mplx-staking-states = { path="../../program-states" } [dev-dependencies] solana-sdk = { workspace = true } diff --git a/programs/voter-stake-registry/src/cpi_instructions.rs b/programs/voter-stake-registry/src/cpi_instructions.rs index 9387baaa..3d42d14b 100644 --- a/programs/voter-stake-registry/src/cpi_instructions.rs +++ b/programs/voter-stake-registry/src/cpi_instructions.rs @@ -1,6 +1,6 @@ +use crate::state::LockupPeriod; use anchor_lang::{prelude::*, Key}; use borsh::{BorshDeserialize, BorshSerialize}; -use mplx_staking_states::state::LockupPeriod; use solana_program::{ account_info::AccountInfo, entrypoint::ProgramResult, diff --git a/program-states/src/error.rs b/programs/voter-stake-registry/src/error.rs similarity index 100% rename from program-states/src/error.rs rename to programs/voter-stake-registry/src/error.rs diff --git a/programs/voter-stake-registry/src/instructions/change_delegate.rs b/programs/voter-stake-registry/src/instructions/change_delegate.rs index 871fc79c..290f71d1 100644 --- a/programs/voter-stake-registry/src/instructions/change_delegate.rs +++ b/programs/voter-stake-registry/src/instructions/change_delegate.rs @@ -1,6 +1,6 @@ use crate::{clock_unix_timestamp, cpi_instructions, find_mining_address}; use anchor_lang::prelude::*; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{Registrar, Voter}, }; diff --git a/programs/voter-stake-registry/src/instructions/claim.rs b/programs/voter-stake-registry/src/instructions/claim.rs index ed0953fa..5b9dc3db 100644 --- a/programs/voter-stake-registry/src/instructions/claim.rs +++ b/programs/voter-stake-registry/src/instructions/claim.rs @@ -1,7 +1,7 @@ use crate::{borsh::BorshDeserialize, cpi_instructions}; +use crate::{error::MplStakingError, state::Registrar}; use anchor_lang::prelude::*; use anchor_spl::token::{Token, TokenAccount}; -use mplx_staking_states::{error::MplStakingError, state::Registrar}; use solana_program::program::get_return_data; use spl_governance::state::{ governance::GovernanceV2, proposal::ProposalV2, vote_record::VoteRecordV2, diff --git a/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs b/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs index 3e0d7408..7b36feac 100644 --- a/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs +++ b/programs/voter-stake-registry/src/instructions/close_deposit_entry.rs @@ -1,8 +1,8 @@ -use anchor_lang::prelude::*; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{DepositEntry, Voter}, }; +use anchor_lang::prelude::*; #[derive(Accounts)] pub struct CloseDepositEntry<'info> { diff --git a/programs/voter-stake-registry/src/instructions/close_voter.rs b/programs/voter-stake-registry/src/instructions/close_voter.rs index 0dc7a029..b36703e5 100644 --- a/programs/voter-stake-registry/src/instructions/close_voter.rs +++ b/programs/voter-stake-registry/src/instructions/close_voter.rs @@ -1,12 +1,12 @@ use crate::cpi_instructions; -use anchor_lang::prelude::*; -use anchor_spl::token::{self, CloseAccount, Token, TokenAccount}; -use bytemuck::bytes_of_mut; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{LockupKind, LockupPeriod, Registrar, Voter}, voter_seeds, }; +use anchor_lang::prelude::*; +use anchor_spl::token::{self, CloseAccount, Token, TokenAccount}; +use bytemuck::bytes_of_mut; use std::ops::DerefMut; // Remaining accounts must be all the token token accounts owned by voter, he wants to close, diff --git a/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs b/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs index afa64124..2c2265b6 100644 --- a/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs +++ b/programs/voter-stake-registry/src/instructions/configure_voting_mint.rs @@ -1,9 +1,9 @@ -use anchor_lang::prelude::*; -use anchor_spl::token::Mint; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{Registrar, VotingMintConfig}, }; +use anchor_lang::prelude::*; +use anchor_spl::token::Mint; // Remaining accounts must be all the token mints that have registered // as voting mints, including the newly registered one. diff --git a/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs b/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs index de043780..be5c393e 100644 --- a/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs +++ b/programs/voter-stake-registry/src/instructions/create_deposit_entry.rs @@ -1,13 +1,13 @@ use crate::clock_unix_timestamp; +use crate::{ + error::MplStakingError, + state::{DepositEntry, Lockup, LockupKind, LockupPeriod, Registrar, Voter}, +}; use anchor_lang::prelude::*; use anchor_spl::{ associated_token::AssociatedToken, token::{Mint, Token, TokenAccount}, }; -use mplx_staking_states::{ - error::MplStakingError, - state::{DepositEntry, Lockup, LockupKind, LockupPeriod, Registrar, Voter}, -}; #[derive(Accounts)] pub struct CreateDepositEntry<'info> { diff --git a/programs/voter-stake-registry/src/instructions/create_registrar.rs b/programs/voter-stake-registry/src/instructions/create_registrar.rs index 08d83c6b..594c1158 100644 --- a/programs/voter-stake-registry/src/instructions/create_registrar.rs +++ b/programs/voter-stake-registry/src/instructions/create_registrar.rs @@ -1,7 +1,7 @@ use crate::cpi_instructions; +use crate::{error::MplStakingError, state::Registrar}; use anchor_lang::prelude::*; use anchor_spl::token::{Mint, Token}; -use mplx_staking_states::{error::MplStakingError, state::Registrar}; use spl_governance::state::realm; use std::mem::size_of; diff --git a/programs/voter-stake-registry/src/instructions/create_voter.rs b/programs/voter-stake-registry/src/instructions/create_voter.rs index 8bd56b23..f43cdd7d 100644 --- a/programs/voter-stake-registry/src/instructions/create_voter.rs +++ b/programs/voter-stake-registry/src/instructions/create_voter.rs @@ -1,10 +1,10 @@ use crate::{cpi_instructions, voter::VoterWeightRecord}; -use anchor_lang::prelude::*; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, registrar_seeds, state::{Registrar, Voter}, }; +use anchor_lang::prelude::*; use solana_program::instruction::{get_stack_height, TRANSACTION_LEVEL_STACK_HEIGHT}; use std::mem::size_of; diff --git a/programs/voter-stake-registry/src/instructions/deposit.rs b/programs/voter-stake-registry/src/instructions/deposit.rs index 9a889664..b54e55ff 100644 --- a/programs/voter-stake-registry/src/instructions/deposit.rs +++ b/programs/voter-stake-registry/src/instructions/deposit.rs @@ -1,10 +1,10 @@ use crate::clock_unix_timestamp; -use anchor_lang::prelude::*; -use anchor_spl::token::{self, Token, TokenAccount}; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{LockupKind, LockupPeriod, Registrar, Voter}, }; +use anchor_lang::prelude::*; +use anchor_spl::token::{self, Token, TokenAccount}; #[derive(Accounts)] pub struct Deposit<'info> { diff --git a/programs/voter-stake-registry/src/instructions/extend_stake.rs b/programs/voter-stake-registry/src/instructions/extend_stake.rs index dc7da735..1c5128e1 100644 --- a/programs/voter-stake-registry/src/instructions/extend_stake.rs +++ b/programs/voter-stake-registry/src/instructions/extend_stake.rs @@ -1,9 +1,9 @@ use crate::{clock_unix_timestamp, cpi_instructions, Stake}; -use anchor_lang::prelude::*; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; +use anchor_lang::prelude::*; /// Prolongs the deposit /// diff --git a/programs/voter-stake-registry/src/instructions/log_voter_info.rs b/programs/voter-stake-registry/src/instructions/log_voter_info.rs index ff5828ba..6fa92f9d 100644 --- a/programs/voter-stake-registry/src/instructions/log_voter_info.rs +++ b/programs/voter-stake-registry/src/instructions/log_voter_info.rs @@ -1,6 +1,6 @@ use crate::events::*; +use crate::state::{Registrar, Voter}; use anchor_lang::prelude::*; -use mplx_staking_states::state::{Registrar, Voter}; #[derive(Accounts)] pub struct LogVoterInfo<'info> { diff --git a/programs/voter-stake-registry/src/instructions/stake.rs b/programs/voter-stake-registry/src/instructions/stake.rs index 0cd7eefc..e212e4e3 100644 --- a/programs/voter-stake-registry/src/instructions/stake.rs +++ b/programs/voter-stake-registry/src/instructions/stake.rs @@ -1,6 +1,6 @@ use crate::{cpi_instructions, Stake}; +use crate::{error::MplStakingError, state::LockupKind}; use anchor_lang::prelude::*; -use mplx_staking_states::{error::MplStakingError, state::LockupKind}; /// Transfers unlocked tokens from the source deposit entry to the target deposit entry. /// diff --git a/programs/voter-stake-registry/src/instructions/unlock_tokens.rs b/programs/voter-stake-registry/src/instructions/unlock_tokens.rs index 4d6ceba9..6196672e 100644 --- a/programs/voter-stake-registry/src/instructions/unlock_tokens.rs +++ b/programs/voter-stake-registry/src/instructions/unlock_tokens.rs @@ -1,9 +1,9 @@ use crate::{clock_unix_timestamp, cpi_instructions::withdraw_mining, Stake}; -use anchor_lang::prelude::*; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{LockupPeriod, COOLDOWN_SECS}, }; +use anchor_lang::prelude::*; pub fn unlock_tokens(ctx: Context, deposit_entry_index: u8) -> Result<()> { let registrar = ctx.accounts.registrar.load()?; diff --git a/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs b/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs index 9baba923..b35a591e 100644 --- a/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs +++ b/programs/voter-stake-registry/src/instructions/update_voter_weight_record.rs @@ -1,6 +1,6 @@ +use crate::state::{Registrar, Voter}; use crate::voter::VoterWeightRecord; use anchor_lang::prelude::*; -use mplx_staking_states::state::{Registrar, Voter}; #[derive(Accounts)] pub struct UpdateVoterWeightRecord<'info> { diff --git a/programs/voter-stake-registry/src/instructions/withdraw.rs b/programs/voter-stake-registry/src/instructions/withdraw.rs index 2def986d..59823326 100644 --- a/programs/voter-stake-registry/src/instructions/withdraw.rs +++ b/programs/voter-stake-registry/src/instructions/withdraw.rs @@ -2,13 +2,13 @@ use crate::{ clock_unix_timestamp, voter::{load_token_owner_record, VoterWeightRecord}, }; -use anchor_lang::prelude::*; -use anchor_spl::token::{self, Token, TokenAccount}; -use mplx_staking_states::{ +use crate::{ error::MplStakingError, state::{DepositEntry, LockupKind, LockupPeriod, Registrar, Voter}, voter_seeds, }; +use anchor_lang::prelude::*; +use anchor_spl::token::{self, Token, TokenAccount}; #[derive(Accounts)] pub struct Withdraw<'info> { diff --git a/programs/voter-stake-registry/src/lib.rs b/programs/voter-stake-registry/src/lib.rs index 3c05cb10..7f2fc62f 100644 --- a/programs/voter-stake-registry/src/lib.rs +++ b/programs/voter-stake-registry/src/lib.rs @@ -1,17 +1,14 @@ use anchor_lang::prelude::*; +use error::*; use instructions::*; -use mplx_staking_states::{ - error::MplStakingError, - state::{ - lockup::{LockupKind, LockupPeriod}, - DepositEntry, Registrar, Voter, - }, -}; +use state::*; pub mod cpi_instructions; +pub mod error; pub mod events; mod governance; mod instructions; +pub mod state; pub mod voter; // The program address. diff --git a/program-states/src/state/deposit_entry.rs b/programs/voter-stake-registry/src/state/deposit_entry.rs similarity index 99% rename from program-states/src/state/deposit_entry.rs rename to programs/voter-stake-registry/src/state/deposit_entry.rs index 2381e7d7..f1b6cb99 100644 --- a/program-states/src/state/deposit_entry.rs +++ b/programs/voter-stake-registry/src/state/deposit_entry.rs @@ -3,6 +3,7 @@ use crate::state::{ LockupPeriod, }; use anchor_lang::prelude::*; +use static_assertions::const_assert; /// Bookkeeping for a single deposit for a given mint and lockup schedule. #[zero_copy] diff --git a/programs/voter-stake-registry/src/state/lockup.rs b/programs/voter-stake-registry/src/state/lockup.rs new file mode 100644 index 00000000..8766bf3f --- /dev/null +++ b/programs/voter-stake-registry/src/state/lockup.rs @@ -0,0 +1,279 @@ +use crate::error::*; +use anchor_lang::prelude::*; +use borsh::{BorshDeserialize, BorshSerialize}; +use static_assertions::const_assert; + +/// Seconds in one day. +pub const SECONDS_PER_DAY: u64 = 86_400; + +/// Seconds in cooldown (5 days) +pub const COOLDOWN_SECS: u64 = 86_400 * 5; + +#[zero_copy] +#[derive(Default, Debug)] +pub struct Lockup { + /// Start of the lockup. + pub start_ts: u64, + + /// End of the lockup. + pub end_ts: u64, + + /// End of the cooldown. + pub cooldown_ends_at: u64, + + pub cooldown_requested: bool, + /// Type of lockup. + pub kind: LockupKind, + + /// Type of lockup + pub period: LockupPeriod, + /// Reserved for future use + pub _reserved0: [u8; 16], + /// Padding after period to align the struct size to 8 bytes + pub _reserved1: [u8; 5], +} +const_assert!(std::mem::size_of::() == 3 * 8 + 1 + 1 + 1 + 16 + 5); +const_assert!(std::mem::size_of::() % 8 == 0); + +impl Lockup { + /// Create lockup for a given period + pub fn new(kind: LockupKind, start_ts: u64, period: LockupPeriod) -> Result { + require!( + (kind == LockupKind::None && period == LockupPeriod::None) + || (kind == LockupKind::Constant && period != LockupPeriod::None), + MplStakingError::InvalidLockupKind + ); + + let end_ts = start_ts + .checked_add(period.to_secs()) + .ok_or(MplStakingError::InvalidTimestampArguments)?; + + Ok(Self { + kind, + start_ts, + end_ts, + period, + // 0 means cooldown hasn't been requested + cooldown_ends_at: 0, + cooldown_requested: false, + _reserved0: [0; 16], + _reserved1: [0; 5], + }) + } + + /// True when the lockup is finished. + pub fn expired(&self, curr_ts: u64) -> bool { + self.seconds_left(curr_ts) == 0 + } + + /// Number of seconds left in the lockup. + /// May be more than end_ts-start_ts if curr_ts < start_ts. + pub fn seconds_left(&self, curr_ts: u64) -> u64 { + // if self.kind == LockupKind::Constant{ + // curr_ts = self.start_ts; + // }; + if self.kind == LockupKind::None { + return 0; + } + + if curr_ts >= self.end_ts { + 0 + } else { + self.end_ts - curr_ts + } + } + + /// Returns the number of periods left on the lockup. + /// Returns 0 after lockup has expired and periods_total before start_ts. + pub fn periods_left(&self, curr_ts: u64) -> Result { + let period_secs = self.kind.period_secs(); + if period_secs == 0 { + return Ok(0); + } + if curr_ts < self.start_ts { + return self.periods_total(); + } + Ok(self + .seconds_left(curr_ts) + .checked_add(period_secs.saturating_sub(1)) + .unwrap() + .checked_div(period_secs) + .unwrap()) + } + + /// Returns the current period in the vesting schedule. + /// Will report periods_total() after lockup has expired and 0 before start_ts. + pub fn period_current(&self, curr_ts: u64) -> Result { + Ok(self + .periods_total()? + .saturating_sub(self.periods_left(curr_ts)?)) + } + + /// Returns the total amount of periods in the lockup. + pub fn periods_total(&self) -> Result { + let period_secs = self.kind.period_secs(); + if period_secs == 0 { + return Ok(0); + } + + let lockup_secs = self.seconds_left(self.start_ts); + require_eq!( + lockup_secs % period_secs, + 0, + MplStakingError::InvalidLockupPeriod + ); + + Ok(lockup_secs.checked_div(period_secs).unwrap()) + } + + /// Remove the vesting periods that are now in the past. + pub fn remove_past_periods(&mut self, curr_ts: u64) -> Result<()> { + let periods = self.period_current(curr_ts)?; + let period_secs = self.kind.period_secs(); + self.start_ts = self + .start_ts + .checked_add( + periods + .checked_mul(period_secs) + .ok_or(MplStakingError::InvalidTimestampArguments)?, + ) + .unwrap(); + require_gte!( + self.end_ts, + self.start_ts, + MplStakingError::InternalProgramError + ); + require_eq!( + self.period_current(curr_ts)?, + 0, + MplStakingError::InternalProgramError + ); + Ok(()) + } + + /// Multiplier of the lockup period at the specified timestamp. + /// If the lockup has expired, the multiplier will be as for the Flex period. + /// If the lockup has not started yet, the multiplier will be zero. + /// If the cooldown has been requested, the multiplier will be zero. + /// Otherwise, the multiplier will be the one for the lockup period. + /// The multiplier is used to calculate the weighted stake. + #[inline(always)] + pub fn multiplier(&self, curr_ts: u64) -> u64 { + if curr_ts < self.start_ts || self.cooldown_requested { + return 0; + } + if self.end_ts > curr_ts { + self.period.multiplier() + } else { + LockupPeriod::Flex.multiplier() + } + } +} + +#[derive(BorshDeserialize, BorshSerialize, Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] +pub enum LockupPeriod { + None, + Test, + Flex, + ThreeMonths, + SixMonths, + OneYear, +} + +impl Default for LockupPeriod { + fn default() -> Self { + Self::Flex + } +} + +impl LockupPeriod { + pub fn to_secs(&self) -> u64 { + match self { + LockupPeriod::ThreeMonths => SECONDS_PER_DAY * 90, + LockupPeriod::SixMonths => SECONDS_PER_DAY * 180, + LockupPeriod::OneYear => SECONDS_PER_DAY * 365, + LockupPeriod::Flex => SECONDS_PER_DAY * 5, + LockupPeriod::None => 0, + LockupPeriod::Test => 120, + } + } + + pub fn multiplier(&self) -> u64 { + match self { + LockupPeriod::None => 0, + LockupPeriod::ThreeMonths => 2, + LockupPeriod::SixMonths => 4, + LockupPeriod::OneYear => 6, + LockupPeriod::Flex => 1, + LockupPeriod::Test => 1, + } + } +} + +#[derive(BorshSerialize, BorshDeserialize, Debug, Clone, Copy, PartialEq)] +pub enum LockupKind { + /// No lockup, tokens can be withdrawn as long as not engaged in a proposal. + None, + /// Lock up permanently. The number of days specified becomes the minimum + /// unlock period when the deposit (or a part of it) is changed to None. + Constant, +} + +impl Default for LockupKind { + fn default() -> Self { + Self::Constant + } +} + +impl LockupKind { + /// The lockup length is specified by passing the number of lockup periods + /// to create_deposit_entry. This describes a period's length. + /// + /// For vesting lockups, the period length is also the vesting period. + pub fn period_secs(&self) -> u64 { + match self { + LockupKind::None => 0, + LockupKind::Constant => SECONDS_PER_DAY, // arbitrary choice + } + } + + /// Lockups cannot decrease in strictness + pub fn strictness(&self) -> u8 { + match self { + LockupKind::None => 0, + LockupKind::Constant => 3, + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_lockup_multiplier_not_started() { + let lockup = Lockup::new(LockupKind::Constant, 100, LockupPeriod::ThreeMonths).unwrap(); + assert_eq!(lockup.multiplier(99), 0); + } + + #[test] + fn test_lockup_multiplier_started() { + let lockup = Lockup::new(LockupKind::Constant, 100, LockupPeriod::ThreeMonths).unwrap(); + assert_eq!(lockup.multiplier(100), 2); + } + + #[test] + fn test_lockup_multiplier_expired() { + let period = LockupPeriod::ThreeMonths; + let lockup = Lockup::new(LockupKind::Constant, 100, period).unwrap(); + assert_eq!(lockup.multiplier(200 + period.to_secs()), 1); + } + + #[test] + fn test_lockup_multiplier_cooldown() { + let lockup = Lockup::new(LockupKind::Constant, 100, LockupPeriod::ThreeMonths).unwrap(); + let mut lockup = lockup; + lockup.cooldown_requested = true; + assert_eq!(lockup.multiplier(200), 0); + } +} diff --git a/program-states/src/state/mod.rs b/programs/voter-stake-registry/src/state/mod.rs similarity index 100% rename from program-states/src/state/mod.rs rename to programs/voter-stake-registry/src/state/mod.rs diff --git a/program-states/src/state/registrar.rs b/programs/voter-stake-registry/src/state/registrar.rs similarity index 98% rename from program-states/src/state/registrar.rs rename to programs/voter-stake-registry/src/state/registrar.rs index 7caefe4e..0d13ba62 100644 --- a/program-states/src/state/registrar.rs +++ b/programs/voter-stake-registry/src/state/registrar.rs @@ -64,3 +64,4 @@ macro_rules! registrar_seeds { } pub use registrar_seeds; +use static_assertions::const_assert; diff --git a/program-states/src/state/voter.rs b/programs/voter-stake-registry/src/state/voter.rs similarity index 98% rename from program-states/src/state/voter.rs rename to programs/voter-stake-registry/src/state/voter.rs index 51d25730..b51d796f 100644 --- a/program-states/src/state/voter.rs +++ b/programs/voter-stake-registry/src/state/voter.rs @@ -85,4 +85,5 @@ macro_rules! voter_seeds { }; } +use static_assertions::const_assert; pub use voter_seeds; diff --git a/program-states/src/state/voting_mint_config.rs b/programs/voter-stake-registry/src/state/voting_mint_config.rs similarity index 95% rename from program-states/src/state/voting_mint_config.rs rename to programs/voter-stake-registry/src/state/voting_mint_config.rs index c249853e..a39b3a89 100644 --- a/program-states/src/state/voting_mint_config.rs +++ b/programs/voter-stake-registry/src/state/voting_mint_config.rs @@ -1,4 +1,5 @@ use anchor_lang::prelude::*; +use static_assertions::const_assert; /// Exchange rate for an asset that can be used to mint voting rights. /// diff --git a/programs/voter-stake-registry/src/voter.rs b/programs/voter-stake-registry/src/voter.rs index e9eeb668..9aa67253 100644 --- a/programs/voter-stake-registry/src/voter.rs +++ b/programs/voter-stake-registry/src/voter.rs @@ -1,6 +1,6 @@ use crate::vote_weight_record; +use crate::{error::MplStakingError, state::Registrar}; use anchor_lang::prelude::*; -use mplx_staking_states::{error::MplStakingError, state::Registrar}; use spl_governance::state::token_owner_record; pub fn load_token_owner_record( diff --git a/programs/voter-stake-registry/tests/program_test/addin.rs b/programs/voter-stake-registry/tests/program_test/addin.rs index e91ae01e..9b2cf71b 100644 --- a/programs/voter-stake-registry/tests/program_test/addin.rs +++ b/programs/voter-stake-registry/tests/program_test/addin.rs @@ -1,5 +1,5 @@ use crate::*; -use mplx_staking_states::state::Voter; +use mpl_staking::state::Voter; use solana_sdk::{ instruction::Instruction, pubkey::Pubkey, diff --git a/programs/voter-stake-registry/tests/program_test/rewards.rs b/programs/voter-stake-registry/tests/program_test/rewards.rs index 620ce765..81910279 100644 --- a/programs/voter-stake-registry/tests/program_test/rewards.rs +++ b/programs/voter-stake-registry/tests/program_test/rewards.rs @@ -1,7 +1,7 @@ use crate::SolanaCookie; use anchor_lang::{prelude::*, AnchorDeserialize}; use mpl_staking::cpi_instructions::RewardsInstruction; -use mplx_staking_states::state::LockupPeriod; +use mpl_staking::state::LockupPeriod; use solana_program_test::*; use solana_sdk::{ instruction::{AccountMeta, Instruction}, diff --git a/programs/voter-stake-registry/tests/program_test/utils.rs b/programs/voter-stake-registry/tests/program_test/utils.rs index 381a7c65..4f8bc16f 100644 --- a/programs/voter-stake-registry/tests/program_test/utils.rs +++ b/programs/voter-stake-registry/tests/program_test/utils.rs @@ -108,7 +108,7 @@ pub async fn advance_clock_by_ts(context: &mut ProgramTestContext, ts: i64) { pub mod assert_custom_on_chain_error { use super::*; - use mplx_staking_states::error::MplStakingError; + use mpl_staking::error::MplStakingError; use std::fmt::Debug; pub trait AssertCustomOnChainErr { diff --git a/programs/voter-stake-registry/tests/test_all_deposits.rs b/programs/voter-stake-registry/tests/test_all_deposits.rs index c6c4bc18..96a29aa8 100644 --- a/programs/voter-stake-registry/tests/test_all_deposits.rs +++ b/programs/voter-stake-registry/tests/test_all_deposits.rs @@ -1,5 +1,5 @@ use anchor_spl::token::TokenAccount; -use mplx_staking_states::state::{LockupKind, LockupPeriod}; +use mpl_staking::state::{LockupKind, LockupPeriod}; use program_test::*; use solana_program_test::*; use solana_sdk::{signature::Keypair, signer::Signer, transport::TransportError}; diff --git a/programs/voter-stake-registry/tests/test_basic.rs b/programs/voter-stake-registry/tests/test_basic.rs index 23081ae5..e8eb7de8 100644 --- a/programs/voter-stake-registry/tests/test_basic.rs +++ b/programs/voter-stake-registry/tests/test_basic.rs @@ -1,6 +1,6 @@ use anchor_spl::token::TokenAccount; use assert_custom_on_chain_error::AssertCustomOnChainErr; -use mplx_staking_states::{ +use mpl_staking::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; diff --git a/programs/voter-stake-registry/tests/test_change_delegate.rs b/programs/voter-stake-registry/tests/test_change_delegate.rs index 68d29955..86c9408b 100644 --- a/programs/voter-stake-registry/tests/test_change_delegate.rs +++ b/programs/voter-stake-registry/tests/test_change_delegate.rs @@ -1,6 +1,6 @@ use anchor_spl::token::TokenAccount; use assert_custom_on_chain_error::AssertCustomOnChainErr; -use mplx_staking_states::{ +use mpl_staking::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; diff --git a/programs/voter-stake-registry/tests/test_claim.rs b/programs/voter-stake-registry/tests/test_claim.rs index ae8bf734..64c63853 100644 --- a/programs/voter-stake-registry/tests/test_claim.rs +++ b/programs/voter-stake-registry/tests/test_claim.rs @@ -1,5 +1,5 @@ use anchor_spl::token::TokenAccount; -use mplx_staking_states::state::{LockupKind, LockupPeriod}; +use mpl_staking::state::{LockupKind, LockupPeriod}; use program_test::*; use solana_program::pubkey::Pubkey; use solana_program_test::*; diff --git a/programs/voter-stake-registry/tests/test_deposit_constant.rs b/programs/voter-stake-registry/tests/test_deposit_constant.rs index d9961078..3919eaa2 100644 --- a/programs/voter-stake-registry/tests/test_deposit_constant.rs +++ b/programs/voter-stake-registry/tests/test_deposit_constant.rs @@ -1,6 +1,6 @@ use anchor_spl::token::TokenAccount; use assert_custom_on_chain_error::AssertCustomOnChainErr; -use mplx_staking_states::{ +use mpl_staking::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; diff --git a/programs/voter-stake-registry/tests/test_deposit_no_locking.rs b/programs/voter-stake-registry/tests/test_deposit_no_locking.rs index 08cbb607..25e93d79 100644 --- a/programs/voter-stake-registry/tests/test_deposit_no_locking.rs +++ b/programs/voter-stake-registry/tests/test_deposit_no_locking.rs @@ -1,6 +1,6 @@ use anchor_spl::token::TokenAccount; use assert_custom_on_chain_error::AssertCustomOnChainErr; -use mplx_staking_states::{ +use mpl_staking::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; diff --git a/programs/voter-stake-registry/tests/test_extend_deposit.rs b/programs/voter-stake-registry/tests/test_extend_deposit.rs index 58f1e0a7..993e4724 100644 --- a/programs/voter-stake-registry/tests/test_extend_deposit.rs +++ b/programs/voter-stake-registry/tests/test_extend_deposit.rs @@ -1,6 +1,6 @@ use anchor_spl::token::TokenAccount; use assert_custom_on_chain_error::AssertCustomOnChainErr; -use mplx_staking_states::{ +use mpl_staking::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; diff --git a/programs/voter-stake-registry/tests/test_lockup.rs b/programs/voter-stake-registry/tests/test_lockup.rs index bafcde88..d2d9f7b7 100644 --- a/programs/voter-stake-registry/tests/test_lockup.rs +++ b/programs/voter-stake-registry/tests/test_lockup.rs @@ -1,6 +1,6 @@ use anchor_spl::token::TokenAccount; use assert_custom_on_chain_error::AssertCustomOnChainErr; -use mplx_staking_states::{ +use mpl_staking::{ error::MplStakingError, state::{LockupKind, LockupPeriod}, }; diff --git a/programs/voter-stake-registry/tests/test_log_voter_info.rs b/programs/voter-stake-registry/tests/test_log_voter_info.rs index 31cce0f3..d2fb35e5 100644 --- a/programs/voter-stake-registry/tests/test_log_voter_info.rs +++ b/programs/voter-stake-registry/tests/test_log_voter_info.rs @@ -1,5 +1,5 @@ use anchor_spl::token::TokenAccount; -use mplx_staking_states::state::{LockupKind, LockupPeriod}; +use mpl_staking::state::{LockupKind, LockupPeriod}; use program_test::*; use solana_program_test::*; use solana_sdk::{signature::Keypair, signer::Signer, transport::TransportError}; diff --git a/programs/voter-stake-registry/tests/test_stake.rs b/programs/voter-stake-registry/tests/test_stake.rs index 2709aa8d..5da3b06b 100644 --- a/programs/voter-stake-registry/tests/test_stake.rs +++ b/programs/voter-stake-registry/tests/test_stake.rs @@ -1,5 +1,5 @@ use anchor_spl::token::TokenAccount; -use mplx_staking_states::state::{LockupKind, LockupPeriod}; +use mpl_staking::state::{LockupKind, LockupPeriod}; use program_test::*; use solana_program_test::*; use solana_sdk::{signature::Keypair, signer::Signer, transport::TransportError}; diff --git a/programs/voter-stake-registry/tests/test_voting.rs b/programs/voter-stake-registry/tests/test_voting.rs index 48d0d5fd..334f229a 100644 --- a/programs/voter-stake-registry/tests/test_voting.rs +++ b/programs/voter-stake-registry/tests/test_voting.rs @@ -1,5 +1,5 @@ use anchor_spl::token::TokenAccount; -use mplx_staking_states::state::{LockupKind, LockupPeriod}; +use mpl_staking::state::{LockupKind, LockupPeriod}; use program_test::*; use solana_program_test::*; use solana_sdk::{signature::Keypair, signer::Signer, transport::TransportError};