Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

spl: Bump token to v3.3.0 and ATA to v1.0.5 #22649

Merged
merged 3 commits into from
Apr 20, 2022

Conversation

joncinque
Copy link
Contributor

@joncinque joncinque commented Jan 21, 2022

Problem

The new token program was deployed, but the monorepo isn't using the new packages.

Summary of Changes

  • Add parsers for new token instructions
  • Update parser for modified associated-token-account instruction

Fixes #

NOTE: Only merge this once the associated token program version 1.0.5 is released on all clusters, tracked by the feature introduced in #22648

@joncinque joncinque changed the title Bump spl-token and ATA to v3.3.0 spl: Bump token to v3.3.0 and ATA to v1.0.4 Jan 21, 2022
@stale
Copy link

stale bot commented Mar 2, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 2, 2022
@stale stale bot removed the stale [bot only] Added to stale content; results in auto-close after a week. label Mar 2, 2022
@joncinque joncinque changed the title spl: Bump token to v3.3.0 and ATA to v1.0.4 spl: Bump token to v3.3.0 and ATA to v1.0.5 Mar 2, 2022
@jackcmay
Copy link
Contributor

jackcmay commented Mar 3, 2022

@joncinque Can you also remove this audit exception as part of these changes, bumping spl-token also pulls in a safe generic-arrary

@joncinque
Copy link
Contributor Author

@jackcmay certainly! done in 4f2b56e

@stale
Copy link

stale bot commented Apr 16, 2022

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@stale stale bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Apr 16, 2022
@joncinque joncinque removed the stale [bot only] Added to stale content; results in auto-close after a week. label Apr 18, 2022
@joncinque joncinque marked this pull request as ready for review April 19, 2022 23:54
@joncinque
Copy link
Contributor Author

@CriesofCarrots Once you merge the test fixes in #23067, i'll just need to update the keys in the tests here, but otherwise, this should be good to go!

CriesofCarrots
CriesofCarrots previously approved these changes Apr 20, 2022
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, looks great! r+ when rebased and CI is happy

Comment on lines 592 to 603
let initialize_mint_ix = initialize_mint2(
&spl_token::id(),
&convert_pubkey(keys[0]),
&convert_pubkey(keys[2]),
Some(&convert_pubkey(keys[3])),
2,
)
.unwrap();
let message = Message::new(&[initialize_mint_ix], None);
let compiled_instruction = convert_compiled_instruction(&message.instructions[0]);
assert_eq!(
parse_token(&compiled_instruction, &keys).unwrap(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just an example of the new handling from #23067 :

Suggested change
let initialize_mint_ix = initialize_mint2(
&spl_token::id(),
&convert_pubkey(keys[0]),
&convert_pubkey(keys[2]),
Some(&convert_pubkey(keys[3])),
2,
)
.unwrap();
let message = Message::new(&[initialize_mint_ix], None);
let compiled_instruction = convert_compiled_instruction(&message.instructions[0]);
assert_eq!(
parse_token(&compiled_instruction, &keys).unwrap(),
let initialize_mint_ix = initialize_mint2(
&spl_token::id(), // TODO: replace with `program_id`
&convert_pubkey(mint_pubkey),
&convert_pubkey(mint_authority),
Some(&convert_pubkey(freeze_authority)),
2,
)
.unwrap();
let message = make_coerced_message(initialize_mint_ix, program_id);
let compiled_instruction = convert_compiled_instruction(&message.instructions[0]);
assert_eq!(
parse_token(&compiled_instruction, &convert_account_keys(&message)).unwrap(),

* Add parsers for new token instructions
* Update parser for modified associated-token-account instruction
@mergify mergify bot dismissed CriesofCarrots’s stale review April 20, 2022 12:26

Pull request has been modified.

@joncinque joncinque merged commit c43afe2 into solana-labs:master Apr 20, 2022
@joncinque joncinque deleted the spl-token-bump branch April 20, 2022 17:13
@CriesofCarrots
Copy link
Contributor

🎉🎉

@CriesofCarrots
Copy link
Contributor

Ready to add v1.10 label?

@joncinque
Copy link
Contributor Author

Yes! Sorry, didn't get around to it yesterday -- thanks for backporting #23067

mergify bot pushed a commit that referenced this pull request Apr 26, 2022
* Bump spl-token and ATA to v3.3.0

* Add parsers for new token instructions
* Update parser for modified associated-token-account instruction

* Update to use 1.0.5 once it's released

* Update Cargo.lock in programs/bpf

(cherry picked from commit c43afe2)

# Conflicts:
#	account-decoder/Cargo.toml
#	accounts-cluster-bench/Cargo.toml
#	rpc/Cargo.toml
#	tokens/Cargo.toml
#	transaction-status/Cargo.toml
mergify bot added a commit that referenced this pull request Apr 26, 2022
* spl: Bump token to v3.3.0 and ATA to v1.0.5 (#22649)

* Bump spl-token and ATA to v3.3.0

* Add parsers for new token instructions
* Update parser for modified associated-token-account instruction

* Update to use 1.0.5 once it's released

* Update Cargo.lock in programs/bpf

(cherry picked from commit c43afe2)

# Conflicts:
#	account-decoder/Cargo.toml
#	accounts-cluster-bench/Cargo.toml
#	rpc/Cargo.toml
#	tokens/Cargo.toml
#	transaction-status/Cargo.toml

* Fix merge conflicts

* Re-add audit ignore to avoid bumping more crates

Co-authored-by: Jon Cinque <[email protected]>
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
* Bump spl-token and ATA to v3.3.0

* Add parsers for new token instructions
* Update parser for modified associated-token-account instruction

* Update to use 1.0.5 once it's released

* Update Cargo.lock in programs/bpf
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 30, 2022
* Bump spl-token and ATA to v3.3.0

* Add parsers for new token instructions
* Update parser for modified associated-token-account instruction

* Update to use 1.0.5 once it's released

* Update Cargo.lock in programs/bpf
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 30, 2022
* Bump spl-token and ATA to v3.3.0

* Add parsers for new token instructions
* Update parser for modified associated-token-account instruction

* Update to use 1.0.5 once it's released

* Update Cargo.lock in programs/bpf
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants