feat: migrate smart-updown contract to SPL-token (фантики)

- create_bet: escrow фантиков с bettor на vault (PDA[global,vault]) через anchor_spl::token
- close_bet: выплата фантиков из vault на bettor (CPI с signer_seeds vault)
- state/constants: comments про единицы (token units decimals=6), + VAULT_SEED
- IDL регенерирован (idl/ + relayer/idl/) с аккаунтами bettor_token/vault_token/token_program
- тесты обновлены под токен (10/10 + doctest)
This commit is contained in:
Caffeine
2026-09-09 22:00:41 +03:00
parent ff2289e68d
commit 45d64d45a7
10 changed files with 1106 additions and 120 deletions
+5 -1
View File
@@ -14,10 +14,11 @@ default = []
cpi = ["no-entrypoint"]
no-entrypoint = []
no-log-ix-name = []
idl-build = []
idl-build = ["anchor-lang/idl-build", "anchor-spl/idl-build"]
[dependencies]
anchor-lang = "0.31.1"
anchor-spl = "0.31.1"
[dev-dependencies]
anchor-lang = "0.31.1"
@@ -27,7 +28,10 @@ solana-pubkey = "2.1"
solana-signer = "2.1"
solana-keypair = "2.1"
solana-clock = "2.1"
solana-account = "2.1"
solana-transaction = "2.1"
spl-token = "7.0.0"
spl-associated-token-account = "6.0.0"
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
[lints.rust]