Category "solana"

Call Solana web3.js from HTML

I am trying to run web3.js from HTML. Now so far I have been able to call window.solana.connect(); and window.solana.disconnect(); functions. However when I try

How to install Solana on Windows?

I ran: curl https://release.solana.com/v1.8.3/solana-install-init-x86_64-pc-windows-msvc.exe --output C:\solana-install-tmp\solana-install-init.exe --create-dir

error[E0412]: cannot find type `ProgramResult` in this scope

use anchor_lang::prelude::*; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[program] pub mod myepicproject { use super::*; pub fn start_st

Import phantom wallet private key into solana CLI

I need to use a Phantom Wallet through the Solana CLI, but I'm unable to configure it. For example, to check balance using solana balance --keypair fileexported

SOL Transaction Fees Inquiry

Is it possible to code a solana program (smart contract) where the transaction fees that you should pay, i.e., for minting / stacking / swapping tokens within t

I want to get the address from mnemonic with the proper derivation path

I am very new to blockchain programming and programming in general. I want to generate my SOL address using the mnemonic seed phrase with the derivation path "m

I want to know causing a solana transfer error

My token sending program has met an issue about sending transaction, throwing an error below. Error: failed to send transaction: Transaction simulation failed:

AnchorError occurred. Error Code: InstructionFallbackNotFound. Error Number: 101. Error Message: Fallback functions are not supported

I am trying to call the mintNft function on the front end but it throws an error and I can't fix it the error is: "Program log: AnchorError occurred. Error Code

can I access the private key of solana account (via phantom) to encrypt data?

I am very new to web3 etc but as far as I know, every account is represented by a public/private key. The public key can be accessed anytime and the private key

Airdropping Solana to a Specific Account

I would like to airdrop sols into a specific account to get my smart contract to fire an anchor test. Whenever I run my test I come across the error Error: Acco

Error: Custom: Invalid blockhash when solana program deploy

Trying to deploy a program to solana devnet. I was using solana program deploy ./path/xxxx.so -u devnet And I got multiple lines of msg 21AbKBwMcsDR4DciR6Z69X6v

Solana Can't find devnet.json

I'm following this article as a practice. And stuck with cat .config/solana/devnet.json I realize that windows OS doesn't have cat so I tried type ~/.config/so

Best way to save a secretKey

I'm learning Solana API on ReactJS. After generating a keypair you can recreate the same keypair with the secretKey. How can I save this keypair? I'm using reac

Solana - How to get token balance for a foreign account?

In Solana you can get your own balance with the CLI $ spl-token accounts But how do I get the token balance of a foreign account if I have the account ID or hi

`Invalid blockhash` error while deploying smart contract

I am trying to deploy the demo smart contract on solana for chainlink price feed but getting an error. I followed all the steps from https://docs.chain.link/doc

How to Pull HIstorical Price Data from Solana Devnet Contracts?

I am looking to grab historical data from our Solana Devnet feeds. Can you let me know if get_submissions is the function that should be called for historical d

Solana rpc subscribe to account transactions

I am trying to listen for transactions for an account, I need to know when a transaction is received and get the hash of that transaction. I am using Solana's j

I can not deploy the program to dev net with anchor

I get this error where I run anchor deploy: Deploying workspace: http://127.0.0.1:8899 Upgrade authority: /home/<user>/.config/solana/id.json Deploying pr

I cannot modify token information in solana

I have deployed my token to solana network. Because of some change in metaplex metadata so I have to revamp my token. I have to keep token name and symbo, then

Anchor build error versions of anchor-spl and anchor-lang

I'm using the following repository of rust: https://github.com/SmartCodeBlockchainDev/Nelson-NFT-stacking when I try to do an anchor build I get the following e