2

Before I start, I would like to apologize for writing a long message. I am a novice software developer who is just starting to learn Solana. Therefore, I wrote the whole story from start to finish because I did not know which information my experienced friends might need.

I wanted develop a Solana token project on Ubuntu. I installed Ubuntu 22.04.3 LTS. Then I installed Solana from terminal using the following code:

**sh -c "$(curl -sSfL https://release.solana.com/v1.17.16/install)"

After restarting, I entered the following command this time:

solana-keygen new

The terminal gave me the following output:

Wrote new keypair to /home/charles/.config/solana/id.json pubkey: 99n8EgyLHUUQtvJSog32sV63AMQvjWn7CaMd8gPmAoXz Save this seed phrase and your BIP39 passphrase to recover your new keypair: word word word word word word word word word word word word Of course my secret phrases are not word word word :)

Then I sent 10 USD worth of SOL to the address 99n8EgyLHUUQtvJSog32sV63AMQvjWn7CaMd8gPmAoXz from a crypto exchange.

Then I saw that the SOLs I sent came when I typed the solana balance command to the terminal.

Then I updated using the command sudo apt update. Then I installed Rust without any problems using the command curl https://sh.rustup.rs -sSd | sh"

I restarted Ubuntu and typed the command sudo apt install libudev-dev to the terminal and installed another necessary tool.

I gave the command sudo apt install libssl-dev pkg-config to the terminal again and installed this program without any problems.

Then I typed the command sudo apt install build-essential -y and installed it without any problems.

After this installation, I gave the command cargo install spl-token-cli to the terminal and installed it without any problems.

Up to this point, I have prepared the necessary infrastructure for the coin I will create without any problems. Then I restarted and entered the following command to the terminal.

spl-token create-token

Terminal gave me the following output

Creating token Gdbeic4zMxtJMRYoKUu6x4oQGfnoPfnXgGAPXBjfXCNX under program TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA

Address: Gdbeic4zMxtJMRYoKUu6x4oQGfnoPfnXgGAPXBjfXCNX Decimals: 9

Signature: 2KtLg1L6Ne3xVtPjPrR2rW4qSQSc5n6mx2UqiDuNGrBMiqV7FJnE4VqmA946RjBW64XcQQhY1q1Mg8ScybgxLfZo

After this process was finished, I typed the following command to the terminal.

spl-token create-account Gdbeic4zMxtJMRYoKUu6x4oQGfnoPfnXgGAPXBjfXCNX

terminal output

Creating account 7Lkd3rFrb78BCck8CLCEZc6rbXPNup2F5oNgnMzAstMc

Signature: 2D4iT4R1rQmFgj7oKJCjGHaE3CNR2mKFzovXcEwTf49U94BTRcgH6tVR49PpATJ21bjfS2BiPTt1VNyE7gs86D7

After this command, I typed the following command to the terminal and minted the token.

spl-token mint Gdbeic4zMxtJMRYoKUu6x4oQGfnoPfnXgGAPXBjfXCNX 500000000 7Lkd3rFrb78BCck8CLCEZc6rbXPNup2F5oNgnMzAstMc

The terminal gave the following output.

Minting 500000000 tokens Token: Gdbeic4zMxtJMRYoKUu6x4oQGfnoPfnXgGAPXBjfXCNX Recipient: 7Lkd3rFrb78BCck8CLCEZc6rbXPNup2F5oNgnMzAstMc

Signature: 61M7qBX1LxeTQWACk5sChTqpXu84rCv3zjh3JF7KC4FrTanFzgacaTjeP87c9nDfxUBcbvcxWWKnGNrXnTwzHUo4

Actually, everything was normal up to this point, but at this point I realized that Metaplex Metadata is required to introduce the minted tokens to the Solana network and give it a name, abbreviation, and logo. However, unfortunately, I could not figure out how to do it, despite all my research. Later, I also lost this Ubuntu operating system without being able to back it up due to an error.

This is all the information I have, but when I accessed my wallet again in Phantom Wallet with the recovery words for the Solana wallet above, I noticed that my SOLs that I saw in the Solana terminal were not there.

When I check the wallet 99n8EgyLHUUQtvJSog32sV63AMQvjWn7CaMd8gPmAoXz at solscan.io, the SOLs are still visible in the wallet. However, when I access the wallet with the secret words, they are not there.

Now, I have 2 questions for you. First, can I recover the SOLs in my wallet? Or are they lost forever? It's not a significant amount, only about 7-8 USD, but I don't want to lose 8 dollars every time I try :)

Second, how can I give a name, abbreviation, and logo to a token after minting it and include it in the main network? The resources on the internet are very complicated, at least I didn't understand anything.

Thanks A Lot

4 Answers 4

1

regarding the metadata question .

First you need to create an UMI connection:

const umi = createUmi('https://api.devnet.solana.com');
const keypair = umi.eddsa.createKeypairFromSecretKey(new 
Uint8Array(wallet));
const signer = createSignerFromKeypair(umi, keypair);
umi.use(signerIdentity(createSignerFromKeypair(umi, keypair)));

You would have to create a pda for the metadata:

const token_metadata_program_id = new 
PublicKey('metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s')


const metadata_seeds = [
Buffer.from('metadata'),
token_metadata_program_id.toBuffer(),
mint.toBuffer(),
];
const [metadata_pda, _bump] = 
PublicKey.findProgramAddressSync(metadata_seeds, 
token_metadata_program_id);

then you would have to add your metadata:

  let myTransaction = createMetadataAccountV3(umi, {
  
  metadata: publicKey(metadata_pda.toString()),
  mint: publicKey(mint.toString()),
  mintAuthority: signer,
  payer: signer,
  updateAuthority: keypair.publicKey,
  data: {
    name: "Solana Stack Exchange",
    symbol: "$STE",
    uri: "solana.stackexchange.com",
    sellerFeeBasisPoints: 0,
    creators: null,
    collection: null,
    uses: null,
  },
  isMutable: true,
  collectionDetails: null,

Then sign the tx:

let tx = await myTransaction.sendAndConfirm(umi);

Add try-catch block, that will help you catch and handle any errors that may occur during the execution of the tx. You can Adjust the error handling logic based on your specific needs.

make sure you import :

import { createUmi } from "@metaplex-foundation/umi-bundle- 
defaults";
import { createMetadataAccountV3 } from "@metaplex-foundation/mpl- 
token-metadata";
import {
createSignerFromKeypair,
publicKey,
signerIdentity,
} from "@metaplex-foundation/umi";

Have a nice day.

2
0

for you wallet, the sol are still inside it, as you can see on solscan. It is quite weird that you can't import the wallet in phantom with the words (never tried it with the 12 words tho), but there must be a solution i guess.When you import your wallet in phantom, does it show the same public key ?

for metadata, if you don't want to code it, you can use this to update / create metadata : https://token-metadata.effe2.xyz/

3
  • I am not using Metamask for SOL. I have installed Phantom Wallet and recover my wallet via using secret phrase.. its accept secret phrase and open wallet but SOL's are not there. Also I have installed Solflare again recover my wallet via using secret phrase again not show my SOL's. I give all this story Brand AI (Google) its say me its about Solana nodes but I also dont know what I do do about this.. Jan 17 at 19:00
  • when you import in phantom, what is the public key showed in phantom ? is it the same as you expect ?
    – Effe2
    Jan 17 at 21:09
  • When I look public key mean wallet adress right? its diffirent than upside.. Its ""Cgff8FPXHyxtZfwrHF841VjnVWgcXsw9RWwENLRXoKst"" But I have also checked my secret phrases from Phantom Wallet now and its %100 same to my saved secret phrases.. I am sure about I saved my secret phrases from Ubuntu terminal its correct. Problem is i cant found correct wallet to look like. I am not understand what is going on. Jan 18 at 0:38
0

For the missing balance, it's still there. It depends on the kind of wallet you are using. Usually tokens don't show up unless you add the token manually but Solana balance show up by default especially if it's a Solana wallet. So unless you are using say.. a metamask wallet, then you may need to add solana account manually for the balance to show up.

1
  • I am not using Metamask for SOL. I have installed Phantom Wallet and recover my wallet via using secret phrase.. its accept secret phrase and open wallet but SOL's are not there. Also I have installed Solflare again recover my wallet via using secret phrase again not show my SOL's. I give all this story Brand AI (Google) its say me its about Solana nodes but I also dont know what I do do about this.. Jan 17 at 18:59
0

The address generated by spl cli its pub key , So your wallet 99n8EgyLHUUQtvJSog32sV63AMQvjWn7CaMd8gPmAoXz address this one is pub key , you wont see balance of that in web wallets .

You can transfer balance from it using cli solana transfer transaction , it will be get done via cli using your key pair you can transfer to another wallet.

1
  • I still can't use the same operating system mean Linux. For this raeson in fact I dont know how I can save this money.. In fact I kind of gave up I cant found information.. Its another money lost in cyberspace :) Apr 10 at 12:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.