Questions tagged [solana-web3js]

322 questions
0
votes
1 answer

How to get "ownerof" token on Solana

I'm trying to see how you can get the "ownerof" token like on Ethereum but on the Solana blockchain instead. For example, I want a user to access a certain part of the website only if they have x token on their phantom wallet (or other Solana…
Relativity
  • 127
  • 2
  • 10
0
votes
1 answer

Getting error on running test validator for solana

On running command solana-test-validator on windows system, getting an error [2022-01-06T06:54:41.602352800Z INFO solana_test_validator] solana-validator 1.9.0 (src:7782d34b; feat:378846963) [2022-01-06T06:54:41.602479300Z INFO …
0
votes
2 answers

creating a side-smartcontract for Solana Token

I have created a token on the Solana Blockchain but i want to devise a part of it to a different issuer that will start a different ICO than mine. Who can shed some light into this ?
skitter
  • 1
  • 2
0
votes
1 answer

Solana: Recover source and destination public keys given a TransactionSignature

Is there a JS API to recover fromPubkey and toPubkey, given a transaction signature?
Manish Sharma
  • 170
  • 2
  • 11
0
votes
2 answers

solana transfer nft to any address web3js

I want to make a transfer from my wallet to another wallet with code. I use web3.js and I made a Solana transfer, but I don't know how to make an NFT transfer.
VovaProg
  • 19
  • 2
0
votes
1 answer

Solana Web3.js: Getting `null` for Mint account, althought it should return an `AccountInfo` object

When I run connection.getAccountInfo(watermelonMint.key); I get a null object, although it should return an AccountInfoObject. Any idea why this is the case? When I look for the address associated with this mint on solana explorer, I get normal…
DaveTheAl
  • 1,995
  • 4
  • 35
  • 65
-1
votes
0 answers

Adjust Wallet Configuration - Help me understand where is my problem here?

Here is the code, it should pop up a connect option to the site through 'Solflare' and I don't understand where is my problem here or maybe I just did it wrong: https://pastecode.io/s/x3xvan1j I used the same code that I did for the phantom wallet…
funkz
  • 1
-1
votes
1 answer

How to create a Solana program to constantly check wallet funds and transfer them to another wallet?

I'm new in web3 but experimented programmer. I want to try to make my first smart contract in Solana. I have a Phantom Solana wallet, and I want to create a smart contract that checks if my wallet have received any transaction of any token, and send…
-1
votes
1 answer

how do I parse the data from programSubscribe websocket Endpoint?

JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'programSubscribe', params: [ address, { encoding: 'jsonParsed', …
josh hoffer
  • 126
  • 1
  • 7
-1
votes
1 answer

Setting up multiple whitelist using Candy Machine v2

I am working to deploy my first minting site and wondering how I can go about setting up multiple whitelists. For example, I want to have 3 different whitelist each with a different price, where the first set of minters are on WL1 and can mint from…
bschmitty
  • 1,118
  • 3
  • 16
  • 46
-1
votes
1 answer

How to get Fee Payer of a transaction? from TransactionResponse object

I am trying to make a small public script to fetch the initial minter of a token or a list of tokens. The easiest way is to fetch the transaction that matches with the correct program id and get the fee payer because, in 99.99% of the cases, the fee…
Oguzhan
  • 145
  • 1
  • 9
-1
votes
1 answer

What the error EditionsMustHaveExactlyOneToken really mean?

I am using web3 to mint NFT on Solana's candy machine v2, followings all the instructions I can find. using libraries: @project-serum/anchor": "^0.24.2", @solana/spl-token": "^0.2.0", @solana/web3.js": "^1.41.6", when calling…
diwatu
  • 5,641
  • 5
  • 38
  • 61
-1
votes
1 answer

How can i get the public key of the Candy Machine of collection

Please Help i want to get NFT Mint Addresses and this function below return what i want but it requires the candy machine id : import { Connection, clusterApiUrl, PublicKey } from '@solana/web3.js'; import bs58 from 'bs58'; const connection = new…
-1
votes
1 answer

sendAndConfirmTransaction odd behaviour

Its quite possible I have a logical error somewhere but I'll ask the question anyway as I am experiencing some very weird errors.. Is it possible for web3.sendAndConfirmTransaction(.. to return a signature but moments later (for that same…
1977
  • 2,580
  • 6
  • 26
  • 37
-1
votes
1 answer

How to add a Pubkey to an account containing a vector of Pubkeys in an anchor program

use anchor_lang::prelude::*; use rand::Rng; use solana_program::{declare_id, pubkey::Pubkey}; declare_id!("Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"); #[program] pub mod raffle_impl { use super::*; pub fn create_raffle(ctx:…
1 2 3
21
22