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 |
1
vote
How to get metadata pointer address for a token generated with Token program 2022
You can use @solana/spl-token-metadata.
It would look something like this:
import {
Connection,
Keypair,
SystemProgram,
Transaction,
clusterApiUrl,
sendAndConfirmTransaction,
} from "@sola …
5
votes
Accepted
Questions on Token2022 Metadata
Here's my attempt to build an Anchor program using the token metadata interface that only implements the Initialize and UpdateField instructions from the interface.
Alternatively, you can use the Meta …
4
votes
Accepted
Dynamically use PDA with transfer-hooks
Yes, you can dynamically derive pdas in the list of extra_accounts_meta! Here is an example Anchor program you can reference.
You can also reference the examples here created by Jonas, which include 3 …
2
votes
Token Extensions program custom program error: 0x7dc8348c
This is the error you're encountering:
/// Incorrect account provided
#[error("Incorrect account provided")]
IncorrectAccount
There was an issue with how the transfer hook offchain helper functions r …
2
votes
How to transfer tokens using transfer hook in Anchor
When a transfer hook program's execute instruction is invoked, all accounts from the initial transfer instruction are converted to readonly
Although the error you're getting seems to be IncorrectAcco …
5
votes
Accepted
Check mint to create either Token or Token2022 on demand
You can try replacing:
pub token_program: Program<'info, Token2022>,
With:
pub token_program: Interface<'info, TokenInterface>,
Which should allow for both for token program addresses.
https://githu …
0
votes
Set Mint Authority as PDA
Here is an example of an Anchor program instruction that creates a token2022 mint account with the metadata extension enable. You can use it as a starting point and update it to use a PDA as the mint …
0
votes
How to read the metadata on a mint account created using the metadata interface?
Offset is 72 for where the metadata starts for this specific example. Tried unpacking at each index until found.
function findValidUnpackIndex(tlvData) {
for (let i = 0; i < tlvData.length; i++) {
…
1
vote
How do I send a token with the transfer-hook extension using the spl-token command line inte...
Not sure how it would work using the CLI. However, when building the instruction using JS, I had to manually add the AccountMetas for all the extra accounts to the transferChecked instruction.
Additio …
5
votes
How do I create a basic program to use as a Token-22 transfer hook in Anchor? Is it even pos...
Here are two references of transfer hook programs built using Anchor!
https://github.com/0ximalice/spl-token-2022-transfer-hook-anchor
https://github.com/TeamRaccoons/raccoons-program-library/tree/mai …
6
votes
Accepted
On calling ctx.bumps.get("mint_account"), failing with error method `get` not found for this...
If you're using anchor-lang 0.29 (check the Cargo.toml file), the syntax for getting the bump has been updated.
Try using:
ctx.bumps.mint_account
3
votes
Transfer Hook - How to get destination ATA owner public key
The 3rd account (index 2) labeled destination_token is the recipient token account from the initial token transfer.
You should be able to access the address of the owner stored on the token account to …
2
votes
How to Access SPL-Token ATA Account Inside a Program for Burning
Since you're trying to burn tokens of the same type as the one transferred, another approach is the use the TransferFee extension instead.
The TransferFee extension allows you to configure a transfer …
3
votes
Accepted
What does it mean exactly for token account owners to reassign ownership to another address?
Metaplex docs have a great explanation and diagrams for understanding the relationship between wallets, token accounts, and mints. Recommend looking through this page: https://docs.metaplex.com/progra …