Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Conversation

QiLOL
Copy link
Contributor

@QiLOL QiLOL commented Aug 13, 2024

Problem

In certain scenarios, such as with a DEX, it may be necessary to create an associated token account for a PDA (Program Derived Address). However, the current implementation of createAssociatedTokenAccount in the @solana/spl-token library has the allowOffCurve option set to false by default while getAssociatedTokenAddressSync.
(Reference: GitHub link)

To create an ATA for a PDA, a custom implementation is required.

Solution

This PR aims to enhance code reusability by allowing users to set the allowOffCurve option when using createAssociatedTokenAccount.

@mergify mergify bot added the community Community contribution label Aug 13, 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.

Lgtm, thanks!

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.

Whoops sorry. Looks like a formatting issue.

@mergify mergify bot dismissed buffalojoec’s stale review August 15, 2024 00:44

Pull request has been modified.

@QiLOL
Copy link
Contributor Author

QiLOL commented Aug 15, 2024

Whoops sorry. Looks like a formatting issue.

Thank you, I just updated it; please check!

@QiLOL QiLOL requested a review from buffalojoec August 15, 2024 01:02
@buffalojoec buffalojoec merged commit 5cd5479 into solana-labs:master Aug 15, 2024
17 checks passed
@QiLOL QiLOL deleted the createATA_curve branch August 15, 2024 01:21
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Community contribution
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants