Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
5
votes
Accepted
Need some guide or snippet, demo to transfer SPL token out from program's PDA account
with Anchor 0.29.0 you can use the TransferChecked Struct and transfer_checked fn that will do the invoke_signed under the hood.
And send the specific token and amount that you want.
Example:
let …
0
votes
Unable to create a PDA TokenAccount using anchor constraints
1- The seeds of your position acc are wrong.
This is incorrect- b"pos".as_ref().
Use this instead:
seeds = [b"pos", details.key().as_ref(), nft_mint.key().as_ref()],
2
votes
Accepted
Send SPL token from PDA to ATA
Here's an example using the anchor_spl::token_interface::transfer_checked function to transfer SPL Tokens from a PDA to an ATA.
use anchor_spl::{
token_interface::{
TokenAccount,
…