Skip to main content

Questions tagged [spl-token]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
41 views

Transfer specific token to and from a known account

Given that I have the following program use anchor_lang::prelude::*; use anchor_spl::token::{self, Mint, Token, TokenAccount, Transfer as SplTransfer}; declare_id!("...
1 vote
1 answer
76 views

Transfer USDC with Rust from one wallet to another

I'm new here and I would like to transfer USDC from a defined wallet to another defined wallet. The From account could be a Signer account. I'm really confused and I don't know what I should do. With ...
0 votes
1 answer
14 views

How to get the pool balance and pool token balance in past epoch

Is there a way to read pool balance and pool token balance in past epoch?(for given pool public key)
2 votes
0 answers
9 views

SNS - Retrieve all Domains+Subdomains of an User

The following code is used to retrieve all Sub-Domains of a Public-Key. const getAllSNSProgramAccounts = async () => { const accounts = await connection.getProgramAccounts(new PublicKey('...
2 votes
1 answer
30 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 ...
1 vote
2 answers
21 views

Sending SPL Token from PDA to ATA Problem

I have codes for transfer USDC from ATA to PDA and PDA to ATA. Also i have counter for people to be able create PDAs more than one. Counter was u8 at before. Then i realized one people only can create ...
1 vote
1 answer
16 views

How to use spl_token account with solana-program-test crate?

I am trying to write a test with the solana-program-test crate for a solana program. This program makes a CPI to a token program: let ix = Instruction { program_id: *token_program.key, ...
0 votes
1 answer
13 views

How to add metadata (name, symbles, ...) to spl token?

I am using @solana/spl-token to create spl token, but I cant add metadata to the token, I know TOKEN_2022_PROGRAM_ID can do that, but how can I make it works with TOKEN_PROGRAM_ID? Here is my code: ...
2 votes
3 answers
1k views

I want to add liquidity into Raydium programmatically

I have developed a presale smart contract using Anchor, and it is currently functional. Now, I am exploring ways to transition to a public sale on decentralized exchanges (DEX) like Raydium after ...
2 votes
1 answer
28 views

How to fetch token metadata on chain?

I am trying to retrieve the metadata for a token only using on-chain method such as getProgramAccounts. Unfortunately I cannot use any other language except Python so I cannot make use of libraries ...
1 vote
1 answer
26 views

Error "process is not defined" when importing { Metaplex } from '@metaplex-foundation/js';

I have error when import @metaplex-foundation/js lib. I tried following to this docs from metaplex https://github.com/metaplex-foundation/js-examples/tree/main/getting-started-react-cra5 , but it ...
0 votes
1 answer
29 views

USDT received from Binance, but impossible to send or swap them

I made a withdrawal of USDT from binance to my personal wallet which I use daily for defi etc. Together with this "new" USDT received from Binance, I have like 16 usdt on my wallet, and ...
0 votes
1 answer
81 views

Problem installing @solana/spl-token @solana/web3.js

I want to deploy and interact with a NFT solana program. As recommanded by the documentation I am using this code https://github.com/solana-developers/program-examples/blob/main/tokens/nft-minter/...
0 votes
0 answers
23 views

Problem with SPL Token accounts TokenAccountNotFoundError

I am trying to transfer some SPL tokens from X wallet to Y. const key = new web3.PublicKey( 'bSo13r4TkiE4KumL71LsHTPpL2euBYLFx6h9HP3piy1', ); const fromTokenAccount = ...
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, {}, ...
0 votes
1 answer
15 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 ...
1 vote
2 answers
388 views

What's the simplest way to implement a raffle on-chain?

From what I understand, each wallet would pay for a "ticket" and the raffle program would create a PDA for each wallet, tracking the wallet and number of raffle tickets. However, I'm not ...
0 votes
1 answer
23 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 ...
0 votes
1 answer
40 views

Get first mint txn and total minted amount for SPL token using web3.js

The value for total supply returned by getMint() or metaplex metadata is the same value shown on the block explorer front end, but I want to find the initial minted amount before any burning. For one ...
1 vote
1 answer
28 views

Why do we close WSOL Token Program accounts?

Background: If I understand correctly: During transactions where we transfer SOL to/from wallets, we need to wrap the SOL in a temporarily created WSOL Token Program account. Then use that to transfer ...
1 vote
1 answer
1k views

Liquidity pool without UI from Raydium

I'm looking to create a SPL token and I'm wondering if you can create a liqudity pool / remove liquidity pool without using the UI on Raydium.
1 vote
1 answer
1k views

Make token metadata immutable with SPL-TOKEN

Tech Stack: Solana CLI / SPL-TOKEN Ubuntu 18 Token vs Token-2022 Program I am using the CLI SPL-TOKEN cargo package, I am not a rust user, nor a javascript user, so my access level into the solana ...
0 votes
2 answers
415 views

SPL token transactions check

I figured out how to make my token and check incoming applications in the solana network with the usual transfer of solana. But how do I track an incoming transfer with a certain amount of my token to ...
1 vote
2 answers
59 views

Error: failed to get recent blockhash: TypeError: fetch failed, but "connection.getLatestBlockhash()" works

My script breaks at a contract function call on line number 250 with an error : but the connection.getLatestBlockhash works on line number 241: with this on the console :
0 votes
1 answer
14 views

Not seeing transfer fee / tax in solscan devnet

I see that the interface on solscan is slightly different between mainnet and devnet. I was hoping to check my token transfer tax within the transaction in solscan but I can't really see it working. I ...
1 vote
1 answer
21 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 ...
1 vote
1 answer
37 views

How to Display Custom Balance of an SPL-Token without Associated Token Account?

I'm in the process of migrating a rebasing token from EVM to Solana. The rebasing of the token is achieved by using a rate multiplier modified by an oracle. In order to acomplish this a custom ...
0 votes
2 answers
79 views

How can I track all USDC transfers from a wallet to another wallet in solana network

Im going to write a program with go or php to track all usdt/c transfers in different blockchains. in Tron or Ethereum everything is quite straight forward and I could implement things in 2-3 hours ...
0 votes
1 answer
15 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 ...
1 vote
1 answer
888 views

Public Data API for Token Security

Does there exist a version of an API, like this https://docs.gopluslabs.io/reference/tokensecurityusingget_1 which is not paywalled like birdeye.so API.
2 votes
2 answers
478 views

Using @solana/spl-token-swap package on devnet

I'm following along with this site https://www.soldev.app/course/token-swap. However, there seems to be a version difference in the use of TokenSwap.withdrawAllTokenTypesInstruction: I'm using the ...
1 vote
2 answers
204 views

How to transfer frozen NFT's

I've got a problem. I can't send NFT in my JS code, or rather include in transaction token NFT account which has state - frozen. How can I unfreeze it? I've seen an example that I need to use Metaplex....
1 vote
1 answer
114 views

If I'm already checking that the associated token account is owned by the expected owner, is there any benefit to token-2022's ImmutableOwner feature?

I was surprised to see this logging appear when my transaction was executed: "Please upgrade to SPL Token 2022 for immutable owner support" Leaving aside my surprise at the fact that the ...
1 vote
1 answer
43 views

spl-token Metaplex adding metadata issues

can anyone help with this error. happens after i try run my javascript that i compiled from typescript, to add metadata to my existing solana token. bigint: Failed to load bindings, pure JS will be ...
0 votes
1 answer
42 views

Token get initialized but not minted

I'm trying to mint a token on the devnet. I want to use rust, as I'm learning it in order to build more advanced functionalities later on, which I think wouldn't be very viable using command line or ...
0 votes
1 answer
19 views

Burn operations fail

I'm playing around with Solana Playground using this example - https://beta.solpg.io/6570e5b7fb53fa325bfd0c4e and what I'm trying to do is burn some of the locked token fees, I'm doing it at this ...
0 votes
1 answer
35 views

How to differentiate spl token vs lp token vs nft?

since everything it's an account, how to categorize this into 3 : nft, lp token, spl token/spl token 2022 ? assuming i've below code : const accounts = await connection.getTokenAccountsByOwner(payer, {...
0 votes
1 answer
40 views

TypeError: Cannot read properties of undefined (reading 'toBase58')

Hello Im trying to get the metadata for the latest 5 newly minted tokens on the blockchain, I keep getting the error const args = this._buildArgsAtLeastConfirmed([address.toBase58()], commitment, ...
0 votes
0 answers
24 views

How do I create a token metadata account?

I would like to create a metadata account to update the metadata. //Connection and Umi instance const endpoint = clusterApiUrl("mainnet-beta"); const umi = createUmi(endpoint); const ...
0 votes
3 answers
700 views

how to find a new token in the block

I searched for a similar question but couldn't find one. So, I get the last block, then inside this, block I parsing all transactions. My task is to find information that a new token has been created. ...
0 votes
2 answers
66 views

Verified token creators?

we are looking into launching a token on the Solana chain but with our little experience we doubt our own process a little and due to the 'set in stone' principe of blockchain we went looking on the ...
0 votes
1 answer
18 views

Error occurred: Error: !signature

I'm trying to create a new SPL token using @solana/web3.js and @solana/spl-token at the end of the process I got this error Error occurred: Error: !signature. Even though I don't know if the weather ...
1 vote
1 answer
576 views

Need help with raydium sdk

I am building a swap like app that uses raydium but I'm facing alot of problems. I copied someone's code and tried to change it a little bit but something is quite off. Whenever I try to sell the ...
0 votes
1 answer
17 views

In localhost netwrok, spl-token create-token is error

In localhost network TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA token program is not exit. How deploy this.
4 votes
3 answers
2k views

SPL token image not showing in Phantom wallet

Does anyone uploaded metadata for a SPL token on the mainnet (https://api.mainnet-beta.solana.com) recently ? I uploaded the metadata, hosted on arweave both image and metadata json, but only the text ...
1 vote
1 answer
40 views

How to transfer an NFT token from a regular (onCurve) account to a PDA one using Solang

Does anyone have an example of how one can transfer an NFT token from a user account to the PDA one using Solang? The reason is to be able to acquire NFT-s sent by users on a program account (deposit),...
1 vote
2 answers
445 views

SPL Token Image not displaying in Phantom or Solscan

My image is not appearing in Phantom or Solscan. Metadata looks correct, image is an arweave link that works when searching. Any ideas why the image would not be displaying? https://solscan.io/token/...
3 votes
2 answers
313 views

"Create Account: account Address already in use" when creating a custom token

spl-token create-token 5bciMkmLh96tVzBHVS5ybxYPZFjaXydKZpRnstdoj3Zq.json When creating token: 5bciMkmLh96tVzBHVS5ybxYPZFjaXydKZpRnstdoj3Zq under program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA ...
1 vote
2 answers
538 views

Getting "incorrect program id for instruction" when attempting to create a token account after creating a mint

I have just started learning Solana and my first exercise is to build a script that can create a token and then create vault accounts for use on openbook market: Create token create & initialize ...
2 votes
1 answer
189 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 ...

1
2 3 4 5
13