Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ATA: Extract associated-token-account-client crate from associated-token-account crate #7005

Merged
merged 13 commits into from
Aug 27, 2024

Conversation

kevinheavey
Copy link
Contributor

@kevinheavey kevinheavey commented Jul 10, 2024

Problem

People often import spl-associated-token-account just to derive an associated token address. This makes the ecosystem dependency hell and bloat problem much worse.

Changes

  • Make a new spl-associated-token-address that contains just the get_associated_token_address* functions.
  • Re-export these functions in spl-associated-token-account with a deprecation notice

This branches off #6989 so that should be merged first

@buffalojoec
Copy link
Contributor

@kevinheavey looks like this one is also going to be closed, as per the solution proposed in #6989? Fwiw, we are close to said clients.

@kevinheavey
Copy link
Contributor Author

This basically is the solution proposed in #6989 no?

@buffalojoec
Copy link
Contributor

This basically is the solution proposed in #6989 no?

Oops, I don't think I was following the bouncing ball over there.

This is looking pretty good, but I believe @joncinque had some additional thoughts so I'll let him weigh in on this one.

@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Aug 6, 2024
@github-actions github-actions bot removed the stale [bot only] Added to stale content; will be closed soon label Aug 12, 2024
@github-actions github-actions bot added the stale [bot only] Added to stale content; will be closed soon label Aug 26, 2024
@joncinque
Copy link
Contributor

joncinque commented Aug 26, 2024

@kevinheavey I worked this a bit to be a complete client crate that exposes the instruction creators along with the address derivation functions. This way, we remove a dependency from token-client to the ata program, which means that I don't have to bump and publish the ata program every time there's a new version of token-2022, which always felt wrong.

Let me know what you think!

@joncinque joncinque changed the title Extract associated-token-address crate from associated-token-account crate ATA: Extract associated-token-account-client crate from associated-token-account crate Aug 26, 2024
@kevinheavey
Copy link
Contributor Author

@joncinque lgtm, full send

@github-actions github-actions bot removed the stale [bot only] Added to stale content; will be closed soon label Aug 27, 2024
buffalojoec
buffalojoec previously approved these changes Aug 27, 2024
Copy link
Contributor

@buffalojoec buffalojoec left a comment

Choose a reason for hiding this comment

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

Looking great! Are you planning to replace this with a generated client in the future (say, version 2.0.0)? A lot of the interface can be reusable, but it will also break. An alternative would be to try t to hand-write an IDL now and generate now.

token/cli/tests/command.rs Outdated Show resolved Hide resolved
token-upgrade/cli/Cargo.toml Show resolved Hide resolved
associated-token-account/program/Cargo.toml Show resolved Hide resolved
@mergify mergify bot dismissed buffalojoec’s stale review August 27, 2024 13:02

Pull request has been modified.

@joncinque
Copy link
Contributor

Are you planning to replace this with a generated client in the future (say, version 2.0.0)?

I want to avoid using the generated clients for now because it'll bring in a lot of extra dependencies that aren't needed. But yeah, we'll eventually add those in. And then it's up to us if we decide to break the existing instruction creators.

Everything else should be addressed!

@joncinque joncinque merged commit b27a96a into solana-labs:master Aug 27, 2024
31 checks passed
@kevinheavey kevinheavey deleted the ata-crate branch August 27, 2024 17:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants