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!("...
mstelz's user avatar
  • 35
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('...
Eduardo Chongkan's user avatar
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)
Kaveen Laksitha's user avatar
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 ...
Berkay Kaplan's user avatar
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 ...
Pedro's user avatar
  • 21
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: ...
user2873314's user avatar
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 ...
sashavsthewrld's user avatar
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 ...
RichardPhan's user avatar
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 ...
Luca's user avatar
  • 1
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, ...
S.Rivas's user avatar
  • 11
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 = ...
chenzen's user avatar
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 ...
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
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 ...
hustlecoin's user avatar
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 :
Rishabh Jamwal's user avatar
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 ...
Johan Casper Schmidt's user avatar
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 ...
JoeIsh's user avatar
  • 123
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, ...
Golden's user avatar
  • 27
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, {...
NoodleX's user avatar
  • 101
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 ...
Rishabh Jamwal's user avatar
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 ...
figs's user avatar
  • 65
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 ...
Juan Cruz Arancibia's user avatar
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 ...
Ramin Farmani's user avatar
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 ...
user14441's user avatar
0 votes
1 answer
143 views

Need tech documents about SPL 404

I want to learn spl404 (how it works, how can I implement the logic etc.), however I could not find any technical document, developing guide or any tutorial. Are there any suggestion to deep dive into ...
Jane P.'s user avatar
3 votes
1 answer
42 views

Confidential Transfer Solana Setup script failing

I am trying to understand Solana Confidential Transfers, so I ran this script from the official Solana repository for a simple demonstration https://github.com/solana-labs/solana-program-library/blob/...
0xSOL's user avatar
  • 31
1 vote
1 answer
27 views

How to create associated token account for a new mint?

I created a new token with metadata with this guide. Now I want to create the corresponding token account by using const tokenAccount = await getOrCreateAssociatedTokenAccount( ...
levmilarl's user avatar
1 vote
2 answers
62 views

Update metadata for fixed-supply spl-token

I've been searching for the answer to this question with no luck. I have BACH Token, a spl-token that I created two years ago, more or less. I designed it to be a fixed supply of 18 million (it was 18....
Seto's user avatar
  • 141
1 vote
0 answers
21 views

Verify new token solana explorer

I have a new token built in dexlab. But when I search in Explorer, it displays the below message. I researched some days ago, but I cannot find any way to fix it. Warning! Token names and logos are ...
AJackTi's user avatar
  • 11
2 votes
0 answers
34 views

What function should I use to purchase a token transfer with program_id?

I am trying to repeat this transaction (4Ku7oqwPAwRLPm7jNp2oTigYv8XpcTPLJwF49dLVS6ypi35vH9orwRAPcfMj37jj8FwmpMFuP5j8cS1hwdoXJp67) programmatically on solana or solana cli (I will be grateful for any ...
AREW's user avatar
  • 33
1 vote
1 answer
44 views

Can I change mint authority from null to an address

I have created an SPL token, minted some tokens and then paused the minting by setting authority to null. Can I reset the authority to my/some other wallet from Null ? I am using SPL through ...
Shubhankar Banerjee's user avatar
0 votes
1 answer
94 views

How to add twitter and website handles to SPL Tokens, to show up in Solscan

I have created a Spl token with metadata using the Token Program and createCreateMetadataAccountV3, the matadata file contains reference to social media handles defined in extensions e.g. "...
BlockLearner's user avatar
0 votes
1 answer
25 views

Error: solders.SignerError: not enough signers

I am trying to buy a token through solana.ру, but in the process of writing the code, I get an error from solana.rpc.api import Client, Keypair, Pubkey from spl.token.constants import TOKEN_PROGRAM_ID ...
AREW's user avatar
  • 33
0 votes
0 answers
21 views

How Can I Ensure Reliable SPL Token Transfers in Python and Address Intermittent Failures by Adding a Priority Fee? [duplicate]

I'm trying to implment spl token transfer in TG bot in python, but the transfer is failing from time to time with quite delay, I guess I could put priority fee to improve the situation, but cannot ...
cablespecific's user avatar
0 votes
1 answer
17 views

SPL-Token-2022 Fee Epoch length

Good evening, I am just wondering how long an Epochs for the Transfer Fees are. I Just playing around with that in a localtestnet and wondering when the epoches Changed. As i setted new Fees, Set the ...
pxlfussel's user avatar
0 votes
1 answer
30 views

Unable to Retrieve Data Using get_program_account with SPL Token Program (Python)

I'm developing a script to track newly created tokens on the Solana network. However, I'm encountering an issue when attempting to retrieve data using client.get_program_account. Despite my efforts, I'...
Nerevaine's user avatar
  • 124
1 vote
1 answer
39 views

seeds do not result in a valid address javascript

async function ata() { const secretKey = Uint8Array.from(JSON.parse(process.env.PRIVATE_KEY)); const keypair = Keypair.fromSecretKey(secretKey); const owner = new PublicKey(keypair.publicKey); ...
Roomka's user avatar
  • 47
1 vote
1 answer
74 views

expected a sequence of length 32 (got 43) error when using solana in Python

Solana community! I'm working on a Python script to filter transactions executed through the SPL Token Program. I aim to specifically identify and list new token creation transactions. However, I'm ...
Nerevaine's user avatar
  • 124
1 vote
2 answers
76 views

What is the preferred way to create Fungible Token with Metadata on Solana

I created a Fungible Solana Token using Metaplex Umi, mpl token metadata, mplCandyMachine libraries. It seems to be working fine, but I am just wondering if this is the best way to create a fungible ...
BlockLearner's user avatar
1 vote
0 answers
42 views

I can't buy my tokens in mainnet from another wallet

I can't buy my tokens in mainnet from another wallet. The spl-token mint command returns the following error: Error: Client(Error { request: Some(SendTransaction), kind: RpcError(RpcResponseError { ...
AREW's user avatar
  • 33
2 votes
1 answer
121 views

Helius Webhook for get real-time information about new tokens created

I'm using Helius webhook services to track new token creations with the TOKEN_MINT transaction type on the Solana blockchain. My webhook is set to listen to transactions from the account ...
Nerevaine's user avatar
  • 124
2 votes
1 answer
51 views

How to transfer spl token using wallet-adapter or any other wallet like phantom wallet?

Almost all of the tutorial and materials online/guide uses keypair, which is not practical
Vendetta Labs's user avatar
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 ...
Ken P's user avatar
  • 23
1 vote
1 answer
48 views

How can I resolve this "Error processing Instruction 1: custom program error: 0x1004"

I'm running into the following error trying to work through the transfer hook docs. https://solana.com/developers/guides/token-extensions/transfer-hook I am using Ubuntu on Windows WSL: I am running ...
Ayman's user avatar
  • 111
0 votes
1 answer
31 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
0 votes
0 answers
65 views

How to Use WebSockets to Check if a Token Mint Address is Tradable on Raydium?

Does anyone here know how to check if the given token mint address is already tradable using WebSocket? My current code polls the token holders and checks if Raydium already exists as a holder. But it ...
Syntax Surge's user avatar
0 votes
0 answers
26 views

blacklist token

I would like to know how I can create a black list on Solana, with solidity I do: function updateBlacklist(address _address, bool _isBlacklisted) public { isBlacklisted[_address] = _isBlacklisted; ...
Murilo de Souza Lopes's user avatar
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/...
jehan-gabriel's user avatar
0 votes
1 answer
65 views

How to get name and symbol of token from mint address

Im using javascript and i have the mint address of a token, for example this "Ei71196o8MpDsVdXyZEewEdxP4A8n3KMZKTFE7KE2xTR" and i want to get the name which in this case is Sillybird and the ...
Jorgin's user avatar
  • 3
0 votes
0 answers
23 views

Accidentally sent tokens to Associated Token Account Program ID

I made a mistake and accidentally sent my tokens directly to the Associated Token Account Program ID: ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL. I understand that this is a program ID and not a ...
Syntax Surge's user avatar

1
2 3 4 5
13