-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: Export create_associated_token_account
and create_associated_token_account_idempotent
#2999
feat: Export create_associated_token_account
and create_associated_token_account_idempotent
#2999
Conversation
@cryptopapi997 is attempting to deploy a commit to the coral-xyz Team on Vercel. A member of the Team first needs to authorize it. |
create_associated_token_account
and create_associated_token_account_idempotent
create_associated_token_account
and create_associated_token_account_idempotent
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Currently when working with tokens in anchor client, most of the basic operations can be done because
anchor_spl
exposes them e.g. we can create a token, mint it, transfer it, etc. The only thing in a "basic" token workflow that cannot be done is create associated token accounts.I don't know why this is, but I'd imagine it's because at the time that
anchor_spl
was first written ATAs weren't the default yet and normal token accounts could be created with it on the client side. Nowadays this has changed though, so I believe updating the exports to expose ATA creation is appropriate.
It's most likely because anchor-spl
crate was intended for CPI:
Line 7 in efe2e40
description = "CPI clients for SPL programs" |
Most of those exports have been added later too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Currently when working with tokens in anchor client, most of the basic operations can be done because
anchor_spl
exposes them e.g. we can create a token, mint it, transfer it, etc. The only thing in a "basic" token workflow that cannot be done is create associated token accounts.I don't know why this is, but I'd imagine it's because at the time that
anchor_spl
was first written ATAs weren't the default yet and normal token accounts could be created with it on the client side. Nowadays this has changed though, so I believe updating the exports to expose ATA creation is appropriate.