Skip to main content

Questions tagged [token-2022]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2 votes
1 answer
35 views

Retrieve token metadata

I'm trying to recover the metadatas of various tokens in solana. I'm using the web3.js library and the multiplex library. To do this, I'm already trying to retrieve the metadatas in multiplex. If they ...
Pedro's user avatar
  • 21
1 vote
2 answers
44 views

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

I am calling a solana program A from solana program B using cpi invokes. Is there a way to get the program id of program B on program A or a way to get the cpi is invoked?
blackhorse's user avatar
0 votes
1 answer
18 views

What's the difference between 'createInitializePermanentDelegateInstruction' and 'approve'?

The createInitializePermanentDelegateInstruction sets a permanent delegate for a mint. But then why do I need to use the approve method?
Manu Soman's user avatar
0 votes
1 answer
27 views

How to use createCloseAccountInstruction to close TOKEN-2022 ? Using @solana/spl-token

Now i am using createCloseAccountInstruction of @solana/spl-token to close empty Token account . My code working fine for TOKEN-PROGRAM . But when i try to swith into TOKEN-2022 and call the ...
carzygod's user avatar
0 votes
1 answer
15 views

SplToken createMint Cannot read properties of undefined (reading 'createMint')

const mint = await splToken.createMint( connection, mintAuthority mintAuthority.publicKey, null, 9, null, {}, ...
AndrewZzzz's user avatar
0 votes
1 answer
19 views

Is there a new method for ctx.bumps.get in 0.30.0

I've encountered a problem trying to reuse an old project. I'm trying to build the project but the cli throws this error at me: "this is an associated function, not a method" for using *ctx....
Jonathan's user avatar
0 votes
0 answers
10 views

Fee token with whitelist

Sorry for stupid question. Fee token is done, when I call transferCheckedWithFee method, token is send and fee is deducted. Now I want some users to not pay the fee. I am using transfer-hook, I used ...
Syed Mokarram's user avatar
0 votes
1 answer
18 views

Can I set up the Token extensions (Token 2022) on a Solana spl-token I already made?

I have a guide to mint an SPL-Token and I wanted to know what do I change to use the new Token-2022 or the Token extensions? In the guide it says the command is: spl-token create-token What should I ...
Johan Casper Schmidt's user avatar
0 votes
2 answers
82 views

Mainnet contract deployment hangs

I am trying to deploy my solana mainnet contract but it stuck during deployment, will it reibursable? Can I cancel it as it is taking longer time? Why it is stuck? Solana mainnet status is also good ...
blackhorse's user avatar
1 vote
1 answer
23 views

Problem with associated token account of a mint account which initialized using Token2022

I have a mint account created from this script which utilizes Token2022 Program: Solana playground.. Now I am trying to create an ATA(Associated token account) by passing the mint account and user's ...
Rishabh Jamwal's user avatar
0 votes
0 answers
13 views

cannot find ../target/types/transfer_hook library

There is a reference for the below library in all Transfer hook examples. However, I have no idea how to install that in our local import { TransferHook } from "../target/types/transfer_hook"...
Sol Addict's user avatar
0 votes
1 answer
16 views

Exception in Transfer Hook program

I have a token mint with a Transfer fee and Transfer hook, I also have a hook program that limits the no of tokens sent in a single transaction. How do I make an exception in the hook program to ...
Sol Addict's user avatar
0 votes
0 answers
7 views

How to Create Extra Meta using Typescipt

I could not find a way using typescript to create extra metadata for the transfer hook program. I can initiate the Tranferhook Instruction using createInitializeTransferHookInstruction(mint, payer....
Sol Addict's user avatar
0 votes
1 answer
18 views

How to fix this error "TypeError: Cannot read properties of undefined (reading 'length')" when trying to push publicKey to an array

This is my code. I don't understand what this error is for. My console shows the account data has been added to the array successfully. for (const accountInfo of allAccounts) { const ...
user14441's user avatar
0 votes
2 answers
43 views

Is it possible to burn tokens on transfer?

Hey is it possible to create a token2022, and burn x% of tokens on every transfer? Something like transfer tax, but burning the tokens. Also i got second question, how can i deploy token on-chain, ...
youwish's user avatar
  • 23
1 vote
1 answer
36 views

Transfer Hook Program That Collect Transfer Fee to mutiple wallets

Is it possible to write a Transfer hook program that can redirect the Transfer fee to two or more wallets? e.g. if the Transfer fee is set to 2%, can we make a Transfer hook program that can transfer ...
Sol Addict's user avatar
1 vote
1 answer
26 views

Batch Transfer SPL Token that has Token transfer extension enabled

Is it even possible to batch transfer an SPL token that has a Token transfer(token fee) extension enabled? I would Like to create a program which takes the destination wallet from a JSON file and ...
Sol Addict's user avatar
0 votes
1 answer
15 views

non string fields in official metadata extension

Does anyone know if its possible to have non string additional fields when using the official token metadata extension? The interface just has a : pub additional_metadata: Vec<(String, String)&...
daoplays's user avatar
  • 587
2 votes
1 answer
19 views

metadata extension interface - invalid account data for instruction on TlvStateMut::unpack

I'm trying to test out the metadata extension, and am just copying the interface and example that can be found here https://github.com/solana-labs/solana-program-library/blob/...
daoplays's user avatar
  • 587
1 vote
1 answer
32 views

When uploading metadata for a new token do I use Akords vault or storage?

I found out the github has been archived and I found out that the new method is to use cli with metaboss, the tutorials I read say, put the .json and logo.png into akord arweave but, when I open my ...
Keola's user avatar
  • 63
2 votes
1 answer
196 views

How can I get my token using Token Extensions Metadata to display in Solana Explorer?

Why doesn't Token Extensions metadata display properly on Solana Explorer while Solscan, Solana.fm & Phantom wallet displays metadata without issues? For example, on devnet, I've created a test ...
Ken P's user avatar
  • 23
1 vote
2 answers
49 views

Set Mint Authority as PDA

I have written my code and tests in typescript to create a Token 2022 which I would like to have it's PDA be the mint authority. This was working using spl-token but it seems the function I am using ...
Russell's user avatar
  • 11
0 votes
1 answer
22 views

Anchor PDA Cross-program invocation with unauthorized signer or writable account token 2022

i'm testing the Token Extension MetaData Pointer NFT using this example: https://github.com/solana-developers/program-examples/tree/main/tokens/token-2022/nft-meta-data-pointer/anchor, but, instead of ...
0xNicko's user avatar
  • 41
0 votes
0 answers
30 views

My wallet is now hacked and off-curved

The content is the same as the title. I've now been hacked into my Phantom wallet and the hacker has turned my wallet into an off-curved address. I want to fix this. I want to protect my assets. Can ...
sungjoon cho's user avatar
2 votes
1 answer
39 views

Calling solana.getParsedProgramAccounts method on a Token-2022 returns an empty array

When calling the below method getParsedProgramAccounts with the correct Token Program ID and a Token Address associated with that Token Program ID, I am returned an array of the token holders. ...
Alex's user avatar
  • 21
1 vote
1 answer
35 views

How to reduce cost when creating token-2022 when using CLI

I am kind of confused why it cost me .5 sol to create a token-2022 with a transfer hook extension whereas if I use some tools made to create token-2022 with simple extension etc costing only .02 SOL.
Noob Dev's user avatar
0 votes
2 answers
79 views

Can't mint any token 2022? I tried minting 60,000,000 tokens but only 18 million were generated and when I try minting more I get an error

Error: Client(Error { request: Some(SendTransaction), kind: RpcError(RpcResponseError { code: -32002, message: "Transaction simulation failed: Error processing Instruction 0: custom program error:...
Keola's user avatar
  • 63
3 votes
1 answer
55 views

Transfer Hook - How to get destination ATA owner public key

For my program, I need to implement the Token2022 transfer hook. Inside the transfer hook, I need to read and write a PDA account driven from the address of the owner of the destination ATA. EDIT: In ...
Oleh's user avatar
  • 33
1 vote
0 answers
27 views

Transfer Token2022 and spl-token

How can I transfer Token2022 and simple Token in a same instruction using anchor?
Tayab's user avatar
  • 11
3 votes
0 answers
38 views

TransferV1 + token-2022

I've been struggling for a while with a transferV1 transaction from the mpl-token-metadata library using the Umi interface. Many examples here and there show how to do it with the classic spl-token ...
Alexandre Dury's user avatar
0 votes
0 answers
80 views

How do I rename my token from showing unknown token on solscan

I'm using the spl-token 2022 program and after adding the metadata details via cli, i still get the unknown token when i lookup my token on solscan, here an example looking at it on dev net.
Etiosa Kings's user avatar
4 votes
2 answers
262 views

Check mint to create either Token or Token2022 on demand

Solana's Token 22 tutorial tells you how to upgrade to 2022, but most deployed programs need to support existing accounts that were made with the Token program. Let's say we have an ix that makes a ...
Whiteseal's user avatar
  • 3,060
1 vote
1 answer
25 views

Create a real InterestBearing Token

From what I've understand of the Interest-Bearing extension from Token2022, it is actually a cosmetic feature, the balances seen on explorers, on wallets do not change. The amounts do not change, only ...
Pierre Dubri's user avatar
1 vote
1 answer
46 views

What token extensions are live on mainnet?

We are planning on using various 2022 token extensions for our project, having spoken with a few other Solana developers, it seems that not all token extensions are currently working on mainnet. Is ...
Kraz's user avatar
  • 13
1 vote
1 answer
60 views

Solana SPL-22 token fee not claimable

I made a Solana spl-2022 memecoin on Dexlab with a 4.9% fee for marketing. Some transactions are made and a withheld amount is visible on the blockchain (solscan). When I look at Dexlab's claim fee ...
VKah33's user avatar
  • 11
1 vote
1 answer
29 views

Are there any specific method get all Nfts by their GroupPointer of `findAllByUpdateAuthority` in the SPL-token 2022?

I'm trying to find all the nft from a same group for a newly created SPL-token-2022 nfts. Previously doing that with metaplex was easy, But now i'm using the new standards.
Abhishek Faliya's user avatar
0 votes
0 answers
26 views

What's the best place to fork to create token-2022 with hook transfer function

I have been trying to create a token-2022 via other forks or through Solana library, not sure what's the best way as I am a beginner just looking for end goals not go through the process of learning a ...
Noob Dev's user avatar
2 votes
1 answer
65 views

Transfer Hook vulnerabilities

I can't tell how safe it is to arbitrarily support transfers on "transfer hook" enabled tokens via CPI from my program. At the moment i am setting is_signer and is_writable to false on all ...
Trevor's user avatar
  • 115
0 votes
1 answer
132 views

How to create a spl22 token?

it creates a token, the transaction is executed. But in the end the token does not appear in the wallet, why? What have I done wrong? wallet, connection, name, symbol, decimals, ...
JackSparrow's user avatar
1 vote
2 answers
75 views

Transferring WSOL from inside transfer hook - how do you let wallets know that they need to approve?

i've been following this example to see how to transfer WSOL from inside the transfer hook: https://solana.com/developers/guides/token-extensions/transfer-hook#transfer-hook-with-wsol-transfer-fee-...
daoplays's user avatar
  • 587
0 votes
1 answer
55 views

Transfer within a transfer hook callback not working - writable privilege escalated on source account

I am trying to implement an additional transfer of the token that has a transfer hook from within the transfer hook callback. In particular, I am trying to send an additional token from the source ...
daoplays's user avatar
  • 587
0 votes
0 answers
469 views

Solana SPL token holder count

I'm trying to find an efficient way to get the total token holders of an SPL token. For ETH ERC-20 tokens I use Etherscan API, this returns me an integer of the total holders of the token address used ...
Timmy12321's user avatar
1 vote
1 answer
56 views

Wallets that support transfer hook

I've been playing around with transfer hook, but for some reason neither phantom nor solflare seem to pick up the tokens that I have using that extension. Solana explorer seems to display it ...
daoplays's user avatar
  • 587
1 vote
1 answer
139 views

Token 2022 rust anchor ( Instruction 0: custom program error: 0x4 )

newbie here ! I'm trying to mint some token 2022 from a rust program. i followed every single instruction i found about turning a classic token 2017 to a 2022 compatible, like changin the default ...
Alexandre Dury's user avatar
0 votes
1 answer
69 views

mintTo(...) of my Token-2022 - Error processing Instruction 0: invalid account data for instruction

Here's a part of the code of minting my Token-2022 which I've deployed previously //........................ console.log( `\npayer: ${payer} $$ ${payer.publicKey}`, `\nmint: ${mint}`, `\...
barugaggi's user avatar
0 votes
1 answer
93 views

SPL Token 2022 minting

I am facing an issue while minting the SPLToken2022 using a React app. the problem arises when minting the transaction. The process works fine when passing the keypairs directly, but encounters an ...
Bobz's user avatar
  • 504
0 votes
1 answer
109 views

Fetch Metadata SPL Token 2022

How can I fetch the metadata of an SPL Token in 2022? I attempted to fetch it from UMI, but it failed. It works fine with SPL 2020, but it's showing an error const umi = createUmi("https://...
Bobz's user avatar
  • 504
0 votes
0 answers
16 views

How to inherit or create an extended version of Token-2022? "is" in Solidity

I know how to create a token based on Token-2022 -- instanciate it. That what in Solidity is is keyword. However, I'm confused: how to create a one that extends it? That is, there would be Token-2022-...
barugaggi's user avatar
1 vote
1 answer
104 views

Hide sender and recipient from a transaction

I want to make a payment in USDC and hide the sender and recipient of the transaction. If I got it right, this is a functionality that Polygon has implemented with Nightfall. Can I do that on Solana ...
Björn W's user avatar
  • 153
1 vote
1 answer
72 views

Transfer_hook in spl-2022: Only deduct tax from swap transaction

Is there a way to modify the transfer_hook in order to deduct tax fee in $SOL from swap transaction only? I know there is transfer-hook supported that, but dont know how I check program address of ...
Jade's user avatar
  • 117