Skip to main content

New answers tagged

2 votes
Accepted

anchor_spl token_group_initialize invalid instruction

The token group extension in token-2022 has not been deployed yet. If you want to use it, you'll need to build token-2022 yourself and include it in your test validator, ie: $ git clone https://github....
Jon C's user avatar
  • 15.6k
0 votes

solana contract rust error anchor build

Try using solana-program with the same version as the CLI: solana --version solana-cli 1.17.34 (src:b04a806c; feat:3746964731, client:SolanaLabs) Update the Cargo.toml: [dependencies] solana-program ...
Kombucha's user avatar
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 ...
john's user avatar
  • 7,445
3 votes
Accepted

How to transfer tokens using transfer hook in Anchor

There might not be Anchor helpers yet to create the proper transfer with all the transfer hook accounts. In the meantime, you can use the onchain helpers that come with token-2022 at https://github....
Jon C's user avatar
  • 15.6k
2 votes

Is there a way add Creators addresses to an NFT with Token Extensions like Metaplex does?

There isn't a field in the metadata extension interface explicitly to set creators. Here is the metadata extension account struct and it contains the additional_metadata field which you can use to add ...
Jimii's user avatar
  • 3,260
2 votes
Accepted

SPL Token 2022 multisig initialization & update

So apparently: It can be a PDA, but it doesn’t need to be. It’s just not possible. To achieve that, the best is to put a PDA as the authority and have the program sign with it once it has verified ...
Vincent Berthier's user avatar
2 votes

Is it possible to create deflationary token on solana?

You can create a token with the "transfer fee" extension, and set the fee withdraw authority to the PDA for some simple program which allows anyone to withdraw and burn the fees on any ...
Jon C's user avatar
  • 15.6k
1 vote
Accepted

Failed create CLMM using Token 2022 - Raydium Concentrated Liquidity: OpenPositionV2 (Program Error: "null")

According to the program logs, you have insufficient funds for the transfer The log messages Invoking System Program > Transfer: insufficient lamports 63964291, need 72161280 > Program ...
Jimii's user avatar
  • 3,260
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 ...
john's user avatar
  • 7,445
2 votes

Retrieve token metadata

To make your work easier, make the fetches using the DAS API and an RPC provider that supports it like Helius. Codewise, this would take the form. import { keypairIdentity, publicKey, } from &...
Jimii's user avatar
  • 3,260
1 vote

Is there a way to get program id of CPI call?

The information about the caller program is not provided to a callee program during CPI, but there's a workaround. You could verify the caller program id by: including the caller program id as ...
Jon C's user avatar
  • 15.6k

Top 50 recent answers are included