Browse Source

deps: Bump sdk to v3, decouple from token program (#78)

#### Problem

The interface crate is still on the v2 sdk crates, but the v3 crates are
ready.

#### Summary of changes

Bump the sdk crates to v3 and decouple the program from the repo version
of the interface crate. The only change is the `to_str` signature on the
error.

While doing this, I noticed that the interface crate wasn't actually
part of the workspace, so I added it in.
Jon C 2 months ago
parent
commit
2f4fd18f65
5 changed files with 252 additions and 181 deletions
  1. 243 172
      Cargo.lock
  2. 1 1
      Cargo.toml
  3. 6 6
      interface/Cargo.toml
  4. 1 1
      interface/src/error.rs
  5. 1 1
      program/Cargo.toml

File diff suppressed because it is too large
+ 243 - 172
Cargo.lock


+ 1 - 1
Cargo.toml

@@ -1,6 +1,6 @@
 [workspace]
 resolver = "2"
-members = ["p-interface", "p-token", "program"]
+members = ["interface", "p-interface", "p-token", "program"]
 
 [workspace.package]
 authors = ["Anza Maintainers <maintainers@anza.xyz>"]

+ 6 - 6
interface/Cargo.toml

@@ -15,12 +15,12 @@ bytemuck = "1.20.0"
 num-derive = "0.4"
 num_enum = "0.7.4"
 num-traits = "0.2"
-solana-instruction = "2.3.0"
-solana-program-error = "2.2.2"
-solana-program-option = "2.2.1"
-solana-program-pack = "2.2.1"
-solana-pubkey = { version = "2.4.0", features = ["bytemuck"] }
-solana-sdk-ids = "2.2.1"
+solana-instruction = "3.0.0"
+solana-program-error = "3.0.0"
+solana-program-option = "3.0.0"
+solana-program-pack = "3.0.0"
+solana-pubkey = { version = "3.0.0", features = ["bytemuck"] }
+solana-sdk-ids = "3.0.0"
 thiserror = "2.0"
 
 [dev-dependencies]

+ 1 - 1
interface/src/error.rs

@@ -114,7 +114,7 @@ impl TryFrom<u32> for TokenError {
 }
 
 impl ToStr for TokenError {
-    fn to_str<E>(&self) -> &'static str {
+    fn to_str(&self) -> &'static str {
         match self {
             TokenError::NotRentExempt => "Error: Lamport balance below rent-exempt threshold",
             TokenError::InsufficientFunds => "Error: insufficient funds",

+ 1 - 1
program/Cargo.toml

@@ -30,7 +30,7 @@ solana-pubkey = { workspace = true, features = ["bytemuck"] }
 solana-rent = "2.2.1"
 solana-sdk-ids = "2.2.1"
 solana-sysvar = { version = "2.2.2", features = ["bincode"] }
-spl-token-interface = { version = "1.0", path = "../interface" }
+spl-token-interface = { version = "1.0" }
 thiserror = "2.0"
 
 [dev-dependencies]

Some files were not shown because too many files changed in this diff