Skip to content

Commit c9e8500

Browse files
authored
SPL: Use ATA interface crate instead of program crate (#7256)
* SPL: Use ATA interface crate instead of program crate #### Problem In order to publish the v3 SDK crates and have them usable in Agave, we also need to have SPL crates using the v3 SDK crates. However, we have a circular dependency between Agave and SPL which currently makes this impossible. The overall plan is to have Agave only use "interface" crates from SPL, which have no dependencies on Agave crates. You can see more info about the project at https://github.com/orgs/anza-xyz/projects/27 ATA is already in a good position since it has a small "interface"-style crate which Agave is partly using. Agave still needs the program crate to deserialize instructions. #### Summary of changes Use the interface crate everywhere. The only substantive change is in the instruction parsing test. The interface crate does not have the deprecated instruction creator, so we mimic it inline instead. The best part: the ata program crate is completely gone from lockfiles! * Fix test
1 parent 1e11ee2 commit c9e8500

File tree

15 files changed

+39
-79
lines changed

15 files changed

+39
-79
lines changed

Cargo.lock

Lines changed: 5 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,7 @@ solana-zk-keygen = { path = "zk-keygen", version = "=3.0.0" }
564564
solana-zk-sdk = "3.0.0"
565565
solana-zk-token-proof-program = { path = "programs/zk-token-proof", version = "=3.0.0" }
566566
solana-zk-token-sdk = { path = "zk-token-sdk", version = "=3.0.0" }
567-
spl-associated-token-account = "7.0.0"
567+
spl-associated-token-account-interface = "1.0.0"
568568
spl-generic-token = "1.0.1"
569569
spl-instruction-padding = "0.3.0"
570570
spl-memo = "6.0.0"

programs/sbf/Cargo.lock

Lines changed: 4 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

svm/examples/Cargo.lock

Lines changed: 5 additions & 20 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

svm/examples/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ solana-transaction-error = "2.2.1"
6868
solana-transaction-status = { path = "../../transaction-status" }
6969
solana-validator-exit = "2.2.1"
7070
solana-version = { path = "../../version" }
71-
spl-associated-token-account = "7.0.0"
71+
spl-associated-token-account-interface = "1.0.0"
7272
spl-token = "8.0.0"
7373
spl-token-2022 = "8.0.0"
7474
termcolor = "1.4.1"

svm/examples/paytube/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ solana-system-interface = { workspace = true }
3737
solana-system-program = { workspace = true }
3838
solana-transaction = { workspace = true, features = ["blake3"] }
3939
solana-transaction-error = { workspace = true }
40-
spl-associated-token-account = { workspace = true }
40+
spl-associated-token-account-interface = { workspace = true }
4141
spl-token = { workspace = true }
4242
termcolor = { workspace = true }
4343

svm/examples/paytube/src/settler.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ use {
2424
},
2525
solana_system_interface::instruction as system_instruction,
2626
solana_transaction::Transaction as SolanaTransaction,
27-
spl_associated_token_account::get_associated_token_address,
27+
spl_associated_token_account_interface::address::get_associated_token_address,
2828
std::collections::HashMap,
2929
};
3030

svm/examples/paytube/src/transaction.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use {
1414
sanitized::SanitizedTransaction as SolanaSanitizedTransaction,
1515
Transaction as SolanaTransaction,
1616
},
17-
spl_associated_token_account::get_associated_token_address,
17+
spl_associated_token_account_interface::address::get_associated_token_address,
1818
std::collections::HashSet,
1919
};
2020

svm/examples/paytube/tests/spl_tokens.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use {
99
solana_pubkey::Pubkey,
1010
solana_signer::Signer,
1111
solana_svm_example_paytube::{transaction::PayTubeTransaction, PayTubeChannel},
12-
spl_associated_token_account::get_associated_token_address,
12+
spl_associated_token_account_interface::address::get_associated_token_address,
1313
};
1414

1515
#[test]

tokens/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ solana-system-interface = { workspace = true }
4141
solana-transaction = { workspace = true }
4242
solana-transaction-status = { workspace = true }
4343
solana-version = { workspace = true }
44-
spl-associated-token-account = { version = "=7.0.0", features = ["no-entrypoint"] }
44+
spl-associated-token-account-interface = { version = "=1.0.0" }
4545
spl-token = { version = "=8.0.0", features = ["no-entrypoint"] }
4646
tempfile = { workspace = true }
4747
thiserror = { workspace = true }

0 commit comments

Comments
 (0)