Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 4 additions & 58 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ no-entrypoint = []

[dependencies]
solana-program = "4.0.0"
spl-token-2022 = { version = "11.0.0", features = ["no-entrypoint"] }
spl-token-2022-interface = "4.0.0"
spl-token-metadata-interface = { version = "1.0.0", path = "../interface" }
spl-type-length-value = "0.9.1"

Expand Down
2 changes: 1 addition & 1 deletion program/src/processor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use {
program_option::COption,
pubkey::Pubkey,
},
spl_token_2022::{extension::StateWithExtensions, state::Mint},
spl_token_2022_interface::{extension::StateWithExtensions, state::Mint},
spl_token_metadata_interface::{
error::TokenMetadataError,
instruction::{
Expand Down
2 changes: 1 addition & 1 deletion program/tests/emit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async fn success(start: Option<u64>, end: Option<u64>) {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down
6 changes: 3 additions & 3 deletions program/tests/initialize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async fn success_initialize() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down Expand Up @@ -119,7 +119,7 @@ async fn fail_without_authority_signature() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down Expand Up @@ -196,7 +196,7 @@ async fn fail_incorrect_authority() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down
11 changes: 2 additions & 9 deletions program/tests/program_test.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use {
solana_program_test::{processor, tokio::sync::Mutex, ProgramTest, ProgramTestContext},
solana_program_test::{tokio::sync::Mutex, ProgramTest, ProgramTestContext},
solana_sdk::{
pubkey::Pubkey, signature::Signer, signer::keypair::Keypair, transaction::Transaction,
},
Expand Down Expand Up @@ -30,14 +30,7 @@ pub async fn setup(
Arc<dyn ProgramClient<ProgramBanksClientProcessTransaction>>,
Arc<Keypair>,
) {
let mut program_test = ProgramTest::new("spl_token_metadata_example", *program_id, None);

program_test.prefer_bpf(false); // simplicity in the build
program_test.add_program(
"spl_token_2022",
spl_token_2022::id(),
processor!(spl_token_2022::processor::Processor::process),
);
let program_test = ProgramTest::new("spl_token_metadata_example", *program_id, None);

let context = program_test.start_with_context().await;
let payer = Arc::new(keypair_clone(&context.payer));
Expand Down
4 changes: 2 additions & 2 deletions program/tests/remove_key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ async fn success_remove() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down Expand Up @@ -176,7 +176,7 @@ async fn fail_authority_checks() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down
4 changes: 2 additions & 2 deletions program/tests/update_authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ async fn success_update() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down Expand Up @@ -169,7 +169,7 @@ async fn fail_authority_checks() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down
4 changes: 2 additions & 2 deletions program/tests/update_field.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async fn success_update(field: Field, value: String) {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down Expand Up @@ -156,7 +156,7 @@ async fn fail_authority_checks() {
let mint_authority = Keypair::new();
let mint_authority_pubkey = mint_authority.pubkey();

let token_program_id = spl_token_2022::id();
let token_program_id = spl_token_2022_interface::id();
let decimals = 2;
let token = setup_mint(
&token_program_id,
Expand Down
Loading