Skip to content

Conversation

@mcintyre94
Copy link
Member

Adds a new instruction plan to transfer to an ATA, whether or not it already exists. This combines the getCreateAssociatedTokenIdempotent and transferChecked instructions.

Also has an async variant that derives the ATA for the recipient.

lorisleiva
lorisleiva previously approved these changes Nov 19, 2025
return token.address;
};

export const createTokenPdaWithAmount = async (
Copy link
Member

Choose a reason for hiding this comment

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

If you make a sendAndConfirm test helper that accepts instruction plans (or expose it directly in the test Client), you could directly consume your own instruction plan helpers in the tests.

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added client.sendTransactionPlan(...) and used it here. Also refactored uses of the transaction executor I added before to use that instead.

I looked at doing the same for planner, but it needs a payer. I think it'd make sense to add payer to the client, and have it receive an airdrop automatically and then be the fee payer in the transaction planner. But I think that makes sense to do separately since it'll be a lot of unrelated changes.

@mcintyre94 mcintyre94 merged commit 0e1dc3e into main Nov 20, 2025
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants