feat: миграция smart-updown на anchor 0.31.1 + solana 2.x (SBPFv3)

- anchor-lang 0.31.1 вместо 2.0-rc/anchor-next (git)
- Address -> Pubkey (state/events/instructions)
- убран #[discrim], добавлен #[derive(InitSpace)] + space=8+INIT_SPACE
- тесты переписаны на solana-program-test 2.x (10 passed)
- сборка SBPFv3 через cargo build-sbf --tools-version v1.57
- deploy успешен в нашу сеть (agave 4.2.2, SBPFv3)
This commit is contained in:
2026-09-03 05:27:34 +03:00
parent 2133f65e21
commit 9f100ee122
13 changed files with 5784 additions and 1395 deletions
+10 -9
View File
@@ -15,19 +15,20 @@ cpi = ["no-entrypoint"]
no-entrypoint = []
no-log-ix-name = []
idl-build = []
profile = ["anchor-v2-testing/profile"]
[dependencies]
# Once anchor-lang is published to crates.io, swap to: anchor-lang = "2.0.0-rc.1"
anchor-lang = { git = "https://github.com/otter-sec/anchor.git", branch = "anchor-next" }
solana-program-log = { version = "1.1", features = ["macro"] }
wincode = { version = "0.5", features = ["derive"] }
anchor-lang = "0.31.1"
[dev-dependencies]
anchor-v2-testing = { git = "https://github.com/otter-sec/anchor.git", branch = "anchor-next" }
solana-clock = "3.0.1"
solana-pubkey = "3.0.0"
anchor-lang = "0.31.1"
solana-program-test = "2.1"
solana-client = "2.1"
solana-pubkey = "2.1"
solana-signer = "2.1"
solana-keypair = "2.1"
solana-clock = "2.1"
solana-transaction = "2.1"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(target_os, values("solana"))'] }