Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
5
votes
Get the balance of SPL Tokens from a connected wallet to a DAPP
If I understood you right, your code works, but you need to get the TokenAccount address from the wallet right?
What you can do is: call getTokenAccountsByOwner(pubKey) and then check all the token ac …
3
votes
How can i get the Size(bytes) of a Solana Transaction?
I would need a bit more information I think, but transaction.Serialize() gives you the byte array and then you can check the size.
2
votes
Accepted
typeError: Cannot read properties of undefined (reading 'toString')
This looks like one of the public keys you are logging is null. I would double check all the accounts especially the path to the keypair and the program.
2
votes
Accepted
Why do sandwich attacks still exist on jito?
Its still happening just there is no mempool anymore. You can hear about the details here.
https://www.youtube.com/watch?v=wXBWb2LrD08
2
votes
Accepted
Solana programs are public by default?
Yes all programs are by default public and everyone can see the contents of any account.
You can make certain instructions so that only you can call them by adding some checks in the program.
This is …
1
vote
How to tell if freeze and mint authority are revoked?
You can see the mint and close authority on SolanaFM for example:
https://solana.fm/address/8jFzPydsFBKPMvVrVBZCkgp84xRKAKYxEBemF9MF2dSk?cluster=devnet-solana
You can also use js:
const info = await c …
1
vote
Run from a validator node
In general its always better to run your own hardware. It will be cheaper and better performance and you have full control.
There is however a solution how to run a validator in the cloud in aws:
http …
1
vote
Accepted
Why Sol transfer doesn't need account creation?
The code you posted would not work out of the box.
The fromKeypair is paying for the new account to be created, and would need to have enough SOL to create a new account.
The default system account on …
0
votes
Why does this PDA account creating program fail?
You need to pass in the PDA into the transaction.
On Solana you always need to put in all accounts that you want to interact with.
in js you can find the PDA in the client like this
const counter_chec …
1
vote
Create ATA from Program for a PDA
Looks like either your user_token or pda_user_token are derived differently in client and program so the instruction thinks its an unknown account.
Double check that all accounts you log in the progra …
1
vote
Accepted
using event vs subscribing to account changes
If you mean anchor events i'm pretty sure they do the same thing as logging and listening to program logs. They log smth and in the client listen to the logs via ws connection. (https://github.com/cor …
2
votes
Accepted
Retrieve the upgrade authority of current program
You should be able to do that using the instruction sysvar. Here is an examples: https://solana.com/developers/cookbook/programs/read-multiple-instructions
pub fn read_multiple_instruction<'info>(ctx …
2
votes
Why is the deployment on to mainnet not happening?
Try with version 1.18.12 there are some fixes in there regarding program deploys:
sh -c "$(curl -sSfL https://release.solana.com/v1.18.12/install)"
https://docs.solanalabs.com/cli/install
And also wh …
1
vote
Is there an ecosystem crate that provides a bloom filter implementation?
There is this rust crate:
https://github.com/jedisct1/rust-bloom-filter
Maybe that one works for you. Or are you looking for a program example that uses bloom filter?
1
vote
error: package `solana-program v1.18.26` cannot be built because it requires rustc 1.75.0 or...
Solana uses the rust version from the plattform tools which you can find in:
/Users/userName/.cache/solana
If you are using SPL token crate you can see here https://crates.io/crates/spl-token/6.0.0/de …