From 99e6fe65b52ff7ffbadb60e85f8eb8fb308397a0 Mon Sep 17 00:00:00 2001 From: Iaroslav Mazur Date: Tue, 29 Apr 2025 17:57:39 +0300 Subject: [PATCH 1/2] chore: don't pin toolchain version in bun scripts chore: update Anchor version chore: remove the bytemuck dependency hotfix chore: update other dependencies test: increase CU limit for failing tests (#88) refactor: change verification order at Stream Creation (motivation: previously, passing an endTime < startTime resulted in the CliffTimeNotLessThanEndTime error being returned) chore: update bun dependencies --- .github/workflows/build.yml | 2 +- Cargo.lock | 200 ++++++++++++----------- bun.lock | 106 +++++++++--- package.json | 36 ++-- programs/lockup/Cargo.toml | 10 +- programs/lockup/src/utils/validations.rs | 10 +- tests/sablier-lockup.ts | 4 +- 7 files changed, 214 insertions(+), 154 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d151b0d5..200dde6c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -64,5 +64,5 @@ jobs: - run: avm use latest shell: bash - - run: RUSTUP_TOOLCHAIN=nightly-2025-04-01 anchor build + - run: RUSTUP_TOOLCHAIN=nightly anchor build shell: bash diff --git a/Cargo.lock b/Cargo.lock index 558bff1f..034013e5 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -61,9 +61,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37013051defd745a5437d6842bd404e5480e14ad4e4f0441dd9a81a4b9aea1d6" +checksum = "3f70fd141a4d18adf11253026b32504f885447048c7494faf5fa83b01af9c0cf" dependencies = [ "anchor-syn", "proc-macro2", @@ -73,9 +73,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92db0f793e924e18462b3fac53c5759a8248649a8072788b5e88a4af714998c8" +checksum = "715a261c57c7679581e06f07a74fa2af874ac30f86bd8ea07cca4a7e5388a064" dependencies = [ "anchor-syn", "bs58", @@ -86,9 +86,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a98126ebfc96d6248899caadc9ea7c2403420c4f5c994e541802bce9f423674" +checksum = "730d6df8ae120321c5c25e0779e61789e4b70dc8297102248902022f286102e4" dependencies = [ "anchor-syn", "quote", @@ -97,9 +97,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8a4dcb403f872fbcd0910fc39a3e05bb6c43a8399f915a1878e62eb680fbb23" +checksum = "27e6e449cc3a37b2880b74dcafb8e5a17b954c0e58e376432d7adc646fb333ef" dependencies = [ "anchor-syn", "quote", @@ -108,9 +108,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "420d651b2703ccff86f6c4b7c394140cb85049787c078a5f8280506121d48065" +checksum = "d7710e4c54adf485affcd9be9adec5ef8846d9c71d7f31e16ba86ff9fc1dd49f" dependencies = [ "anchor-syn", "proc-macro2", @@ -120,9 +120,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d258f3a9f47db7f4199888df0ee67e42b960a7acb8f5c336b585d4eb243b9665" +checksum = "05ecfd49b2aeadeb32f35262230db402abed76ce87e27562b34f61318b2ec83c" dependencies = [ "anchor-lang-idl", "anchor-syn", @@ -137,9 +137,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "097147501de51105d8dbdad9bd5a96a1b17ecbb2cee9f200d6167031372eab3b" +checksum = "be89d160793a88495af462a7010b3978e48e30a630c91de47ce2c1d3cb7a6149" dependencies = [ "anchor-syn", "quote", @@ -148,9 +148,9 @@ dependencies = [ [[package]] name = "anchor-derive-serde" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5a24721da4ed67f0a1391cac27ea7e51c255cbd94cdcc6728a0aa56227628d0" +checksum = "abc6ee78acb7bfe0c2dd2abc677aaa4789c0281a0c0ef01dbf6fe85e0fd9e6e4" dependencies = [ "anchor-syn", "borsh-derive-internal", @@ -161,9 +161,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f41986f84d238a2f7a807f3a98da5df0e97ebe23f29f7d67b8cdd4fd80bc1ba1" +checksum = "134a01c0703f6fd355a0e472c033f6f3e41fac1ef6e370b20c50f4c8d022cea7" dependencies = [ "proc-macro2", "quote", @@ -172,9 +172,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eba81a0543fee1b7b610fe9ebedbae6a14e8d3e85a6a6dd48871d48a08880195" +checksum = "e6bab117055905e930f762c196e08f861f8dfe7241b92cee46677a3b15561a0a" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -221,9 +221,9 @@ dependencies = [ [[package]] name = "anchor-spl" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9d989ebc64e6c1a9828d3a6f7b8e7a4d63cc8a4f667dcb191bd9067a3375c20" +checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" dependencies = [ "anchor-lang", "mpl-token-metadata", @@ -237,9 +237,9 @@ dependencies = [ [[package]] name = "anchor-syn" -version = "0.31.0" +version = "0.31.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "564685b759db12a2424d1b2688cfdf0fec26a023813bc461274754fb0e5d97b0" +checksum = "5dc7a6d90cc643df0ed2744862cdf180587d1e5d28936538c18fc8908489ed67" dependencies = [ "anyhow", "bs58", @@ -256,9 +256,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.97" +version = "1.0.98" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f" +checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" [[package]] name = "arrayref" @@ -313,9 +313,9 @@ checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" [[package]] name = "blake3" -version = "1.7.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b17679a8d69b6d7fd9cd9801a536cec9fa5e5970b69f9d4747f70b39b031f5e7" +checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" dependencies = [ "arrayref", "arrayvec", @@ -386,7 +386,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -438,22 +438,22 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.22.0" +version = "1.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b1fc10dbac614ebc03540c9dbd60e83887fda27794998c6528f1782047d540" +checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.1" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" +checksum = "7ecc273b49b3205b83d648f0690daa588925572cc5063745bfe547fe7ec8e1a1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -469,14 +469,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a98356df42a2eb1bd8f1793ae4ee4de48e384dd974ce5eac8eee802edb7492be" dependencies = [ "serde", - "toml 0.8.20", + "toml 0.8.22", ] [[package]] name = "cc" -version = "1.2.17" +version = "1.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcb57c740ae1daf453ae85f16e37396f672b039e00d9d866e07ddb24e328e3a" +checksum = "04da6a0d40b948dfc4fa8f5bbf402b0fc1a64a28dbf7d12ffd683550f2c1b63a" dependencies = [ "shlex", ] @@ -590,7 +590,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -687,9 +687,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "js-sys", @@ -733,9 +733,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.8.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3954d50fe15b02142bf25d3b8bdadb634ec3948f103d04ffe3031bc8fe9d7058" +checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" dependencies = [ "equivalent", "hashbrown 0.15.2", @@ -792,9 +792,9 @@ checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" [[package]] name = "libc" -version = "0.2.171" +version = "0.2.172" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6" +checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" [[package]] name = "libsecp256k1" @@ -927,7 +927,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -966,14 +966,14 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "once_cell" -version = "1.21.1" +version = "1.21.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d75b0bedcc4fe52caa0e03d9f1151a323e4aa5e2d78ba3580400cd3c9e2bc4bc" +checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] name = "opaque-debug" @@ -1037,7 +1037,7 @@ version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.24", + "zerocopy 0.8.25", ] [[package]] @@ -1060,9 +1060,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84" +checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" dependencies = [ "unicode-ident", ] @@ -1144,7 +1144,7 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] @@ -1158,9 +1158,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8c0c260b63a8219631167be35e6a988e9554dbd323f8bd08439c8ed1302bd1" +checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" dependencies = [ "bitflags", ] @@ -1221,7 +1221,6 @@ version = "0.1.0" dependencies = [ "anchor-lang", "anchor-spl", - "bytemuck_derive", "mpl-token-metadata", ] @@ -1263,7 +1262,7 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -1329,9 +1328,9 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "smallvec" -version = "1.14.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcf8323ef1faaee30a44a340193b1ac6814fd9b7b4e88e9d4519a3e4abe1cfd" +checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" [[package]] name = "solana-account" @@ -1458,9 +1457,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.2.5" +version = "2.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4895e0943c12a322aa0af8d9f9164c7023dee6ecd9f6a70537709b986ffc3aac" +checksum = "3241d534ec36aff225705eea77785589906c9ecaa3db2a0de0d821bae8d32dcc" dependencies = [ "bytemuck", "bytemuck_derive", @@ -1600,7 +1599,7 @@ checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" dependencies = [ "bincode", "borsh 1.5.7", - "getrandom 0.2.15", + "getrandom 0.2.16", "js-sys", "num-traits", "serde", @@ -1698,9 +1697,9 @@ dependencies = [ [[package]] name = "solana-message" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "268486ba8a294ed22a4d7c1ec05f540c3dbe71cfa7c6c54b6d4d13668d895678" +checksum = "9c6bf99c4570173710107a1f233f3bee226feea5fc817308707d4f7cb100a72d" dependencies = [ "bincode", "blake3", @@ -1762,7 +1761,7 @@ dependencies = [ "bytemuck", "console_error_panic_hook", "console_log", - "getrandom 0.2.15", + "getrandom 0.2.16", "lazy_static", "log", "memoffset", @@ -1883,9 +1882,9 @@ dependencies = [ [[package]] name = "solana-pubkey" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40db1ff5a0f8aea2c158d78ab5f2cf897848964251d1df42fef78efd3c85b863" +checksum = "cad77cf9f30b971a1eec48dde6a863dcac60ba005a34dfde23736afa5c7ac667" dependencies = [ "borsh 0.10.4", "borsh 1.5.7", @@ -1894,7 +1893,7 @@ dependencies = [ "bytemuck_derive", "curve25519-dalek", "five8_const", - "getrandom 0.2.15", + "getrandom 0.2.16", "js-sys", "num-traits", "serde", @@ -1944,7 +1943,7 @@ dependencies = [ "bs58", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2177,9 +2176,9 @@ dependencies = [ [[package]] name = "solana-vote-interface" -version = "2.2.2" +version = "2.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1e9f6a1651310a94cd5a1a6b7f33ade01d9e5ea38a2220becb5fd737b756514" +checksum = "78f039b0788337bedc6c5450d2f237718f938defb5ce0e0ad8ef507e78dcd370" dependencies = [ "bincode", "num-derive 0.4.2", @@ -2201,9 +2200,9 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.2.5" +version = "2.2.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db024ca4f5f87b673e932eae3749bb1c6bc090009283104116b379003c02972d" +checksum = "27c757a8d8b66af3e150c29e961310bafa9d8c91ad826f96fb88b2bface31ba2" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -2282,7 +2281,7 @@ checksum = "d9e8418ea6269dcfb01c712f0444d2c75542c04448b480e87de59d2865edc750" dependencies = [ "quote", "spl-discriminator-syn", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2294,7 +2293,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.100", + "syn 2.0.101", "thiserror 1.0.69", ] @@ -2367,7 +2366,7 @@ dependencies = [ "proc-macro2", "quote", "sha2 0.10.8", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2574,9 +2573,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "8ce2b7fc941b3a24138a0a7cf8e858bfc6a992e7978a068a5c760deb0ed43caf" dependencies = [ "proc-macro2", "quote", @@ -2609,7 +2608,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2620,7 +2619,7 @@ checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2649,9 +2648,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "05ae329d1f08c4d17a59bed7ff5b5a769d062e64a62d34a3261b219e62cd5aae" dependencies = [ "serde", "serde_spanned", @@ -2661,26 +2660,33 @@ dependencies = [ [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "3da5db5a963e24bc68be8b17b6fa82814bb22ee8660f192bb182771d498f09a3" dependencies = [ "serde", ] [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "310068873db2c5b3e7659d2cc35d21855dbafa50d1ce336397c666e3cb08137e" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", + "toml_write", "winnow", ] +[[package]] +name = "toml_write" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfb942dfe1d8e29a7ee7fcbde5bd2b9a25fb89aa70caea2eba3bee836ff41076" + [[package]] name = "typenum" version = "1.18.0" @@ -2759,7 +2765,7 @@ dependencies = [ "log", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-shared", ] @@ -2781,7 +2787,7 @@ checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2871,9 +2877,9 @@ checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" -version = "0.7.4" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97b544156e9bebe1a0ffbc03484fc1ffe3100cbce3ffb17eac35f7cdd7ab36" +checksum = "6cb8234a863ea0e8cd7284fcdd4f145233eb00fee02bbdd9861aec44e6477bc5" dependencies = [ "memchr", ] @@ -2889,11 +2895,11 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +checksum = "a1702d9583232ddb9174e01bb7c15a2ab8fb1bc6f227aa1233858c351a3ba0cb" dependencies = [ - "zerocopy-derive 0.8.24", + "zerocopy-derive 0.8.25", ] [[package]] @@ -2904,18 +2910,18 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] name = "zerocopy-derive" -version = "0.8.24" +version = "0.8.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +checksum = "28a6e20d751156648aa063f3800b706ee209a32c0b4d9f24be3d980b01be55ef" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] [[package]] @@ -2935,5 +2941,5 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.101", ] diff --git a/bun.lock b/bun.lock index f70328ea..d6e759bd 100644 --- a/bun.lock +++ b/bun.lock @@ -4,36 +4,36 @@ "": { "name": "@sablier/solsab", "dependencies": { - "@coral-xyz/anchor": "^0.31.0", - "@solana-developers/helpers": "^2.0.0", - "@solana/web3.js": "^1.98.0", + "@coral-xyz/anchor": "^0.31.1", + "@solana-developers/helpers": "^2.8.1", + "@solana/web3.js": "^1.98.2", "anchor-bankrun": "^0.5.0", "solana-bankrun": "^0.4.0", }, "devDependencies": { - "@types/bn.js": "^5.1.0", - "@types/chai": "^4.3.0", - "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", - "chai": "^4.3.4", - "eslint": "^8.36.0", - "eslint-config-prettier": "^8.8.0", - "mocha": "^9.0.3", - "prettier": "^2.6.2", - "ts-mocha": "^10.0.0", - "typescript": "^4.3.5", + "@types/bn.js": "^5.1.6", + "@types/chai": "^4.3.20", + "@types/mocha": "^9.1.1", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "chai": "^4.5.0", + "eslint": "^8.57.1", + "eslint-config-prettier": "^8.10.0", + "mocha": "^9.2.2", + "prettier": "^2.8.8", + "ts-mocha": "^10.1.0", + "typescript": "^4.9.5", }, }, }, "packages": { "@babel/runtime": ["@babel/runtime@7.27.0", "", { "dependencies": { "regenerator-runtime": "^0.14.0" } }, "sha512-VtPOkrdPHZsKc/clNqyi9WUA8TINkZ4cGk63UUE3u4pmB2k+ZMQRDuIOagv8UVd6j7k0T3+RRIb7beKTebNbcw=="], - "@coral-xyz/anchor": ["@coral-xyz/anchor@0.31.0", "", { "dependencies": { "@coral-xyz/anchor-errors": "^0.31.0", "@coral-xyz/borsh": "^0.31.0", "@noble/hashes": "^1.3.1", "@solana/web3.js": "^1.69.0", "bn.js": "^5.1.2", "bs58": "^4.0.1", "buffer-layout": "^1.2.2", "camelcase": "^6.3.0", "cross-fetch": "^3.1.5", "eventemitter3": "^4.0.7", "pako": "^2.0.3", "superstruct": "^0.15.4", "toml": "^3.0.0" } }, "sha512-Yb1NwP1s4cWhAw7wL7vOLHSWWw3cD5D9pRCVSeJpdqPaI+w7sfRLScnVJL6ViYMZynB7nAG/5HcUPKUnY0L9rw=="], + "@coral-xyz/anchor": ["@coral-xyz/anchor@0.31.1", "", { "dependencies": { "@coral-xyz/anchor-errors": "^0.31.1", "@coral-xyz/borsh": "^0.31.1", "@noble/hashes": "^1.3.1", "@solana/web3.js": "^1.69.0", "bn.js": "^5.1.2", "bs58": "^4.0.1", "buffer-layout": "^1.2.2", "camelcase": "^6.3.0", "cross-fetch": "^3.1.5", "eventemitter3": "^4.0.7", "pako": "^2.0.3", "superstruct": "^0.15.4", "toml": "^3.0.0" } }, "sha512-QUqpoEK+gi2S6nlYc2atgT2r41TT3caWr/cPUEL8n8Md9437trZ68STknq897b82p5mW0XrTBNOzRbmIRJtfsA=="], - "@coral-xyz/anchor-errors": ["@coral-xyz/anchor-errors@0.31.0", "", {}, "sha512-SUERksFSQ+4F11hkROIwHq4mcoSMXJxwVWLoklefi4dU679zVWFVcTq6O7otvjY8wlUaRXeE+iYcQWZTw2ll6w=="], + "@coral-xyz/anchor-errors": ["@coral-xyz/anchor-errors@0.31.1", "", {}, "sha512-NhNEku4F3zzUSBtrYz84FzYWm48+9OvmT1Hhnwr6GnPQry2dsEqH/ti/7ASjjpoFTWRnPXrjAIT1qM6Isop+LQ=="], - "@coral-xyz/borsh": ["@coral-xyz/borsh@0.31.0", "", { "dependencies": { "bn.js": "^5.1.2", "buffer-layout": "^1.2.0" }, "peerDependencies": { "@solana/web3.js": "^1.69.0" } }, "sha512-DwdQ5fuj+rGQCTKRnxnW1W2lvcpBaFc9m9M1TcGGlm+bwCcggmDgbLKLgF+LjIrKnc7Nd+bCACx5RA9YTK2I4Q=="], + "@coral-xyz/borsh": ["@coral-xyz/borsh@0.31.1", "", { "dependencies": { "bn.js": "^5.1.2", "buffer-layout": "^1.2.0" }, "peerDependencies": { "@solana/web3.js": "^1.69.0" } }, "sha512-9N8AU9F0ubriKfNE3g1WF0/4dtlGXoBN/hd1PvbNBamBNwRgHxH4P+o3Zt7rSEloW1HUs6LfZEchlx9fW7POYw=="], "@eslint-community/eslint-utils": ["@eslint-community/eslint-utils@4.6.0", "", { "dependencies": { "eslint-visitor-keys": "^3.4.3" }, "peerDependencies": { "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0" } }, "sha512-WhCn7Z7TauhBtmzhvKpoQs0Wwb/kBcy4CwpuI0/eEIr2Lx2auxmulAzLr91wVZJaz47iUZdkXOK7WlAfxGKCnA=="], @@ -67,15 +67,15 @@ "@solana/codecs": ["@solana/codecs@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-data-structures": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/codecs-strings": "2.0.0-rc.1", "@solana/options": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-qxoR7VybNJixV51L0G1RD2boZTcxmwUWnKCaJJExQ5qNKwbpSyDdWfFJfM5JhGyKe9DnPVOZB+JHWXnpbZBqrQ=="], - "@solana/codecs-core": ["@solana/codecs-core@2.0.0-rc.1", "", { "dependencies": { "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ=="], + "@solana/codecs-core": ["@solana/codecs-core@2.1.0", "", { "dependencies": { "@solana/errors": "2.1.0" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-SR7pKtmJBg2mhmkel2NeHA1pz06QeQXdMv8WJoIR9m8F/hw80K/612uaYbwTt2nkK0jg/Qn/rNSd7EcJ4SBGjw=="], "@solana/codecs-data-structures": ["@solana/codecs-data-structures@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-rinCv0RrAVJ9rE/rmaibWJQxMwC5lSaORSZuwjopSUE6T0nb/MVg6Z1siNCXhh/HFTOg0l8bNvZHgBcN/yvXog=="], - "@solana/codecs-numbers": ["@solana/codecs-numbers@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ=="], + "@solana/codecs-numbers": ["@solana/codecs-numbers@2.1.0", "", { "dependencies": { "@solana/codecs-core": "2.1.0", "@solana/errors": "2.1.0" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-XMu4yw5iCgQnMKsxSWPPOrGgtaohmupN3eyAtYv3K3C/MJEc5V90h74k5B1GUCiHvcrdUDO9RclNjD9lgbjFag=="], "@solana/codecs-strings": ["@solana/codecs-strings@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "fastestsmallesttextencoderdecoder": "^1.0.22", "typescript": ">=5" } }, "sha512-9/wPhw8TbGRTt6mHC4Zz1RqOnuPTqq1Nb4EyuvpZ39GW6O2t2Q7Q0XxiB3+BdoEjwA2XgPw6e2iRfvYgqty44g=="], - "@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], + "@solana/errors": ["@solana/errors@2.1.0", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^13.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-l+GxAv0Ar4d3c3PlZdA9G++wFYZREEbbRyAFP8+n8HSg0vudCuzogh/13io6hYuUhG/9Ve8ARZNamhV7UScKNw=="], "@solana/options": ["@solana/options@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/codecs-data-structures": "2.0.0-rc.1", "@solana/codecs-numbers": "2.0.0-rc.1", "@solana/codecs-strings": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-mLUcR9mZ3qfHlmMnREdIFPf9dpMc/Bl66tLSOOWxw4ml5xMT2ohFn7WGqoKcu/UHkT9CrC6+amEdqCNvUqI7AA=="], @@ -85,7 +85,7 @@ "@solana/spl-token-metadata": ["@solana/spl-token-metadata@0.1.6", "", { "dependencies": { "@solana/codecs": "2.0.0-rc.1" }, "peerDependencies": { "@solana/web3.js": "^1.95.3" } }, "sha512-7sMt1rsm/zQOQcUWllQX9mD2O6KhSAtY1hFR2hfFwgqfFWzSY9E9GDvFVNYUI1F0iQKcm6HmePU9QbKRXTEBiA=="], - "@solana/web3.js": ["@solana/web3.js@1.98.0", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "agentkeepalive": "^4.5.0", "bigint-buffer": "^1.1.5", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA=="], + "@solana/web3.js": ["@solana/web3.js@1.98.2", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "@solana/codecs-numbers": "^2.1.0", "agentkeepalive": "^4.5.0", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-BqVwEG+TaG2yCkBMbD3C4hdpustR4FpuUFRPUmqRZYYlPI9Hg4XMWxHWOWRzHE9Lkc9NDjzXFX7lDXSgzC7R1A=="], "@swc/helpers": ["@swc/helpers@0.5.17", "", { "dependencies": { "tslib": "^2.8.0" } }, "sha512-5IKx/Y13RsYd+sauPb2x+U/xZikHjolzfuDgTAl/Tdf3Q8rslRvC19NKDLgAJQ6wsqADk10ntlv08nPFw/gO/A=="], @@ -575,11 +575,37 @@ "@solana-developers/helpers/@coral-xyz/anchor": ["@coral-xyz/anchor@0.30.1", "", { "dependencies": { "@coral-xyz/anchor-errors": "^0.30.1", "@coral-xyz/borsh": "^0.30.1", "@noble/hashes": "^1.3.1", "@solana/web3.js": "^1.68.0", "bn.js": "^5.1.2", "bs58": "^4.0.1", "buffer-layout": "^1.2.2", "camelcase": "^6.3.0", "cross-fetch": "^3.1.5", "crypto-hash": "^1.3.0", "eventemitter3": "^4.0.7", "pako": "^2.0.3", "snake-case": "^3.0.4", "superstruct": "^0.15.4", "toml": "^3.0.0" } }, "sha512-gDXFoF5oHgpriXAaLpxyWBHdCs8Awgf/gLHIo6crv7Aqm937CNdY+x+6hoj7QR5vaJV7MxWSQ0NGFzL3kPbWEQ=="], + "@solana-developers/helpers/@solana/web3.js": ["@solana/web3.js@1.98.0", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "agentkeepalive": "^4.5.0", "bigint-buffer": "^1.1.5", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA=="], + "@solana-developers/helpers/bs58": ["bs58@6.0.0", "", { "dependencies": { "base-x": "^5.0.0" } }, "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw=="], + "@solana/buffer-layout-utils/@solana/web3.js": ["@solana/web3.js@1.98.0", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "agentkeepalive": "^4.5.0", "bigint-buffer": "^1.1.5", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA=="], + + "@solana/codecs/@solana/codecs-core": ["@solana/codecs-core@2.0.0-rc.1", "", { "dependencies": { "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ=="], + + "@solana/codecs/@solana/codecs-numbers": ["@solana/codecs-numbers@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ=="], + + "@solana/codecs-data-structures/@solana/codecs-core": ["@solana/codecs-core@2.0.0-rc.1", "", { "dependencies": { "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ=="], + + "@solana/codecs-data-structures/@solana/codecs-numbers": ["@solana/codecs-numbers@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ=="], + + "@solana/codecs-data-structures/@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], + + "@solana/codecs-strings/@solana/codecs-core": ["@solana/codecs-core@2.0.0-rc.1", "", { "dependencies": { "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ=="], + + "@solana/codecs-strings/@solana/codecs-numbers": ["@solana/codecs-numbers@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ=="], + + "@solana/codecs-strings/@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], + "@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], - "@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + "@solana/errors/commander": ["commander@13.1.0", "", {}, "sha512-/rFeCpNJQbhSZjGVwO9RFV3xPqbnERS8MmIQzCtD/zl6gpJuV/bMLuN92oG3F7d8oDEHHRrujSXNUr8fpjntKw=="], + + "@solana/options/@solana/codecs-core": ["@solana/codecs-core@2.0.0-rc.1", "", { "dependencies": { "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-bauxqMfSs8EHD0JKESaNmNuNvkvHSuN3bbWAF5RjOfDu2PugxHrvRebmYauvSumZ3cTfQ4HJJX6PG5rN852qyQ=="], + + "@solana/options/@solana/codecs-numbers": ["@solana/codecs-numbers@2.0.0-rc.1", "", { "dependencies": { "@solana/codecs-core": "2.0.0-rc.1", "@solana/errors": "2.0.0-rc.1" }, "peerDependencies": { "typescript": ">=5" } }, "sha512-J5i5mOkvukXn8E3Z7sGIPxsThRCgSdgTWJDQeZvucQ9PT6Y3HiVXJ0pcWiOWAoQ3RX8e/f4I3IC+wE6pZiJzDQ=="], + + "@solana/options/@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], "@solana/web3.js/superstruct": ["superstruct@2.0.2", "", {}, "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A=="], @@ -611,6 +637,8 @@ "snake-case/tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="], + "solana-bankrun/@solana/web3.js": ["@solana/web3.js@1.98.0", "", { "dependencies": { "@babel/runtime": "^7.25.0", "@noble/curves": "^1.4.2", "@noble/hashes": "^1.4.0", "@solana/buffer-layout": "^4.0.1", "agentkeepalive": "^4.5.0", "bigint-buffer": "^1.1.5", "bn.js": "^5.2.1", "borsh": "^0.7.0", "bs58": "^4.0.1", "buffer": "6.0.3", "fast-stable-stringify": "^1.0.0", "jayson": "^4.1.1", "node-fetch": "^2.7.0", "rpc-websockets": "^9.0.2", "superstruct": "^2.0.2" } }, "sha512-nz3Q5OeyGFpFCR+erX2f6JPt3sKhzhYcSycBCSPkWjzSVDh/Rr1FqTVMRe58FKO16/ivTUcuJjeS5MyBvpkbzA=="], + "ts-node/diff": ["diff@3.5.0", "", {}, "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA=="], "@solana-developers/helpers/@coral-xyz/anchor/@coral-xyz/anchor-errors": ["@coral-xyz/anchor-errors@0.30.1", "", {}, "sha512-9Mkradf5yS5xiLWrl9WrpjqOrAV+/W2RQHDlbnAZBivoGpOs1ECjoDCkVk4aRG8ZdiFiB8zQEVlxf+8fKkmSfQ=="], @@ -619,10 +647,42 @@ "@solana-developers/helpers/@coral-xyz/anchor/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + "@solana-developers/helpers/@solana/web3.js/bs58": ["bs58@4.0.1", "", { "dependencies": { "base-x": "^3.0.2" } }, "sha512-Ok3Wdf5vOIlBrgCvTq96gBkJw+JUEzdBgyaza5HLtPm7yTHkjRy8+JzNyHF7BHa0bNWOQIp3m5YF0nnFcOIKLw=="], + + "@solana-developers/helpers/@solana/web3.js/superstruct": ["superstruct@2.0.2", "", {}, "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A=="], + "@solana-developers/helpers/bs58/base-x": ["base-x@5.0.1", "", {}, "sha512-M7uio8Zt++eg3jPj+rHMfCC+IuygQHHCOU+IYsVtik6FWjuYpVt/+MRKcgsAMHh8mMFAwnB+Bs+mTrFiXjMzKg=="], + "@solana/buffer-layout-utils/@solana/web3.js/superstruct": ["superstruct@2.0.2", "", {}, "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A=="], + + "@solana/codecs-data-structures/@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], + + "@solana/codecs-data-structures/@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + + "@solana/codecs-strings/@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], + + "@solana/codecs-strings/@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + + "@solana/codecs/@solana/codecs-core/@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], + + "@solana/codecs/@solana/codecs-numbers/@solana/errors": ["@solana/errors@2.0.0-rc.1", "", { "dependencies": { "chalk": "^5.3.0", "commander": "^12.1.0" }, "peerDependencies": { "typescript": ">=5" }, "bin": { "errors": "bin/cli.mjs" } }, "sha512-ejNvQ2oJ7+bcFAYWj225lyRkHnixuAeb7RQCixm+5mH4n1IA4Qya/9Bmfy5RAAHQzxK43clu3kZmL5eF9VGtYQ=="], + + "@solana/options/@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], + + "@solana/options/@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + "@typescript-eslint/utils/eslint-scope/estraverse": ["estraverse@4.3.0", "", {}, "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw=="], "mocha/debug/ms": ["ms@2.1.2", "", {}, "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w=="], + + "solana-bankrun/@solana/web3.js/superstruct": ["superstruct@2.0.2", "", {}, "sha512-uV+TFRZdXsqXTL2pRvujROjdZQ4RAlBUS5BTh9IGm+jTqQntYThciG/qu57Gs69yjnVUSqdxF9YLmSnpupBW9A=="], + + "@solana/codecs/@solana/codecs-core/@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], + + "@solana/codecs/@solana/codecs-core/@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], + + "@solana/codecs/@solana/codecs-numbers/@solana/errors/chalk": ["chalk@5.4.1", "", {}, "sha512-zgVZuo2WcZgfUEmsn6eO3kINexW8RAE4maiQ8QNs8CtpPCSyMiYsULR3HQYkm3w8FIA3SberyMJMSldGsW+U3w=="], + + "@solana/codecs/@solana/codecs-numbers/@solana/errors/commander": ["commander@12.1.0", "", {}, "sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA=="], } } diff --git a/package.json b/package.json index cad085c7..6e2b6ad0 100644 --- a/package.json +++ b/package.json @@ -11,31 +11,31 @@ "url": "https://github.com/sablier-labs/solsab/issues" }, "dependencies": { - "@coral-xyz/anchor": "^0.31.0", - "@solana-developers/helpers": "^2.0.0", - "@solana/web3.js": "^1.98.0", + "@coral-xyz/anchor": "^0.31.1", + "@solana-developers/helpers": "^2.8.1", + "@solana/web3.js": "^1.98.2", "anchor-bankrun": "^0.5.0", "solana-bankrun": "^0.4.0" }, "devDependencies": { - "@types/bn.js": "^5.1.0", - "@types/chai": "^4.3.0", - "@types/mocha": "^9.0.0", - "@typescript-eslint/eslint-plugin": "^5.56.0", - "@typescript-eslint/parser": "^5.56.0", - "eslint": "^8.36.0", - "eslint-config-prettier": "^8.8.0", - "chai": "^4.3.4", - "mocha": "^9.0.3", - "prettier": "^2.6.2", - "ts-mocha": "^10.0.0", - "typescript": "^4.3.5" + "@types/bn.js": "^5.1.6", + "@types/chai": "^4.3.20", + "@types/mocha": "^9.1.1", + "@typescript-eslint/eslint-plugin": "^5.62.0", + "@typescript-eslint/parser": "^5.62.0", + "eslint": "^8.57.1", + "eslint-config-prettier": "^8.10.0", + "chai": "^4.5.0", + "mocha": "^9.2.2", + "prettier": "^2.8.8", + "ts-mocha": "^10.1.0", + "typescript": "^4.9.5" }, "scripts": { - "build": "RUSTUP_TOOLCHAIN=nightly-2025-04-01 anchor build", + "build": "RUSTUP_TOOLCHAIN=nightly anchor build", "clean": "rm -rf .anchor target", - "fmt:rust": "RUSTUP_TOOLCHAIN=nightly-2025-04-01 cargo fmt", - "fmt:rust:check": "RUSTUP_TOOLCHAIN=nightly-2025-04-01 cargo fmt --check", + "fmt:rust": "RUSTUP_TOOLCHAIN=nightly cargo fmt", + "fmt:rust:check": "RUSTUP_TOOLCHAIN=nightly cargo fmt --check", "lint": "bun run fmt:rust:check && bun run lint:ts && bun run prettier:check", "lint:fix": "bun run fmt:rust && bun run lint:ts:fix && bun run prettier:write", "lint:ts": "eslint \"migrations/**/*.ts\" \"tests/**/*.ts\"", diff --git a/programs/lockup/Cargo.toml b/programs/lockup/Cargo.toml index 75a6f202..08f34a99 100644 --- a/programs/lockup/Cargo.toml +++ b/programs/lockup/Cargo.toml @@ -17,12 +17,6 @@ no-log-ix-name = [] idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"] [dependencies] -anchor-lang = { version = "0.31.0", features = ["init-if-needed"] } -anchor-spl = { version = "0.31.0", features = ["metadata"] } +anchor-lang = { version = "0.31.1", features = ["init-if-needed"] } +anchor-spl = { version = "0.31.1", features = ["metadata"] } mpl-token-metadata = "5.1.0" - -# v1.9 specifies `rust-version = "1.84"`, which causes compatibility issues with Solana build -# tools' Rust version (1.79.0 at the time of writing this comment). -# TODO: Remove when the Solana version we use comes with Rust version >= 1.84 -# bytemuck_derive = ">1.0.0, <1.9" -bytemuck_derive = "=1.8.1" diff --git a/programs/lockup/src/utils/validations.rs b/programs/lockup/src/utils/validations.rs index dce8528f..7c83f74b 100644 --- a/programs/lockup/src/utils/validations.rs +++ b/programs/lockup/src/utils/validations.rs @@ -57,6 +57,11 @@ pub fn check_create( return Err(ErrorCode::StartTimeZero.into()); } + // Check: the start time is strictly less than the end time. + if start_time >= end_time { + return Err(ErrorCode::StartTimeNotLessThanEndTime.into()); + } + // Since a cliff time of zero means there is no cliff, the following checks are performed only if it's not zero. if cliff_time > 0 { // Check: the start time is strictly less than the cliff time. @@ -74,11 +79,6 @@ pub fn check_create( return Err(ErrorCode::CliffTimeZeroUnlockAmountNotZero.into()); } - // Check: the start time is strictly less than the end time. - if start_time >= end_time { - return Err(ErrorCode::StartTimeNotLessThanEndTime.into()); - } - // Check: the sum of the start and cliff unlock amounts is not greater than the deposit amount. if start_unlock + cliff_unlock > deposited_amount { return Err(ErrorCode::UnlockAmountsSumTooHigh.into()); diff --git a/tests/sablier-lockup.ts b/tests/sablier-lockup.ts index cadf6b55..307046cd 100644 --- a/tests/sablier-lockup.ts +++ b/tests/sablier-lockup.ts @@ -2655,7 +2655,7 @@ async function testMultiStreamCreationInOneTx( } // Build, sign and process the transaction - await buildSignAndProcessTx(ixs, senderKeys, 600_000); + await buildSignAndProcessTx(ixs, senderKeys, 700_000); // Get the final token balance of the sender const senderFinalTokenBalance = await getTokenBalanceByATAKey(senderATA); @@ -3506,7 +3506,7 @@ async function createWithTimestamps(args: CreateWithTimestampsArgs): Promise<{ const nftTokenProgram = TOKEN_PROGRAM_ID; const createStreamIx = await getCreateWithTimestampsIx(args); - await buildSignAndProcessTx(createStreamIx, senderKeys, 270_000); + await buildSignAndProcessTx(createStreamIx, senderKeys, 350_000); const streamNftMint = getStreamNftMintAddress(expectedStreamId); const recipientStreamNftATA = deriveATAAddress( From 48fc56b7750939f0553fb775855c8ac916222932 Mon Sep 17 00:00:00 2001 From: Iaroslav Mazur Date: Fri, 2 May 2025 04:46:43 -0700 Subject: [PATCH 2/2] Iaro/view-ixs (#80) * feat: RefundableAmountOf Ix * depleted status * refactor: move common view context file to its file * refactor: rename the common context * refactor: rename view context --------- Co-authored-by: Andrei Vlad Birgaoanu --- .../src/instructions/create_with_durations.rs | 2 +- programs/lockup/src/instructions/mod.rs | 4 +- programs/lockup/src/instructions/view/mod.rs | 8 ++++ .../instructions/view/refundable_amount_of.rs | 8 ++++ .../lockup/src/instructions/view/status_of.rs | 41 +++++++++++++++++++ .../src/instructions/view/stream_view.rs | 23 +++++++++++ .../instructions/view/streamed_amount_of.rs | 8 ++++ .../view/withdrawable_amount_of.rs | 8 ++++ .../instructions/withdrawable_amount_of.rs | 36 ---------------- programs/lockup/src/lib.rs | 14 ++++++- programs/lockup/src/utils/events.rs | 6 --- 11 files changed, 112 insertions(+), 46 deletions(-) create mode 100644 programs/lockup/src/instructions/view/mod.rs create mode 100644 programs/lockup/src/instructions/view/refundable_amount_of.rs create mode 100644 programs/lockup/src/instructions/view/status_of.rs create mode 100644 programs/lockup/src/instructions/view/stream_view.rs create mode 100644 programs/lockup/src/instructions/view/streamed_amount_of.rs create mode 100644 programs/lockup/src/instructions/view/withdrawable_amount_of.rs delete mode 100644 programs/lockup/src/instructions/withdrawable_amount_of.rs diff --git a/programs/lockup/src/instructions/create_with_durations.rs b/programs/lockup/src/instructions/create_with_durations.rs index 2af1bce7..cd1e81e7 100644 --- a/programs/lockup/src/instructions/create_with_durations.rs +++ b/programs/lockup/src/instructions/create_with_durations.rs @@ -12,7 +12,7 @@ pub fn handler( is_cancelable: bool, ) -> Result<()> { // Declare the start time as the current unix timestamp. - let start_time = Clock::get().unwrap().unix_timestamp; + let start_time = Clock::get()?.unix_timestamp; // Calculate the cliff time by adding the cliff duration to the start time using checked math. let cliff_time = if cliff_duration > 0 { start_time.checked_add(cliff_duration).unwrap() } else { 0 }; diff --git a/programs/lockup/src/instructions/mod.rs b/programs/lockup/src/instructions/mod.rs index a23e9913..13d77ce5 100644 --- a/programs/lockup/src/instructions/mod.rs +++ b/programs/lockup/src/instructions/mod.rs @@ -5,14 +5,14 @@ pub mod create_with_durations; pub mod create_with_timestamps; pub mod initialize; pub mod renounce; +pub mod view; pub mod withdraw; pub mod withdraw_max; -pub mod withdrawable_amount_of; pub use cancel::*; pub use collect_fees::*; pub use create_with_timestamps::*; pub use initialize::*; pub use renounce::*; +pub use view::*; pub use withdraw::*; -pub use withdrawable_amount_of::*; diff --git a/programs/lockup/src/instructions/view/mod.rs b/programs/lockup/src/instructions/view/mod.rs new file mode 100644 index 00000000..ec6d77dd --- /dev/null +++ b/programs/lockup/src/instructions/view/mod.rs @@ -0,0 +1,8 @@ +pub mod refundable_amount_of; +pub mod status_of; +pub mod stream_view; +pub mod streamed_amount_of; +pub mod withdrawable_amount_of; + +pub use status_of::*; +pub use stream_view::*; diff --git a/programs/lockup/src/instructions/view/refundable_amount_of.rs b/programs/lockup/src/instructions/view/refundable_amount_of.rs new file mode 100644 index 00000000..92514306 --- /dev/null +++ b/programs/lockup/src/instructions/view/refundable_amount_of.rs @@ -0,0 +1,8 @@ +use anchor_lang::prelude::*; + +use super::StreamView; +use crate::utils::lockup_math::get_refundable_amount; + +pub fn handler(ctx: Context, _stream_id: u64) -> Result { + Ok(get_refundable_amount(&ctx.accounts.stream_data.timestamps, &ctx.accounts.stream_data.amounts)) +} diff --git a/programs/lockup/src/instructions/view/status_of.rs b/programs/lockup/src/instructions/view/status_of.rs new file mode 100644 index 00000000..0a5455b0 --- /dev/null +++ b/programs/lockup/src/instructions/view/status_of.rs @@ -0,0 +1,41 @@ +use anchor_lang::prelude::*; + +use super::StreamView; +use crate::utils::lockup_math::get_streamed_amount; + +pub fn handler(ctx: Context, _stream_id: u64) -> Result { + let stream_data = &ctx.accounts.stream_data; + + if stream_data.is_depleted { + return Ok(StreamStatus::Depleted); + } + + if stream_data.was_canceled { + return Ok(StreamStatus::Canceled); + } + + // Get the current time + let current_time = Clock::get()?.unix_timestamp; + + if current_time < stream_data.timestamps.start_time { + return Ok(StreamStatus::Pending); + } + + // Calculate the streamed amount. + let streamed_amount = get_streamed_amount(&stream_data.timestamps, &stream_data.amounts); + + if streamed_amount < stream_data.amounts.deposited { + Ok(StreamStatus::Streaming) + } else { + Ok(StreamStatus::Settled) + } +} + +#[derive(AnchorSerialize, AnchorDeserialize)] +pub enum StreamStatus { + Pending, + Streaming, + Settled, + Canceled, + Depleted, +} diff --git a/programs/lockup/src/instructions/view/stream_view.rs b/programs/lockup/src/instructions/view/stream_view.rs new file mode 100644 index 00000000..b4164912 --- /dev/null +++ b/programs/lockup/src/instructions/view/stream_view.rs @@ -0,0 +1,23 @@ +use anchor_lang::prelude::*; +use anchor_spl::token_interface::Mint; + +use crate::{state::lockup::StreamData, utils::constants::*}; + +// Common context that is used by multiple view instructions +#[derive(Accounts)] +#[instruction(stream_id: u64)] +pub struct StreamView<'info> { + #[account( + seeds = [STREAM_NFT_MINT_SEED, + stream_id.to_le_bytes().as_ref()], + bump, + )] + pub stream_nft_mint: Box>, + + #[account( + seeds = [STREAM_DATA_SEED, + stream_nft_mint.key().as_ref()], + bump = stream_data.bump, + )] + pub stream_data: Box>, +} diff --git a/programs/lockup/src/instructions/view/streamed_amount_of.rs b/programs/lockup/src/instructions/view/streamed_amount_of.rs new file mode 100644 index 00000000..196df7db --- /dev/null +++ b/programs/lockup/src/instructions/view/streamed_amount_of.rs @@ -0,0 +1,8 @@ +use anchor_lang::prelude::*; + +use super::StreamView; +use crate::utils::lockup_math::get_streamed_amount; + +pub fn handler(ctx: Context, _stream_id: u64) -> Result { + Ok(get_streamed_amount(&ctx.accounts.stream_data.timestamps, &ctx.accounts.stream_data.amounts)) +} diff --git a/programs/lockup/src/instructions/view/withdrawable_amount_of.rs b/programs/lockup/src/instructions/view/withdrawable_amount_of.rs new file mode 100644 index 00000000..b84777bd --- /dev/null +++ b/programs/lockup/src/instructions/view/withdrawable_amount_of.rs @@ -0,0 +1,8 @@ +use anchor_lang::prelude::*; + +use super::StreamView; +use crate::utils::lockup_math::get_withdrawable_amount; + +pub fn handler(ctx: Context, _stream_id: u64) -> Result { + Ok(get_withdrawable_amount(&ctx.accounts.stream_data.timestamps, &ctx.accounts.stream_data.amounts)) +} diff --git a/programs/lockup/src/instructions/withdrawable_amount_of.rs b/programs/lockup/src/instructions/withdrawable_amount_of.rs deleted file mode 100644 index a733f0b9..00000000 --- a/programs/lockup/src/instructions/withdrawable_amount_of.rs +++ /dev/null @@ -1,36 +0,0 @@ -use anchor_lang::prelude::*; -use anchor_spl::token_interface::Mint; - -use crate::{ - state::lockup::StreamData, - utils::{constants::*, events::*, lockup_math::get_withdrawable_amount}, -}; - -#[derive(Accounts)] -#[instruction(stream_id: u64)] -pub struct WithdrawableAmountOf<'info> { - // #[account(mut)] - // pub signer: Signer<'info>, // TODO: try removing this account, given that this is a "read-only" Ix - #[account( - seeds = [STREAM_NFT_MINT_SEED, - stream_id.to_le_bytes().as_ref()], - bump, - )] - pub stream_nft_mint: Box>, - - #[account( - seeds = [STREAM_DATA_SEED, - stream_nft_mint.key().as_ref()], - bump = stream_data.bump, - )] - pub stream_data: Box>, -} - -pub fn handler(ctx: Context, stream_id: u64) -> Result { - let amount = get_withdrawable_amount(&ctx.accounts.stream_data.timestamps, &ctx.accounts.stream_data.amounts); - - // Emit an event indicating that the withdrawable amount has been queried - emit!(WithdrawableAmountQueried { stream_id, withdrawable_amount: amount }); - - Ok(amount) -} diff --git a/programs/lockup/src/lib.rs b/programs/lockup/src/lib.rs index 691983ef..673bd92f 100644 --- a/programs/lockup/src/lib.rs +++ b/programs/lockup/src/lib.rs @@ -72,11 +72,23 @@ pub mod sablier_lockup { instructions::renounce::handler(ctx) } + pub fn refundable_amount_of(ctx: Context, stream_id: u64) -> Result { + instructions::refundable_amount_of::handler(ctx, stream_id) + } + + pub fn status_of(ctx: Context, stream_id: u64) -> Result { + instructions::status_of::handler(ctx, stream_id) + } + + pub fn streamed_amount_of(ctx: Context, stream_id: u64) -> Result { + instructions::streamed_amount_of::handler(ctx, stream_id) + } + pub fn withdraw(ctx: Context, _stream_id: u64, amount: u64) -> Result<()> { instructions::withdraw::handler(ctx, amount) } - pub fn withdrawable_amount_of(ctx: Context, stream_id: u64) -> Result { + pub fn withdrawable_amount_of(ctx: Context, stream_id: u64) -> Result { instructions::withdrawable_amount_of::handler(ctx, stream_id) } diff --git a/programs/lockup/src/utils/events.rs b/programs/lockup/src/utils/events.rs index 29d7d4bf..6d6687a3 100644 --- a/programs/lockup/src/utils/events.rs +++ b/programs/lockup/src/utils/events.rs @@ -30,9 +30,3 @@ pub struct WithdrawFromLockupStream { pub stream_id: u64, pub withdrawn_amount: u64, } - -#[event] -pub struct WithdrawableAmountQueried { - pub stream_id: u64, - pub withdrawable_amount: u64, -}