coral-xyz / anchor

⚓ Solana Sealevel Framework
https://anchor-lang.com
Apache License 2.0
3.36k stars 1.25k forks source link

feat: Export `create_associated_token_account` and `create_associated_token_account_idempotent` #2999

Closed cryptopapi997 closed 1 month ago

cryptopapi997 commented 1 month ago

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.

vercel[bot] commented 1 month ago

@cryptopapi997 is attempting to deploy a commit to the coral-xyz Team on Vercel.

A member of the Team first needs to authorize it.