diff --git a/Anchor.toml b/Anchor.toml index 160bcf5a..28d502bb 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -1,4 +1,4 @@ -anchor_version = "0.24.2" +anchor_version = "0.26.0" solana_version = "1.10.39" [features] diff --git a/Cargo.lock b/Cargo.lock index 0e7e3ebf..48afa14e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,6 +2,42 @@ # 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 0.3.0", + "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 0.3.0", + "ctr", + "polyval", + "subtle", + "zeroize", +] + [[package]] name = "ahash" version = "0.7.6" @@ -24,9 +60,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9b75d05b6b4ac9d95bb6e3b786b27d3a708c4c5a87c92ffaa25bbe9ae4c5d91" +checksum = "cf7d535e1381be3de2c0716c0a1c1e32ad9df1042cddcf7bc18d743569e53319" dependencies = [ "anchor-syn", "anyhow", @@ -38,9 +74,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "485351a6d8157750d10d88c8e256f1bf8339262b2220ae9125aed3471309b5de" +checksum = "c3bcd731f21048a032be27c7791701120e44f3f6371358fc4261a7f716283d29" dependencies = [ "anchor-syn", "anyhow", @@ -53,9 +89,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc632c540913dd051a78b00587cc47f57013d303163ddfaf4fa18717f7ccc1e0" +checksum = "e1be64a48e395fe00b8217287f226078be2cf32dae42fdf8a885b997945c3d28" dependencies = [ "anchor-syn", "proc-macro2", @@ -64,9 +100,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b5bd1dcfa7f3bc22dacef233d70a9e0bee269c4ac484510662f257cba2353a1" +checksum = "38ea6713d1938c0da03656ff8a693b17dc0396da66d1ba320557f07e86eca0d4" dependencies = [ "anchor-syn", "proc-macro2", @@ -76,9 +112,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c6f9e6ce551ac9a177a45c99a65699a860c9e95fac68675138af1246e2591b0" +checksum = "d401f11efb3644285685f8339829a9786d43ed7490bb1699f33c478d04d5a582" dependencies = [ "anchor-syn", "anyhow", @@ -89,9 +125,9 @@ dependencies = [ [[package]] name = "anchor-attribute-interface" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d104aa17418cb329ed7418b227e083d5f326a27f26ce98f5d92e33da62a5f459" +checksum = "c6700a6f5c888a9c33fe8afc0c64fd8575fa28d05446037306d0f96102ae4480" dependencies = [ "anchor-syn", "anyhow", @@ -103,9 +139,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6831b920b173c004ddf7ae1167d1d25e9f002ffcb1773bbc5c7ce532a4441e1" +checksum = "6ad769993b5266714e8939e47fbdede90e5c030333c7522d99a4d4748cf26712" dependencies = [ "anchor-syn", "anyhow", @@ -116,9 +152,9 @@ dependencies = [ [[package]] name = "anchor-attribute-state" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cde147b10c71d95dc679785db0b5f3abac0091f789167aa62ac0135e2f54e8b9" +checksum = "4e677fae4a016a554acdd0e3b7f178d3acafaa7e7ffac6b8690cf4e171f1c116" dependencies = [ "anchor-syn", "anyhow", @@ -129,9 +165,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cde98a0e1a56046b040ff591dfda391f88917af2b6487d02b45093c05be3514" +checksum = "340beef6809d1c3fcc7ae219153d981e95a8a277ff31985bd7050e32645dc9a8" dependencies = [ "anchor-syn", "anyhow", @@ -142,9 +178,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a85dd2c5e29e20c7f4701a43724d6cd5406d0ee5694705522e43da0f26542a84" +checksum = "662ceafe667448ee4199a4be2ee83b6bb76da28566eee5cea05f96ab38255af8" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -166,9 +202,9 @@ dependencies = [ [[package]] name = "anchor-spl" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0188c33b4a3c124c4e593f2b440415aaea70a7650fac6ba0772395385d71c003" +checksum = "f32390ce8356f54c0f0245ea156f8190717e37285b8bf4f406a613dc4b954cde" dependencies = [ "anchor-lang", "solana-program", @@ -178,9 +214,9 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.24.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03549dc2eae0b20beba6333b14520e511822a6321cdb1760f841064a69347316" +checksum = "0418bcb5daac3b8cb1b60d8fdb1d468ca36f5509f31fb51179326fae1028fdcc" dependencies = [ "anyhow", "bs58 0.3.1", @@ -190,7 +226,7 @@ dependencies = [ "quote", "serde", "serde_json", - "sha2", + "sha2 0.9.9", "syn", "thiserror", ] @@ -213,13 +249,19 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8da52d66c7071e2e3fa2a1e5c6d088fec47b593032b254f5e980de8ea54454d6" +[[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", + "hermit-abi 0.1.19", "libc", "winapi", ] @@ -272,6 +314,15 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" +[[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.3.1" @@ -283,7 +334,7 @@ dependencies = [ "cc", "cfg-if", "constant_time_eq", - "digest 0.10.3", + "digest 0.10.6", ] [[package]] @@ -327,7 +378,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15bf3650200d8bffa99015595e10f1fbd17de07abbc25bb067da79e769939bfa" dependencies = [ "borsh-derive 0.9.3", - "hashbrown", + "hashbrown 0.11.2", ] [[package]] @@ -464,18 +515,18 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.9.1" +version = "1.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdead85bdec19c194affaeeb670c0e41fe23de31459efd1c174d049269cf02cc" +checksum = "c041d3eab048880cb0b86b256447da3f18859a163c3b8d8893f4e6368abe6393" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.1.0" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "562e382481975bc61d11275ac5e62a19abd00b0547d99516a415336f183dcd0e" +checksum = "1aca418a974d83d40a0c1f0c5cba6ff4bc28d8df099109ca459a2118d40b6322" dependencies = [ "proc-macro2", "quote", @@ -493,6 +544,9 @@ name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -500,6 +554,35 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +[[package]] +name = "chrono" +version = "0.4.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" +dependencies = [ + "num-integer", + "num-traits", +] + +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + +[[package]] +name = "cipher" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d1873270f8f7942c191139cb8a40fd228da6c3fd2fc376d7e92d47aa14aeb59e" +dependencies = [ + "crypto-common", + "inout", +] + [[package]] name = "console_error_panic_hook" version = "0.1.7" @@ -535,6 +618,49 @@ dependencies = [ "libc", ] +[[package]] +name = "crossbeam-channel" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c2dd04ddaf88237dc3b8d8f9a3c1004b506b54b3313403944054d23c0870c521" +dependencies = [ + "cfg-if", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-deque" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "715e8152b692bba2d374b53d4875445368fdf21a94751410af607a5ac677d1fc" +dependencies = [ + "cfg-if", + "crossbeam-epoch", + "crossbeam-utils", +] + +[[package]] +name = "crossbeam-epoch" +version = "0.9.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "01a9af1f4c2ef74bb8aa1f7e19706bc72d03598c8a570bb5de72243c7a9d9d5a" +dependencies = [ + "autocfg", + "cfg-if", + "crossbeam-utils", + "memoffset 0.7.1", + "scopeguard", +] + +[[package]] +name = "crossbeam-utils" +version = "0.8.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" +dependencies = [ + "cfg-if", +] + [[package]] name = "crunchy" version = "0.2.2" @@ -561,6 +687,15 @@ dependencies = [ "subtle", ] +[[package]] +name = "ctr" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "049bb91fb4aaf0e3c7efa6cd5ef877dbbbd15b39dad06d9948de4ec8a75761ea" +dependencies = [ + "cipher 0.3.0", +] + [[package]] name = "curve25519-dalek" version = "3.2.1" @@ -570,10 +705,17 @@ dependencies = [ "byteorder", "digest 0.9.0", "rand_core 0.5.1", + "serde", "subtle", "zeroize", ] +[[package]] +name = "derivation-path" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e5c37193a1db1d8ed868c03ec7b152175f26160a5b740e5e484143877e0adf0" + [[package]] name = "digest" version = "0.9.0" @@ -585,20 +727,55 @@ dependencies = [ [[package]] name = "digest" -version = "0.10.3" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2fb860ca6fafa5552fb6d0e816a69c8e49f0908bf524e30a90d97c85892d506" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer 0.10.2", "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.6", +] + [[package]] name = "either" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "env_logger" @@ -665,8 +842,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if", + "js-sys", "libc", "wasi 0.10.2+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] @@ -678,6 +857,15 @@ dependencies = [ "ahash", ] +[[package]] +name = "hashbrown" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +dependencies = [ + "ahash", +] + [[package]] name = "heck" version = "0.3.3" @@ -697,10 +885,13 @@ dependencies = [ ] [[package]] -name = "hex" -version = "0.4.3" +name = "hermit-abi" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] [[package]] name = "hmac" @@ -712,6 +903,15 @@ dependencies = [ "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.6", +] + [[package]] name = "hmac-drbg" version = "0.3.0" @@ -720,7 +920,7 @@ checksum = "17ea0a1394df5b6574da6e0c1ade9e78868c9fb0a4e5ef4428e32da4676b85b1" dependencies = [ "digest 0.9.0", "generic-array", - "hmac", + "hmac 0.8.1", ] [[package]] @@ -729,6 +929,31 @@ version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" +[[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.3", + "rand_xoshiro", + "rayon", + "serde", + "sized-chunks", + "typenum", + "version_check", +] + +[[package]] +name = "inout" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" +dependencies = [ + "generic-array", +] + [[package]] name = "instant" version = "0.1.12" @@ -753,11 +978,20 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +[[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + [[package]] name = "js-sys" -version = "0.3.57" +version = "0.3.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "671a26f820db17c2a2750743f1dd03bafd15b98c9f30c7c2628c024c05d73397" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" dependencies = [ "wasm-bindgen", ] @@ -776,9 +1010,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.123" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb691a747a7ab48abc15c5b42066eaafde10dc427e3b6ee2a1cf43db04c763bd" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libsecp256k1" @@ -795,7 +1029,7 @@ dependencies = [ "libsecp256k1-gen-genmult", "rand 0.7.3", "serde", - "sha2", + "sha2 0.9.9", "typenum", ] @@ -840,9 +1074,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.16" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6389c490849ff5bc16be905ae24bc913a9c8892e19b2341dbc175e14c341c2b8" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if", ] @@ -862,6 +1096,36 @@ dependencies = [ "libc", ] +[[package]] +name = "memoffset" +version = "0.6.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aa361d4faea93603064a027415f07bd8e1d5c88c9fbf68bf56a285428fd79ce" +dependencies = [ + "autocfg", +] + +[[package]] +name = "memoffset" +version = "0.7.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5de893c32cde5f383baa4c04c5d6dbdd735cfd4a794b0debdb2bb1b421da5ff4" +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.3", + "zeroize", +] + [[package]] name = "num-derive" version = "0.3.3" @@ -873,6 +1137,16 @@ dependencies = [ "syn", ] +[[package]] +name = "num-integer" +version = "0.1.45" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" +dependencies = [ + "autocfg", + "num-traits", +] + [[package]] name = "num-traits" version = "0.2.14" @@ -882,6 +1156,16 @@ dependencies = [ "autocfg", ] +[[package]] +name = "num_cpus" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" +dependencies = [ + "hermit-abi 0.2.6", + "libc", +] + [[package]] name = "num_enum" version = "0.5.7" @@ -905,9 +1189,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.10.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f3e037eac156d1775da914196f0f37741a274155e34a0b7e427c35d2a2ecb9" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "opaque-debug" @@ -917,27 +1201,61 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" dependencies = [ "cfg-if", - "instant", "libc", "redox_syscall", "smallvec", - "winapi", + "windows-sys", +] + +[[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.6", +] + +[[package]] +name = "percent-encoding" +version = "2.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" + +[[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]] @@ -967,11 +1285,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.37" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec757218438d5fda206afc041538b2f6d889286160d649a86a24d37e1235afd1" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1007,6 +1325,15 @@ dependencies = [ "tempfile", ] +[[package]] +name = "qstring" +version = "0.7.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" +dependencies = [ + "percent-encoding", +] + [[package]] name = "quarry-merge-mine" version = "5.3.0" @@ -1032,7 +1359,6 @@ dependencies = [ "rand 0.8.5", "solana-security-txt", "spl-math", - "u128", "vipers", ] @@ -1178,6 +1504,37 @@ dependencies = [ "rand_core 0.6.3", ] +[[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.3", +] + +[[package]] +name = "rayon" +version = "1.6.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6db3a213adf02b3bcfd2d3846bb41cb22857d131789e01df434fb7e7bc0759b7" +dependencies = [ + "either", + "rayon-core", +] + +[[package]] +name = "rayon-core" +version = "1.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "356a0625f1954f730c0201cdab48611198dc6ce21f4acff55089b5a78e6e835b" +dependencies = [ + "crossbeam-channel", + "crossbeam-deque", + "crossbeam-utils", + "num_cpus", +] + [[package]] name = "redox_syscall" version = "0.2.13" @@ -1213,6 +1570,12 @@ dependencies = [ "winapi", ] +[[package]] +name = "rustc-hash" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" + [[package]] name = "rustc-hex" version = "2.1.0" @@ -1230,9 +1593,9 @@ dependencies = [ [[package]] name = "rustversion" -version = "1.0.6" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2cc38e8fa666e2de3c4aba7edeb5ffc5246c1c2ed0e3d17e560aeeba736b23f" +checksum = "5583e89e108996506031660fe09baa5011b9dd0341b89029313006d1fb508d70" [[package]] name = "rusty-fork" @@ -1266,9 +1629,9 @@ checksum = "d65bd28f48be7196d222d95b9243287f48d27aca604e08497513019ff0502cc4" [[package]] name = "serde" -version = "1.0.136" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce31e24b01e1e524df96f1c2fdd054405f8d7376249a5110886fb4b658484789" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] @@ -1284,9 +1647,9 @@ dependencies = [ [[package]] name = "serde_derive" -version = "1.0.136" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08597e7152fcd306f41838ed3e37be9eaeed2b61c42e2117266a554fab4662f9" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", @@ -1295,9 +1658,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.79" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e8d9fa5c3b304765ce1fd9c4c8a3de2c8db365a5b91be52f186efc675681d95" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ "itoa", "ryu", @@ -1317,6 +1680,17 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if", + "cpufeatures", + "digest 0.10.6", +] + [[package]] name = "sha3" version = "0.9.1" @@ -1329,6 +1703,32 @@ dependencies = [ "opaque-debug", ] +[[package]] +name = "sha3" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bdf0c33fae925bdc080598b84bc15c55e7b9a4a43b3c704da051f977469691c9" +dependencies = [ + "digest 0.10.6", + "keccak", +] + +[[package]] +name = "signature" +version = "1.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "74233d3b3b2f6d4b006dc19dee745e73e2a6bfb6f93607cd3b02bd5b00797d7c" + +[[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.8.0" @@ -1337,29 +1737,43 @@ checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "solana-frozen-abi" -version = "1.9.16" +version = "1.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8db0d37f7c345c6417898e675d218d76a1ce6d3bd57584d7f463d48badf1541" +checksum = "f44a019070a6cec4d3ad8605c5caa65bdaa13f00b5f1849340f44ffea63b625b" dependencies = [ + "ahash", + "blake3", + "block-buffer 0.9.0", "bs58 0.4.0", "bv", + "byteorder", + "cc", + "either", "generic-array", + "getrandom 0.1.16", + "hashbrown 0.12.3", + "im", + "lazy_static", "log", "memmap2", + "once_cell", + "rand_core 0.6.3", "rustc_version", "serde", + "serde_bytes", "serde_derive", - "sha2", + "serde_json", + "sha2 0.10.6", "solana-frozen-abi-macro", - "solana-logger", + "subtle", "thiserror", ] [[package]] name = "solana-frozen-abi-macro" -version = "1.9.16" +version = "1.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "023560984c7f16a53e280866c177d1ad45225614356224c1ade671de16424466" +checksum = "be23cc7a382f54dfe1348edb94610e5cc146b8eb21563cdd04062a403c75ba62" dependencies = [ "proc-macro2", "quote", @@ -1369,9 +1783,9 @@ dependencies = [ [[package]] name = "solana-logger" -version = "1.9.16" +version = "1.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57cb0a4ef4dd740397addf5fa50d9dff572371fd47df2bdecc5fb530546490e2" +checksum = "447d16a70a1b5383736ef44801050c0e1affd022303b22ed899352f958c2de4b" dependencies = [ "env_logger", "lazy_static", @@ -1380,9 +1794,9 @@ dependencies = [ [[package]] name = "solana-program" -version = "1.9.16" +version = "1.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9654224bf5d4c6d80f68c3c996683b389693af1c69103af667c683180bad6c5e" +checksum = "d0937481f080f5dd495fae456c94718a7bacf30fb5fdabb02dcb8a9622e446d5" dependencies = [ "base64 0.13.0", "bincode", @@ -1393,39 +1807,96 @@ dependencies = [ "bs58 0.4.0", "bv", "bytemuck", + "cc", "console_error_panic_hook", "console_log", "curve25519-dalek", - "getrandom 0.1.16", + "getrandom 0.2.6", "itertools", "js-sys", "lazy_static", + "libc", "libsecp256k1", "log", + "memoffset 0.6.5", "num-derive", "num-traits", "parking_lot", "rand 0.7.3", + "rand_chacha 0.2.2", + "rustc_version", + "rustversion", + "serde", + "serde_bytes", + "serde_derive", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", + "solana-frozen-abi", + "solana-frozen-abi-macro", + "solana-sdk-macro", + "thiserror", + "tiny-bip39", + "wasm-bindgen", + "zeroize", +] + +[[package]] +name = "solana-sdk" +version = "1.14.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "390e7481c56dda2ceab2652beeda30a533e9667b34861a2eb4eec92fa1d826d7" +dependencies = [ + "assert_matches", + "base64 0.13.0", + "bincode", + "bitflags", + "borsh 0.9.3", + "bs58 0.4.0", + "bytemuck", + "byteorder", + "chrono", + "derivation-path", + "digest 0.10.6", + "ed25519-dalek", + "ed25519-dalek-bip32", + "generic-array", + "hmac 0.12.1", + "itertools", + "js-sys", + "lazy_static", + "libsecp256k1", + "log", + "memmap2", + "num-derive", + "num-traits", + "pbkdf2 0.11.0", + "qstring", + "rand 0.7.3", + "rand_chacha 0.2.2", "rustc_version", "rustversion", "serde", "serde_bytes", "serde_derive", - "sha2", - "sha3", + "serde_json", + "sha2 0.10.6", + "sha3 0.10.6", "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.9.16" +version = "1.14.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bac8cb60eb2e4c85d76ea1f0429dfc0e8b4ba7834e9d69695bb3164f3966e16d" +checksum = "33d0acbad862093ea123f3a27364336dcb0c8373522cd6810496a34e932c56c1" dependencies = [ "bs58 0.4.0", "proc-macro2", @@ -1440,14 +1911,51 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f14189df19df7f3977a7ea236ccae6cdc40855ab5baf1ab2796a091ef5c490d1" +[[package]] +name = "solana-zk-token-sdk" +version = "1.14.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cebca4083e982ae01583d1a590c4d679e6f648a4761364ddfb43026d2c433142" +dependencies = [ + "aes-gcm-siv", + "arrayref", + "base64 0.13.0", + "bincode", + "bytemuck", + "byteorder", + "cipher 0.4.3", + "curve25519-dalek", + "getrandom 0.1.16", + "itertools", + "lazy_static", + "merlin", + "num-derive", + "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.0.3" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "393e2240d521c3dd770806bff25c2c00d761ac962be106e14e22dd912007f428" +checksum = "fbc000f0fdf1f12f99d77d398137c1751345b18c88258ce0f99b7872cf6c9bd6" dependencies = [ + "assert_matches", + "borsh 0.9.3", + "num-derive", + "num-traits", "solana-program", "spl-token", + "spl-token-2022", + "thiserror", ] [[package]] @@ -1462,16 +1970,26 @@ dependencies = [ "num-traits", "solana-program", "thiserror", - "uint 0.8.5", + "uint", +] + +[[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.3.0" +version = "3.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc67166ef99d10c18cb5e9c208901e6d8255c6513bb1f877977eba48e6cc4fb" +checksum = "8e85e168a785e82564160dcb87b2a8e04cee9bfd1f4d488c729d53d6a4bd300d" dependencies = [ "arrayref", + "bytemuck", "num-derive", "num-traits", "num_enum", @@ -1479,6 +1997,24 @@ dependencies = [ "thiserror", ] +[[package]] +name = "spl-token-2022" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0edb869dbe159b018f17fb9bfa67118c30f232d7f54a73742bc96794dff77ed8" +dependencies = [ + "arrayref", + "bytemuck", + "num-derive", + "num-traits", + "num_enum", + "solana-program", + "solana-zk-token-sdk", + "spl-memo", + "spl-token", + "thiserror", +] + [[package]] name = "static_assertions" version = "1.1.0" @@ -1493,12 +2029,24 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.91" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b683b2b825c8eef438b77c36a06dc262294da3d5a5813fac20da149241dcd44d" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", + "unicode-ident", +] + +[[package]] +name = "synstructure" +version = "0.12.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" +dependencies = [ + "proc-macro2", + "quote", + "syn", "unicode-xid", ] @@ -1545,6 +2093,40 @@ dependencies = [ "syn", ] +[[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.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + [[package]] name = "toml" version = "0.5.9" @@ -1560,15 +2142,6 @@ version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "u128" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba924bf1e6b59ea8f1bbb8c7c5998fbc22c6a544e34446ee336f693ea86ccef3" -dependencies = [ - "uint 0.9.1", -] - [[package]] name = "uint" version = "0.8.5" @@ -1582,15 +2155,18 @@ dependencies = [ ] [[package]] -name = "uint" -version = "0.9.1" +name = "unicode-ident" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6470ab50f482bde894a037a57064480a246dbfdd5960bd65a44824693f08da5f" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" + +[[package]] +name = "unicode-normalization" +version = "0.1.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ - "byteorder", - "crunchy", - "hex", - "static_assertions", + "tinyvec", ] [[package]] @@ -1605,6 +2181,26 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +[[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" @@ -1613,9 +2209,8 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "vipers" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "019772b1823410a5abae49ce818d9f2c6a40f185a4543bddcc4cfa0efbe76528" +version = "2.0.6" +source = "git+ssh://git@github.com/bridgesplit/vipers.git#703203ff8d8609e39c0eb18de5f00bcf5cc21c84" dependencies = [ "anchor-lang", "anchor-spl", @@ -1645,9 +2240,9 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-bindgen" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27370197c907c55e3f1a9fbe26f44e937fe6451368324e009cba39e139dc08ad" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ "cfg-if", "wasm-bindgen-macro", @@ -1655,13 +2250,13 @@ dependencies = [ [[package]] name = "wasm-bindgen-backend" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e04185bfa3a779273da532f5025e33398409573f348985af9a1cbf3774d3f4" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", "syn", @@ -1670,9 +2265,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17cae7ff784d7e83a2fe7611cfe766ecf034111b49deb850a3dc7699c08251f5" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1680,9 +2275,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99ec0dc7a4756fffc231aab1b9f2f578d23cd391390ab27f952ae0c9b3ece20b" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" dependencies = [ "proc-macro2", "quote", @@ -1693,9 +2288,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.80" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d554b7f530dee5964d9a9468d95c1f8b8acae4f282807e7d27d4b03099a46744" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "web-sys" @@ -1738,6 +2333,63 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" + +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" + +[[package]] +name = "windows_i686_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" + +[[package]] +name = "windows_i686_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" + [[package]] name = "yansi" version = "0.5.1" @@ -1749,3 +2401,18 @@ 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.3.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44bf07cb3e50ea2003396695d58bf46bc9887a1f362260446fad6bc4e79bd36c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "synstructure", +] diff --git a/programs/quarry-merge-mine/Cargo.toml b/programs/quarry-merge-mine/Cargo.toml index 84314e29..fed7d237 100644 --- a/programs/quarry-merge-mine/Cargo.toml +++ b/programs/quarry-merge-mine/Cargo.toml @@ -20,12 +20,13 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = ">=0.22, <=0.25" -anchor-spl = ">=0.22, <=0.25" +anchor-lang = "0.26.0" +anchor-spl = "0.26.0" quarry-mine = { path = "../quarry-mine", features = ["cpi"], version = "5.3.0" } quarry-mint-wrapper = { path = "../quarry-mint-wrapper", features = [ "cpi" ], version = "5.3.0" } num-traits = "0.2" solana-security-txt = "1.0.1" -vipers = "^2.0" +vipers = { git="ssh://git@github.com/bridgesplit/vipers.git"} + diff --git a/programs/quarry-mine/Cargo.toml b/programs/quarry-mine/Cargo.toml index 77067427..cc7404e1 100644 --- a/programs/quarry-mine/Cargo.toml +++ b/programs/quarry-mine/Cargo.toml @@ -21,16 +21,15 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = ">=0.22, <=0.25" -anchor-spl = ">=0.22, <=0.25" +anchor-lang = "0.26" +anchor-spl = "0.26" num-traits = "0.2.14" quarry-mint-wrapper = { path = "../quarry-mint-wrapper", features = [ "cpi" ], version = "5.3.0" } solana-security-txt = "1.0.1" spl-math = { version = "0.1.0", features = ["no-entrypoint"] } -u128 = "0.1.0" -vipers = "^2.0" +vipers = { git="ssh://git@github.com/bridgesplit/vipers.git"} [dev-dependencies] proptest = { version = "1.0" } diff --git a/programs/quarry-mine/src/instructions/claim_rewards.rs b/programs/quarry-mine/src/instructions/claim_rewards.rs index 84b37c2f..a9e88e34 100644 --- a/programs/quarry-mine/src/instructions/claim_rewards.rs +++ b/programs/quarry-mine/src/instructions/claim_rewards.rs @@ -28,11 +28,7 @@ impl<'info> ClaimRewards<'info> { max_claim_fee_millibps < MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS, InvalidMaxClaimFee ); - let max_claim_fee = unwrap_int!(::u128::mul_div_u64( - amount_claimable, - max_claim_fee_millibps, - MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS - )); + let max_claim_fee = (amount_claimable.checked_mul(max_claim_fee_millibps).unwrap_or(0)).checked_div(MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS).unwrap_or(1); let amount_claimable_minus_fees = unwrap_int!(amount_claimable.checked_sub(max_claim_fee)); diff --git a/programs/quarry-mine/src/instructions/claim_rewards_v2.rs b/programs/quarry-mine/src/instructions/claim_rewards_v2.rs index 875b7a13..a8c40431 100644 --- a/programs/quarry-mine/src/instructions/claim_rewards_v2.rs +++ b/programs/quarry-mine/src/instructions/claim_rewards_v2.rs @@ -28,13 +28,9 @@ impl<'info> ClaimRewardsV2<'info> { max_claim_fee_millibps < MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS, InvalidMaxClaimFee ); - let max_claim_fee = unwrap_int!(::u128::mul_div_u64( - amount_claimable, - max_claim_fee_millibps, - MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS - )); + let max_claim_fee = (amount_claimable * max_claim_fee_millibps) /MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS; - let amount_claimable_minus_fees = unwrap_int!(amount_claimable.checked_sub(max_claim_fee)); + let amount_claimable_minus_fees = amount_claimable.checked_sub(max_claim_fee).unwrap_or(0); // Claim all rewards. miner.rewards_earned = 0; diff --git a/programs/quarry-mine/src/rewarder.rs b/programs/quarry-mine/src/rewarder.rs index f7f9e0d0..9224f4f5 100644 --- a/programs/quarry-mine/src/rewarder.rs +++ b/programs/quarry-mine/src/rewarder.rs @@ -4,6 +4,12 @@ use anchor_lang::prelude::*; use num_traits::ToPrimitive; use spl_math::uint::U192; use vipers::prelude::*; +use crate::DEFAULT_CLAIM_FEE_MILLIBPS; +use crate::MAX_BPS; +use crate::ClaimEvent; +use crate::TokenAccount; +use crate::instructions::ClaimRewards; +use crate::ErrorCode::*; use crate::Rewarder; @@ -42,6 +48,97 @@ impl Rewarder { } } +// impl<'info> ClaimRewards<'info> { +// /// Calculates rewards and claims them. +// pub fn calculate_and_claim_rewards(&mut self) -> Result<()> { +// let miner = &mut self.stake.miner; + +// let miner_rewards = miner.rewards_earned; +// let hard_cap = self.mint_wrapper.hard_cap; +// let amount_claimable = std::cmp::min(miner_rewards, hard_cap); + +// if amount_claimable == 0 { +// // 0 claimable -- skip all logic +// return Ok(()); +// } + +// // Calculate rewards +// let max_claim_fee_millibps = self.stake.rewarder.max_claim_fee_millibps; +// invariant!( +// max_claim_fee_millibps < MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS, +// InvalidMaxClaimFee +// ); +// let max_claim_fee = unwrap_int!((amount_claimable as u128) +// .checked_mul(max_claim_fee_millibps.into()) +// .and_then(|f| f.checked_div((MAX_BPS * DEFAULT_CLAIM_FEE_MILLIBPS) as u128)) +// .and_then(|f| f.to_u64())); + +// let amount_claimable_minus_fees = unwrap_int!(amount_claimable.checked_sub(max_claim_fee)); + +// // Claim all rewards. +// miner.rewards_earned = 0; + +// // Setup remaining variables +// self.mint_claimed_tokens(amount_claimable_minus_fees)?; +// self.mint_fees(max_claim_fee)?; + +// let now = Clock::get()?.unix_timestamp; +// emit!(ClaimEvent { +// authority: self.stake.authority.key(), +// staked_token: self.stake.quarry.token_mint_key, +// timestamp: now, +// rewards_token: self.rewards_token_mint.key(), +// amount: amount_claimable_minus_fees, +// fees: max_claim_fee, +// }); + +// Ok(()) +// } + +// fn create_perform_mint_accounts( +// &self, +// destination: Account<'info, TokenAccount>, +// ) -> quarry_mint_wrapper::cpi::accounts::PerformMint<'info> { +// quarry_mint_wrapper::cpi::accounts::PerformMint { +// mint_wrapper: self.mint_wrapper.to_account_info(), +// minter_authority: self.stake.rewarder.to_account_info(), +// token_mint: self.rewards_token_mint.to_account_info(), +// destination: destination.to_account_info(), +// minter: self.minter.to_account_info(), +// token_program: self.stake.token_program.to_account_info(), +// } +// } + +// fn perform_mint(&self, destination: Account<'info, TokenAccount>, amount: u64) -> Result<()> { +// let claim_mint_accounts = self.create_perform_mint_accounts(destination); + +// // Create the signer seeds. +// let seeds = gen_rewarder_signer_seeds!(self.stake.rewarder); +// let signer_seeds = &[&seeds[..]]; + +// quarry_mint_wrapper::cpi::perform_mint( +// CpiContext::new_with_signer( +// self.mint_wrapper_program.to_account_info(), +// claim_mint_accounts, +// signer_seeds, +// ), +// amount, +// ) +// } + +// /// Mints the claimed tokens. +// fn mint_claimed_tokens(&self, amount_claimable_minus_fees: u64) -> Result<()> { +// let rewards_token_account = (*self.rewards_token_account).clone(); +// self.perform_mint(rewards_token_account, amount_claimable_minus_fees) +// } + +// /// Mints the fee tokens. +// fn mint_fees(&self, claim_fee: u64) -> Result<()> { +// let claim_fee_token_account = (*self.claim_fee_token_account).clone(); +// self.perform_mint(claim_fee_token_account, claim_fee) +// } +// } + #[cfg(test)] #[allow(clippy::unwrap_used)] mod tests { @@ -65,7 +162,7 @@ mod tests { ..Default::default() }; - let invalid: Result = err!(InvalidRewardsShare); + let invalid: Result = err!(crate::ErrorCode::InvalidRewardsShare); // invalid because there are no shares assert_eq!( diff --git a/programs/quarry-mint-wrapper/Cargo.toml b/programs/quarry-mint-wrapper/Cargo.toml index 12fb2ad2..84442f14 100644 --- a/programs/quarry-mint-wrapper/Cargo.toml +++ b/programs/quarry-mint-wrapper/Cargo.toml @@ -20,7 +20,7 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = ">=0.22, <=0.25" -anchor-spl = ">=0.22, <=0.25" +anchor-lang = "0.26.0" +anchor-spl = "0.26.0" solana-security-txt = "1.0.1" -vipers = "^2.0" +vipers = { git="ssh://git@github.com/bridgesplit/vipers.git"} diff --git a/programs/quarry-operator/Cargo.toml b/programs/quarry-operator/Cargo.toml index ccc5521e..3ab9dc93 100644 --- a/programs/quarry-operator/Cargo.toml +++ b/programs/quarry-operator/Cargo.toml @@ -20,8 +20,8 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = ">=0.22, <=0.25" -anchor-spl = ">=0.22, <=0.25" +anchor-lang = "0.26.0" +anchor-spl = "0.26.0" quarry-mine = { path = "../quarry-mine", features = ["cpi"], version = "5.3.0" } solana-security-txt = "1.0.1" -vipers = "^2.0" +vipers = { git="ssh://git@github.com/bridgesplit/vipers.git"} diff --git a/programs/quarry-redeemer/Cargo.toml b/programs/quarry-redeemer/Cargo.toml index f5a520a7..30acfba6 100644 --- a/programs/quarry-redeemer/Cargo.toml +++ b/programs/quarry-redeemer/Cargo.toml @@ -20,7 +20,7 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = ">=0.22, <=0.25" -anchor-spl = ">=0.22, <=0.25" +anchor-lang = "0.26.0" +anchor-spl = "0.26.0" solana-security-txt = "1.0.1" -vipers = "^2.0" +vipers = { git="ssh://git@github.com/bridgesplit/vipers.git"} diff --git a/programs/quarry-redeemer/src/lib.rs b/programs/quarry-redeemer/src/lib.rs index ef17e6b4..e2cc0bb9 100644 --- a/programs/quarry-redeemer/src/lib.rs +++ b/programs/quarry-redeemer/src/lib.rs @@ -77,7 +77,10 @@ pub mod quarry_redeemer { /// Redeems all of a user's tokens against the redemption vault. pub fn redeem_all_tokens(ctx: Context) -> Result<()> { let amount = ctx.accounts.iou_source.amount; - redeem_tokens(ctx, amount) + let redeemer_balance = ctx.accounts.redemption_vault.amount; + + let redeem_amount = std::cmp::min(amount, redeemer_balance); + redeem_tokens(ctx, redeem_amount) } } diff --git a/programs/quarry-registry/Cargo.toml b/programs/quarry-registry/Cargo.toml index 3e76533f..53d1d7e4 100644 --- a/programs/quarry-registry/Cargo.toml +++ b/programs/quarry-registry/Cargo.toml @@ -20,7 +20,7 @@ cpi = ["no-entrypoint"] default = [] [dependencies] -anchor-lang = ">=0.22, <=0.25" +anchor-lang = "0.26.0" quarry-mine = { path = "../quarry-mine", features = ["cpi"], version = "5.3.0" } solana-security-txt = "1.0.1" -vipers = "^2.0" +vipers = { git="ssh://git@github.com/bridgesplit/vipers.git"}