diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ea497f77..e81998fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,9 +7,9 @@ on: - release_0.1.7 env: - SOLANA_CLI_VERSION: 2.1.0 + SOLANA_CLI_VERSION: 2.3.0 NODE_VERSION: 18.20.6 - ANCHOR_CLI_VERSION: 0.31.0 + ANCHOR_CLI_VERSION: 0.32.1 TOOLCHAIN: 1.76.0 jobs: diff --git a/Anchor.toml b/Anchor.toml index 371b8599..2b807573 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -16,5 +16,5 @@ wallet = "keys/local/admin-bossj3JvwiNK7pvjr149DqdtJxf2gdygbcmEPTkb2F1.json" test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts" [toolchain] -anchor_version = "0.31.0" -solana_version = "2.1.0" +anchor_version = "0.32.1" +solana_version = "2.3.0" diff --git a/Cargo.lock b/Cargo.lock index c84e7ad5..2a04c01f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -71,9 +71,9 @@ dependencies = [ [[package]] name = "anchor-attribute-access-control" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f70fd141a4d18adf11253026b32504f885447048c7494faf5fa83b01af9c0cf" +checksum = "7a883ca44ef14b2113615fc6d3a85fefc68b5002034e88db37f7f1f802f88aa9" dependencies = [ "anchor-syn", "proc-macro2", @@ -83,9 +83,9 @@ dependencies = [ [[package]] name = "anchor-attribute-account" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715a261c57c7679581e06f07a74fa2af874ac30f86bd8ea07cca4a7e5388a064" +checksum = "61c4d97763b29030412b4b80715076377edc9cc63bc3c9e667297778384b9fd2" dependencies = [ "anchor-syn", "bs58", @@ -96,9 +96,9 @@ dependencies = [ [[package]] name = "anchor-attribute-constant" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "730d6df8ae120321c5c25e0779e61789e4b70dc8297102248902022f286102e4" +checksum = "aae3328bbf9bbd517a51621b1ba6cbec06cbbc25e8cfc7403bddf69bcf088206" dependencies = [ "anchor-syn", "quote", @@ -107,9 +107,9 @@ dependencies = [ [[package]] name = "anchor-attribute-error" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e6e449cc3a37b2880b74dcafb8e5a17b954c0e58e376432d7adc646fb333ef" +checksum = "cf2398a6d9e16df1ee9d7d37d970a8246756de898c8dd16ef6bdbe4da20cf39a" dependencies = [ "anchor-syn", "quote", @@ -118,9 +118,9 @@ dependencies = [ [[package]] name = "anchor-attribute-event" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7710e4c54adf485affcd9be9adec5ef8846d9c71d7f31e16ba86ff9fc1dd49f" +checksum = "f12758f4ec2f0e98d4d56916c6fe95cb23d74b8723dd902c762c5ef46ebe7b65" dependencies = [ "anchor-syn", "proc-macro2", @@ -130,9 +130,9 @@ dependencies = [ [[package]] name = "anchor-attribute-program" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ecfd49b2aeadeb32f35262230db402abed76ce87e27562b34f61318b2ec83c" +checksum = "8c7193b5af2649813584aae6e3569c46fd59616a96af2083c556b13136c3830f" dependencies = [ "anchor-lang-idl", "anchor-syn", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "anchor-derive-accounts" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be89d160793a88495af462a7010b3978e48e30a630c91de47ce2c1d3cb7a6149" +checksum = "d332d1a13c0fca1a446de140b656e66110a5e8406977dcb6a41e5d6f323760b0" dependencies = [ "anchor-syn", "quote", @@ -158,9 +158,9 @@ dependencies = [ [[package]] name = "anchor-derive-serde" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abc6ee78acb7bfe0c2dd2abc677aaa4789c0281a0c0ef01dbf6fe85e0fd9e6e4" +checksum = "8656e4af182edaeae665fa2d2d7ee81148518b5bd0be9a67f2a381bb17da7d46" dependencies = [ "anchor-syn", "borsh-derive-internal", @@ -171,9 +171,9 @@ dependencies = [ [[package]] name = "anchor-derive-space" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134a01c0703f6fd355a0e472c033f6f3e41fac1ef6e370b20c50f4c8d022cea7" +checksum = "dcff2a083560cd79817db07d89a4de39a2c4b2eaa00c1742cf0df49b25ff2bed" dependencies = [ "proc-macro2", "quote", @@ -182,9 +182,9 @@ dependencies = [ [[package]] name = "anchor-lang" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6bab117055905e930f762c196e08f861f8dfe7241b92cee46677a3b15561a0a" +checksum = "e67d85d5376578f12d840c29ff323190f6eecd65b00a0b5f2b2f232751d049cc" dependencies = [ "anchor-attribute-access-control", "anchor-attribute-account", @@ -200,7 +200,26 @@ dependencies = [ "bincode", "borsh 0.10.3", "bytemuck", - "solana-program", + "solana-account-info", + "solana-clock", + "solana-cpi", + "solana-define-syscall", + "solana-feature-gate-interface", + "solana-instruction", + "solana-instructions-sysvar", + "solana-invoke", + "solana-loader-v3-interface 3.0.0", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", + "solana-sysvar", + "solana-sysvar-id", "thiserror 1.0.69", ] @@ -231,9 +250,9 @@ dependencies = [ [[package]] name = "anchor-spl" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c08cb5d762c0694f74bd02c9a5b04ea53cefc496e2c27b3234acffca5cd076b" +checksum = "3397ab3fc5b198bbfe55d827ff58bd69f2a8d3f9f71c3732c23c2093fec4d3ef" dependencies = [ "anchor-lang", "spl-associated-token-account", @@ -241,14 +260,14 @@ dependencies = [ "spl-token", "spl-token-2022", "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-metadata-interface 0.7.0", ] [[package]] name = "anchor-syn" -version = "0.31.1" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc7a6d90cc643df0ed2744862cdf180587d1e5d28936538c18fc8908489ed67" +checksum = "b93b69aa7d099b59378433f6d7e20e1008fc10c69e48b220270e5b3f2ec4c8be" dependencies = [ "anyhow", "bs58", @@ -532,11 +551,11 @@ dependencies = [ [[package]] name = "borsh" -version = "1.5.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5430e3be710b68d984d1391c854eb431a9d548640711faa54eecb1df93db91cc" +checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f" dependencies = [ - "borsh-derive 1.5.5", + "borsh-derive 1.6.0", "cfg_aliases", ] @@ -555,9 +574,9 @@ dependencies = [ [[package]] name = "borsh-derive" -version = "1.5.5" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8b668d39970baad5356d7c83a86fee3a539e6f93bf6764c97368243e17a0487" +checksum = "0686c856aa6aac0c4498f936d7d6a02df690f614c03e4d906d1018062b5c5e2c" dependencies = [ "once_cell", "proc-macro-crate 3.3.0", @@ -621,18 +640,18 @@ checksum = "7575182f7272186991736b70173b0ea045398f984bf5ebbb3804736ce1330c9d" [[package]] name = "bytemuck" -version = "1.23.0" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9134a6ef01ce4b366b50689c94f82c14bc72bc5d0386829828a2e2752ef7958c" +checksum = "1fbdf580320f38b612e485521afda1ee26d10cc9884efaaa750d383e13e3c5f4" dependencies = [ "bytemuck_derive", ] [[package]] name = "bytemuck_derive" -version = "1.8.1" +version = "1.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa76293b4f7bb636ab88fd78228235b5248b4d05cc589aed610f954af5d7c7a" +checksum = "f9abbd1bc6865053c427f7198e6af43bfdedc55ab791faed4fbd361d789575ff" dependencies = [ "proc-macro2", "quote", @@ -745,7 +764,7 @@ dependencies = [ "pinocchio-token-2022", "proptest", "ruint", - "spl-token-metadata-interface", + "spl-token-metadata-interface 0.6.0", "static_assertions", "zap", ] @@ -913,6 +932,15 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "28dea519a9695b9977216879a3ebfddf92f1c08c05d984f8996aecd6ecdc811d" +[[package]] +name = "five8" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75b8549488b4715defcb0d8a8a1c1c76a80661b5fa106b4ca0e7fce59d7d875" +dependencies = [ + "five8_core", +] + [[package]] name = "five8_const" version = "0.1.4" @@ -1998,9 +2026,9 @@ dependencies = [ [[package]] name = "solana-account-info" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e0c17d606a298a205fae325489fbed88ee6dc4463c111672172327e741c8905d" +checksum = "c8f5152a288ef1912300fc6efa6c2d1f9bb55d9398eb6c72326360b8063987da" dependencies = [ "bincode", "serde", @@ -2076,7 +2104,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "718333bcd0a1a7aed6655aa66bef8d7fb047944922b2d3a18f49cbc13e73d004" dependencies = [ "borsh 0.10.3", - "borsh 1.5.5", + "borsh 1.6.0", ] [[package]] @@ -2108,9 +2136,9 @@ dependencies = [ [[package]] name = "solana-curve25519" -version = "2.2.3" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa1f28fdc4acdf6d1e47eec6fea58e88a650ca08f6a779d34730a616a2a82801" +checksum = "eae4261b9a8613d10e77ac831a8fa60b6fa52b9b103df46d641deff9f9812a23" dependencies = [ "bytemuck", "bytemuck_derive", @@ -2131,9 +2159,9 @@ dependencies = [ [[package]] name = "solana-define-syscall" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf784bb2cb3e02cac9801813c30187344228d2ae952534902108f6150573a33d" +checksum = "2ae3e2abcf541c8122eafe9a625d4d194b4023c20adde1e251f94e056bb1aee2" [[package]] name = "solana-derivation-path" @@ -2230,7 +2258,7 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cf7bcb14392900fe02e4e34e90234fbf0c673d4e327888410ba99fa2ba0f4e99" dependencies = [ - "borsh 1.5.5", + "borsh 1.6.0", "bs58", "bytemuck", "bytemuck_derive", @@ -2244,17 +2272,18 @@ dependencies = [ [[package]] name = "solana-instruction" -version = "2.2.1" +version = "2.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce496a475e5062ba5de97215ab39d9c358f9c9df4bb7f3a45a1f1a8bd9065ed" +checksum = "bab5682934bd1f65f8d2c16f21cb532526fcc1a09f796e2cacdb091eee5774ad" dependencies = [ "bincode", - "borsh 1.5.5", + "borsh 1.6.0", "getrandom 0.2.10", "js-sys", "num-traits", "serde", "serde_derive", + "serde_json", "solana-define-syscall", "solana-pubkey", "wasm-bindgen", @@ -2262,9 +2291,9 @@ dependencies = [ [[package]] name = "solana-instructions-sysvar" -version = "2.2.1" +version = "2.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "427f2d0d6dc0bb49f16cef5e7f975180d2e80aab9bdd3b2af68e2d029ec63f43" +checksum = "e0e85a6fad5c2d0c4f5b91d34b8ca47118fc593af706e523cdbedf846a954f57" dependencies = [ "bitflags 2.9.0", "solana-account-info", @@ -2277,6 +2306,19 @@ dependencies = [ "solana-sysvar-id", ] +[[package]] +name = "solana-invoke" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "58f5693c6de226b3626658377168b0184e94e8292ff16e3d31d4766e65627565" +dependencies = [ + "solana-account-info", + "solana-define-syscall", + "solana-instruction", + "solana-program-entrypoint", + "solana-stable-layout", +] + [[package]] name = "solana-keccak-hasher" version = "2.2.1" @@ -2331,6 +2373,21 @@ dependencies = [ "solana-system-interface", ] +[[package]] +name = "solana-loader-v3-interface" +version = "5.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6f7162a05b8b0773156b443bccd674ea78bb9aa406325b467ea78c06c99a63a2" +dependencies = [ + "serde", + "serde_bytes", + "serde_derive", + "solana-instruction", + "solana-pubkey", + "solana-sdk-ids", + "solana-system-interface", +] + [[package]] name = "solana-loader-v4-interface" version = "2.2.1" @@ -2400,14 +2457,14 @@ dependencies = [ [[package]] name = "solana-program" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "586469467e93ceb79048f8d8e3a619bf61d05396ee7de95cb40280301a589d05" +checksum = "98eca145bd3545e2fbb07166e895370576e47a00a7d824e325390d33bf467210" dependencies = [ "bincode", "blake3", "borsh 0.10.3", - "borsh 1.5.5", + "borsh 1.6.0", "bs58", "bytemuck", "console_error_panic_hook", @@ -2445,7 +2502,7 @@ dependencies = [ "solana-keccak-hasher", "solana-last-restart-slot", "solana-loader-v2-interface", - "solana-loader-v3-interface", + "solana-loader-v3-interface 5.0.0", "solana-loader-v4-interface", "solana-message", "solana-msg", @@ -2496,7 +2553,7 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d8ae2c1a8d0d4ae865882d5770a7ebca92bab9c685e43f0461682c6c05a35bfa" dependencies = [ - "borsh 1.5.5", + "borsh 1.6.0", "num-traits", "serde", "serde_derive", @@ -2533,16 +2590,16 @@ dependencies = [ [[package]] name = "solana-pubkey" -version = "2.2.1" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40db1ff5a0f8aea2c158d78ab5f2cf897848964251d1df42fef78efd3c85b863" +checksum = "9b62adb9c3261a052ca1f999398c388f1daf558a1b492f60a6d9e64857db4ff1" dependencies = [ "borsh 0.10.3", - "borsh 1.5.5", - "bs58", + "borsh 1.6.0", "bytemuck", "bytemuck_derive", "curve25519-dalek", + "five8", "five8_const", "getrandom 0.2.10", "js-sys", @@ -2676,11 +2733,11 @@ dependencies = [ [[package]] name = "solana-signature" -version = "2.2.1" +version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47d251c8f3dc015f320b4161daac7f108156c837428e5a8cc61136d25beb11d6" +checksum = "64c8ec8e657aecfc187522fc67495142c12f35e55ddeca8698edbb738b8dbd8c" dependencies = [ - "bs58", + "five8", "solana-sanitize", ] @@ -2738,7 +2795,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5269e89fde216b4d7e1d1739cf5303f8398a1ff372a81232abbee80e554a838c" dependencies = [ "borsh 0.10.3", - "borsh 1.5.5", + "borsh 1.6.0", "num-traits", "serde", "serde_derive", @@ -2851,9 +2908,9 @@ dependencies = [ [[package]] name = "solana-zk-sdk" -version = "2.2.3" +version = "2.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faf45055dc78b74fdced852f9ed3a6f46eb13754f88b75675d9ce2bc7f242ea9" +checksum = "97b9fc6ec37d16d0dccff708ed1dd6ea9ba61796700c3bb7c3b401973f10f63b" dependencies = [ "aes-gcm-siv", "base64 0.22.1", @@ -2863,7 +2920,6 @@ dependencies = [ "curve25519-dalek", "itertools 0.12.1", "js-sys", - "lazy_static", "merlin", "num-derive", "num-traits", @@ -2888,18 +2944,18 @@ dependencies = [ [[package]] name = "spl-associated-token-account" -version = "6.0.0" +version = "7.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fee7d65013667032d499adc3c895e286197a35a0d3a4643c80e7fd3e9969e3" +checksum = "ae179d4a26b3c7a20c839898e6aed84cb4477adf108a366c95532f058aea041b" dependencies = [ - "borsh 1.5.5", + "borsh 1.6.0", "num-derive", "num-traits", "solana-program", "spl-associated-token-account-client", "spl-token", "spl-token-2022", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] @@ -2950,12 +3006,22 @@ dependencies = [ [[package]] name = "spl-elgamal-registry" -version = "0.1.1" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce0f668975d2b0536e8a8fd60e56a05c467f06021dae037f1d0cfed0de2e231d" +checksum = "65edfeed09cd4231e595616aa96022214f9c9d2be02dea62c2b30d5695a6833a" dependencies = [ "bytemuck", - "solana-program", + "solana-account-info", + "solana-cpi", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-system-interface", + "solana-sysvar", "solana-zk-sdk", "spl-pod", "spl-token-confidential-transfer-proof-extraction", @@ -2981,7 +3047,7 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d994afaf86b779104b4a95ba9ca75b8ced3fdb17ee934e38cb69e72afbe17799" dependencies = [ - "borsh 1.5.5", + "borsh 1.6.0", "bytemuck", "bytemuck_derive", "num-derive", @@ -2997,22 +3063,24 @@ dependencies = [ [[package]] name = "spl-program-error" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d39b5186f42b2b50168029d81e58e800b690877ef0b30580d107659250da1d1" +checksum = "9cdebc8b42553070b75aa5106f071fef2eb798c64a7ec63375da4b1f058688c6" dependencies = [ "num-derive", "num-traits", - "solana-program", + "solana-decode-error", + "solana-msg", + "solana-program-error", "spl-program-error-derive", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "spl-program-error-derive" -version = "0.4.1" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d375dd76c517836353e093c2dbb490938ff72821ab568b545fd30ab3256b3e" +checksum = "2a2539e259c66910d78593475540e8072f0b10f0f61d7607bbf7593899ed52d0" dependencies = [ "proc-macro2", "quote", @@ -3022,9 +3090,9 @@ dependencies = [ [[package]] name = "spl-tlv-account-resolution" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd99ff1e9ed2ab86e3fd582850d47a739fec1be9f4661cba1782d3a0f26805f3" +checksum = "1408e961215688715d5a1063cbdcf982de225c45f99c82b4f7d7e1dd22b998d7" dependencies = [ "bytemuck", "num-derive", @@ -3038,38 +3106,67 @@ dependencies = [ "spl-discriminator", "spl-pod", "spl-program-error", - "spl-type-length-value", - "thiserror 1.0.69", + "spl-type-length-value 0.8.0", + "thiserror 2.0.12", ] [[package]] name = "spl-token" -version = "7.0.0" +version = "8.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed320a6c934128d4f7e54fe00e16b8aeaecf215799d060ae14f93378da6dc834" +checksum = "053067c6a82c705004f91dae058b11b4780407e9ccd6799dc9e7d0fab5f242da" dependencies = [ "arrayref", "bytemuck", "num-derive", "num-traits", "num_enum", - "solana-program", - "thiserror 1.0.69", + "solana-account-info", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", + "solana-sysvar", + "thiserror 2.0.12", ] [[package]] name = "spl-token-2022" -version = "6.0.0" +version = "8.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b27f7405010ef816587c944536b0eafbcc35206ab6ba0f2ca79f1d28e488f4f" +checksum = "31f0dfbb079eebaee55e793e92ca5f433744f4b71ee04880bfd6beefba5973e5" dependencies = [ "arrayref", "bytemuck", "num-derive", "num-traits", "num_enum", - "solana-program", + "solana-account-info", + "solana-clock", + "solana-cpi", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-native-token", + "solana-program-entrypoint", + "solana-program-error", + "solana-program-memory", + "solana-program-option", + "solana-program-pack", + "solana-pubkey", + "solana-rent", + "solana-sdk-ids", "solana-security-txt", + "solana-system-interface", + "solana-sysvar", "solana-zk-sdk", "spl-elgamal-registry", "spl-memo", @@ -3079,17 +3176,17 @@ dependencies = [ "spl-token-confidential-transfer-proof-extraction", "spl-token-confidential-transfer-proof-generation", "spl-token-group-interface", - "spl-token-metadata-interface", + "spl-token-metadata-interface 0.7.0", "spl-transfer-hook-interface", - "spl-type-length-value", - "thiserror 1.0.69", + "spl-type-length-value 0.8.0", + "thiserror 2.0.12", ] [[package]] name = "spl-token-confidential-transfer-ciphertext-arithmetic" -version = "0.2.1" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "170378693c5516090f6d37ae9bad2b9b6125069be68d9acd4865bbe9fc8499fd" +checksum = "cddd52bfc0f1c677b41493dafa3f2dbbb4b47cf0990f08905429e19dc8289b35" dependencies = [ "base64 0.22.1", "bytemuck", @@ -3099,13 +3196,19 @@ dependencies = [ [[package]] name = "spl-token-confidential-transfer-proof-extraction" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eff2d6a445a147c9d6dd77b8301b1e116c8299601794b558eafa409b342faf96" +checksum = "fe2629860ff04c17bafa9ba4bed8850a404ecac81074113e1f840dbd0ebb7bd6" dependencies = [ "bytemuck", + "solana-account-info", "solana-curve25519", - "solana-program", + "solana-instruction", + "solana-instructions-sysvar", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "solana-sdk-ids", "solana-zk-sdk", "spl-pod", "thiserror 2.0.12", @@ -3113,20 +3216,20 @@ dependencies = [ [[package]] name = "spl-token-confidential-transfer-proof-generation" -version = "0.2.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8627184782eec1894de8ea26129c61303f1f0adeed65c20e0b10bc584f09356d" +checksum = "fa27b9174bea869a7ebf31e0be6890bce90b1a4288bc2bbf24bd413f80ae3fde" dependencies = [ "curve25519-dalek", "solana-zk-sdk", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] name = "spl-token-group-interface" -version = "0.5.0" +version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d595667ed72dbfed8c251708f406d7c2814a3fa6879893b323d56a10bedfc799" +checksum = "5597b4cd76f85ce7cd206045b7dc22da8c25516573d42d267c8d1fd128db5129" dependencies = [ "bytemuck", "num-derive", @@ -3138,7 +3241,7 @@ dependencies = [ "solana-pubkey", "spl-discriminator", "spl-pod", - "thiserror 1.0.69", + "thiserror 2.0.12", ] [[package]] @@ -3147,7 +3250,7 @@ version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dfb9c89dbc877abd735f05547dcf9e6e12c00c11d6d74d8817506cab4c99fdbb" dependencies = [ - "borsh 1.5.5", + "borsh 1.6.0", "num-derive", "num-traits", "solana-borsh", @@ -3158,15 +3261,36 @@ dependencies = [ "solana-pubkey", "spl-discriminator", "spl-pod", - "spl-type-length-value", + "spl-type-length-value 0.7.0", "thiserror 1.0.69", ] +[[package]] +name = "spl-token-metadata-interface" +version = "0.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "304d6e06f0de0c13a621464b1fd5d4b1bebf60d15ca71a44d3839958e0da16ee" +dependencies = [ + "borsh 1.6.0", + "num-derive", + "num-traits", + "solana-borsh", + "solana-decode-error", + "solana-instruction", + "solana-msg", + "solana-program-error", + "solana-pubkey", + "spl-discriminator", + "spl-pod", + "spl-type-length-value 0.8.0", + "thiserror 2.0.12", +] + [[package]] name = "spl-transfer-hook-interface" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4aa7503d52107c33c88e845e1351565050362c2314036ddf19a36cd25137c043" +checksum = "a7e905b849b6aba63bde8c4badac944ebb6c8e6e14817029cbe1bc16829133bd" dependencies = [ "arrayref", "bytemuck", @@ -3183,8 +3307,8 @@ dependencies = [ "spl-pod", "spl-program-error", "spl-tlv-account-resolution", - "spl-type-length-value", - "thiserror 1.0.69", + "spl-type-length-value 0.8.0", + "thiserror 2.0.12", ] [[package]] @@ -3205,6 +3329,24 @@ dependencies = [ "thiserror 1.0.69", ] +[[package]] +name = "spl-type-length-value" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d417eb548214fa822d93f84444024b4e57c13ed6719d4dcc68eec24fb481e9f5" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "solana-account-info", + "solana-decode-error", + "solana-msg", + "solana-program-error", + "spl-discriminator", + "spl-pod", + "thiserror 2.0.12", +] + [[package]] name = "static_assertions" version = "1.1.0" diff --git a/Cargo.toml b/Cargo.toml index 96ffd8a8..23c7886b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ incremental = false codegen-units = 1 [workspace.dependencies] -anchor-lang = { version = "0.31.0", features = ["init-if-needed"] } -anchor-spl = "0.31.0" -anchor-client = "0.31.0" +anchor-lang = { version = "0.32.1", features = ["init-if-needed"] } +anchor-spl = "0.32.1" +anchor-client = "0.32.1" bytemuck = { version = "1.20.0"} \ No newline at end of file diff --git a/package.json b/package.json index d8ba59da..c3824646 100644 --- a/package.json +++ b/package.json @@ -5,8 +5,8 @@ "test": "anchor build -- --features local && yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/*.test.ts" }, "dependencies": { - "@coral-xyz/anchor": "^0.31.0", - "@coral-xyz/borsh": "^0.31.0", + "@coral-xyz/borsh": "^0.32.1", + "@coral-xyz/anchor": "^0.32.1", "@solana/spl-token": "^0.4.13", "@solana/web3.js": "^1.98.2", "borsh": "^2.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index f581b544..c8fc240d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -9,11 +9,11 @@ importers: .: dependencies: '@coral-xyz/anchor': - specifier: ^0.31.0 - version: 0.31.1(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10) + specifier: ^0.32.1 + version: 0.32.1(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10) '@coral-xyz/borsh': - specifier: ^0.31.0 - version: 0.31.1(@solana/web3.js@1.98.4(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10)) + specifier: ^0.32.1 + version: 0.32.1(@solana/web3.js@1.98.4(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10)) '@solana/spl-token': specifier: ^0.4.13 version: 0.4.14(@solana/web3.js@1.98.4(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10))(bufferutil@4.0.9)(fastestsmallesttextencoderdecoder@1.0.22)(typescript@5.9.3)(utf-8-validate@5.0.10) @@ -68,8 +68,8 @@ packages: resolution: {integrity: sha512-NhNEku4F3zzUSBtrYz84FzYWm48+9OvmT1Hhnwr6GnPQry2dsEqH/ti/7ASjjpoFTWRnPXrjAIT1qM6Isop+LQ==} engines: {node: '>=10'} - '@coral-xyz/anchor@0.31.1': - resolution: {integrity: sha512-QUqpoEK+gi2S6nlYc2atgT2r41TT3caWr/cPUEL8n8Md9437trZ68STknq897b82p5mW0XrTBNOzRbmIRJtfsA==} + '@coral-xyz/anchor@0.32.1': + resolution: {integrity: sha512-zAyxFtfeje2FbMA1wzgcdVs7Hng/MijPKpRijoySPCicnvcTQs/+dnPZ/cR+LcXM9v9UYSyW81uRNYZtN5G4yg==} engines: {node: '>=17'} '@coral-xyz/borsh@0.31.1': @@ -78,6 +78,12 @@ packages: peerDependencies: '@solana/web3.js': ^1.69.0 + '@coral-xyz/borsh@0.32.1': + resolution: {integrity: sha512-pWsqkkZ+psLlupMkgu5rDok7baDQLWKqyDsb76gUNArbVB783mF3ZOleKMHVXZczl5JuxnVVfO1+XDVvR17C3A==} + engines: {node: '>=10'} + peerDependencies: + '@solana/web3.js': ^1.69.0 + '@noble/curves@1.9.7': resolution: {integrity: sha512-gbKGcRUYIjA3/zCCNaWDciTMFI0dCkvou3TL8Zmy5Nc7sJ47a0jtOeZoTaMxkuqRo9cRhjOdZJXegxYE5FN/xw==} engines: {node: ^14.21.3 || >=16} @@ -844,7 +850,7 @@ snapshots: '@coral-xyz/anchor-errors@0.31.1': {} - '@coral-xyz/anchor@0.31.1(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10)': + '@coral-xyz/anchor@0.32.1(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10)': dependencies: '@coral-xyz/anchor-errors': 0.31.1 '@coral-xyz/borsh': 0.31.1(@solana/web3.js@1.98.4(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10)) @@ -871,6 +877,12 @@ snapshots: bn.js: 5.2.2 buffer-layout: 1.2.2 + '@coral-xyz/borsh@0.32.1(@solana/web3.js@1.98.4(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10))': + dependencies: + '@solana/web3.js': 1.98.4(bufferutil@4.0.9)(typescript@5.9.3)(utf-8-validate@5.0.10) + bn.js: 5.2.2 + buffer-layout: 1.2.2 + '@noble/curves@1.9.7': dependencies: '@noble/hashes': 1.8.0 diff --git a/programs/cp-amm/src/constants.rs b/programs/cp-amm/src/constants.rs index 00e6bacf..5fbb9a1f 100644 --- a/programs/cp-amm/src/constants.rs +++ b/programs/cp-amm/src/constants.rs @@ -254,7 +254,7 @@ pub mod seeds { } pub mod treasury { - use anchor_lang::{prelude::Pubkey, solana_program::pubkey}; + use anchor_lang::{prelude::Pubkey, pubkey}; // https://app.squads.so/squads/4EWqcx3aNZmMetCnxwLYwyNjan6XLGp3Ca2W316vrSjv/treasury pub const ID: Pubkey = pubkey!("4EWqcx3aNZmMetCnxwLYwyNjan6XLGp3Ca2W316vrSjv"); } diff --git a/programs/cp-amm/src/entrypoint.rs b/programs/cp-amm/src/entrypoint.rs index 7e7f3232..a178e52a 100644 --- a/programs/cp-amm/src/entrypoint.rs +++ b/programs/cp-amm/src/entrypoint.rs @@ -3,7 +3,11 @@ use crate::{ SWAP_IX_ACCOUNTS, }; use anchor_lang::{ - prelude::{event::EVENT_IX_TAG_LE, *}, + prelude::{ + entrypoint::{custom_heap_default, custom_panic_default}, + event::EVENT_IX_TAG_LE, + *, + }, solana_program, }; @@ -119,5 +123,5 @@ pub unsafe extern "C" fn entrypoint(input: *mut u8) -> u64 { } } } -solana_program::custom_heap_default!(); -solana_program::custom_panic_default!(); +custom_heap_default!(); +custom_panic_default!(); diff --git a/programs/cp-amm/src/instructions/admin/auth.rs b/programs/cp-amm/src/instructions/admin/auth.rs index a181042a..a581d3f4 100644 --- a/programs/cp-amm/src/instructions/admin/auth.rs +++ b/programs/cp-amm/src/instructions/admin/auth.rs @@ -1,7 +1,7 @@ use anchor_lang::prelude::*; pub mod admin { - use anchor_lang::{prelude::Pubkey, solana_program::pubkey}; + use anchor_lang::{prelude::Pubkey, pubkey}; pub const ADMINS: [Pubkey; 2] = [ pubkey!("5unTfT2kssBuNvHPY6LbJfJpLqEcdMxGYLWHwShaeTLi"), diff --git a/programs/cp-amm/src/instructions/swap/ix_p_swap.rs b/programs/cp-amm/src/instructions/swap/ix_p_swap.rs index 5a1bb4e7..4a3d1c98 100644 --- a/programs/cp-amm/src/instructions/swap/ix_p_swap.rs +++ b/programs/cp-amm/src/instructions/swap/ix_p_swap.rs @@ -3,6 +3,7 @@ use crate::p_helper::{ p_accessor_mint, p_get_number_of_accounts_in_instruction, p_load_mut_unchecked, p_transfer_from_pool, p_transfer_from_user, }; +use crate::safe_math::SafeMath; use crate::state::SwapResult2; use crate::{instruction::Swap as SwapInstruction, instruction::Swap2 as Swap2Instruction}; use crate::{ @@ -10,13 +11,12 @@ use crate::{ ProcessSwapParams, ProcessSwapResult, SwapCtx, }; use anchor_lang::prelude::*; -use anchor_lang::solana_program::instruction::{ - get_processed_sibling_instruction, get_stack_height, Instruction, -}; +use anchor_lang::solana_program::instruction::{get_stack_height, Instruction}; + +use anchor_spl::associated_token::spl_associated_token_account::solana_program::instruction::get_processed_sibling_instruction; use pinocchio::account_info::AccountInfo; use pinocchio::sysvars::instructions::{Instructions, IntrospectedInstruction, INSTRUCTIONS_ID}; -use crate::safe_math::SafeMath; use crate::{ activation_handler::ActivationHandler, get_pool_access_validator, @@ -297,6 +297,7 @@ pub fn validate_single_swap_instruction<'c, 'info>( if get_stack_height() > 2 { return Err(PoolError::FailToValidateSingleSwapInstruction.into()); } + // check for any sibling instruction let mut sibling_index = 0; while let Some(sibling_instruction) = get_processed_sibling_instruction(sibling_index) { diff --git a/programs/cp-amm/src/utils/alpha_vault.rs b/programs/cp-amm/src/utils/alpha_vault.rs index 53d696df..a31d88ca 100644 --- a/programs/cp-amm/src/utils/alpha_vault.rs +++ b/programs/cp-amm/src/utils/alpha_vault.rs @@ -1,5 +1,5 @@ pub mod alpha_vault { - use anchor_lang::{prelude::Pubkey, solana_program::pubkey}; + use anchor_lang::{prelude::Pubkey, pubkey}; #[cfg(not(feature = "local"))] pub const ID: Pubkey = pubkey!("vaU6kP7iNEGkbmPkLmZfGwiGxd4Mob24QQCie5R9kd2");