From 52fc28e07e423f962e1b079def442bc530bb33f0 Mon Sep 17 00:00:00 2001 From: Jon C Date: Tue, 27 Aug 2024 00:20:56 +0200 Subject: [PATCH] Remove dependency on ata program from token-client --- Cargo.lock | 1 - token/cli/Cargo.toml | 2 +- token/client/Cargo.toml | 5 ----- token/client/src/token.rs | 8 +++++--- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 6f15309baeb..3236ef94df7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -7677,7 +7677,6 @@ dependencies = [ "solana-rpc-client", "solana-rpc-client-api", "solana-sdk", - "spl-associated-token-account 4.0.0", "spl-associated-token-account-client", "spl-memo 5.0.0", "spl-record", diff --git a/token/cli/Cargo.toml b/token/cli/Cargo.toml index 956dae8c0c1..a3c7daa9d41 100644 --- a/token/cli/Cargo.toml +++ b/token/cli/Cargo.toml @@ -28,6 +28,7 @@ solana-logger = "2.0.3" solana-remote-wallet = "2.0.3" solana-sdk = "2.0.3" solana-transaction-status = "2.0.3" +spl-associated-token-account-client = { version = "1.0.0", path = "../../associated-token-account/client" } spl-token = { version = "6.0", path = "../program", features = [ "no-entrypoint", ] } @@ -38,7 +39,6 @@ spl-token-client = { version = "0.11.0", path = "../client" } spl-token-confidential-transfer-proof-generation = { version = "0.1.0", path = "../confidential-transfer/proof-generation" } spl-token-metadata-interface = { version = "0.4.0", path = "../../token-metadata/interface" } spl-token-group-interface = { version = "0.3.0", path = "../../token-group/interface" } -spl-associated-token-account-client = { version = "1.0.0", path = "../../associated-token-account/client" } spl-memo = { version = "5.0", path = "../../memo/program", features = [ "no-entrypoint", ] } diff --git a/token/client/Cargo.toml b/token/client/Cargo.toml index 400e2d4b872..305fbc67450 100644 --- a/token/client/Cargo.toml +++ b/token/client/Cargo.toml @@ -19,11 +19,6 @@ solana-program-test = "2.0.3" solana-rpc-client = "2.0.3" solana-rpc-client-api = "2.0.3" solana-sdk = "2.0.3" -# We never want the entrypoint for ATA, but we want the entrypoint for token when -# testing token -spl-associated-token-account = { version = "4.0.0", path = "../../associated-token-account/program", features = [ - "no-entrypoint", -] } spl-associated-token-account-client = { version = "1.0.0", path = "../../associated-token-account/client" } spl-memo = { version = "5.0", path = "../../memo/program", features = [ "no-entrypoint", diff --git a/token/client/src/token.rs b/token/client/src/token.rs index 7561b4f239c..33352f62c27 100644 --- a/token/client/src/token.rs +++ b/token/client/src/token.rs @@ -21,10 +21,12 @@ use { system_instruction, transaction::Transaction, }, - spl_associated_token_account::instruction::{ - create_associated_token_account, create_associated_token_account_idempotent, + spl_associated_token_account_client::{ + address::get_associated_token_address_with_program_id, + instruction::{ + create_associated_token_account, create_associated_token_account_idempotent, + }, }, - spl_associated_token_account_client::address::get_associated_token_address_with_program_id, spl_record::state::RecordData, spl_token_2022::{ extension::{