Skip to main content
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
Results tagged with
Search options answers only not deleted user 712
6 votes
Accepted

What is the difference between these two transaction methods?

First one is a cross program invocation of the SystemProgram. Both accounts need to be owned by the SystemProgram. Second one also works with PDAs that are owned by your program. So useful for some ki …
Jonas H.'s user avatar
  • 7,219
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 …
Jonas H.'s user avatar
  • 7,219
5 votes

Why does `solana program show <address>` and `solana accounts <address>` return different va...

solana program show shows the program and the size of the Executable Data account. This is where the actually .so file will be depoyed to and takes up the most of the cost for deploying a program. s …
Jonas H.'s user avatar
  • 7,219
4 votes

problem with running tests for every program in local env

Program AQDdxLFXQk6eBsVEW1HiHKKH77QMzSK2vMCbjMPhERHx failed: Invoked an instruction with data that is too large (12884933564 > 10240) This means you are compiling with the wrong cli version. Try 1.14. …
Jonas H.'s user avatar
  • 7,219
4 votes
Accepted

r.serialize is not a function

The signAndSend of phantom expects a Transaction not an instruction. You need to create a transaction and add your instruction. The error most likely means that phantom is trying to serialize you tran …
Jonas H.'s user avatar
  • 7,219
4 votes

Attempt to debit an account but found no record of a prior credit.How to solve?

Maybe its using the keypair defined in the anchor toml to sign. So in terminal check solana address solana balance and eventually airdrop some sol there. Here are some nice helpers to load keypairs …
Jonas H.'s user avatar
  • 7,219
4 votes
Accepted

how can I get the return value of an instruction upon sent the Tx from JS client?

On Solana you would usually store data or state in an account and then read that from js after you changed it in a transaction. I would rethink the problem you are having and check if you really need …
Jonas H.'s user avatar
  • 7,219
4 votes

Token name and icon are not showing on explorers

The token extensions are pretty new and not yet supported everywhere. Feel free to nag all the wallets and explorers to support metadata and transfer hooks :D Im pretty sure many are working on adding …
Jonas H.'s user avatar
  • 7,219
4 votes

Solana Program Upgrade Best Practices

As long as a solana progamm is not frozen you can update it any time. If it becomes bigger after the upgrade you need to check if you payed enough rent for the new program size. As of now all programs …
Jonas H.'s user avatar
  • 7,219
4 votes
Accepted

How to decode instruction data using anchor?

When you build and anchor program it creates an IDL file and also typescript types. You can find them in the target folder under types. Then you can use that to decode the data like this: import IDL f …
Jonas H.'s user avatar
  • 7,219
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.
Jonas H.'s user avatar
  • 7,219
3 votes
Accepted

Is it possible to perform action/calculation in instruction/program and get the returned res...

So i'm not super familiar with solidity, but there the state is in the program right? On solana its in the accounts. So you would have a PDA with the account balance i guess. You could then in the cli …
Jonas H.'s user avatar
  • 7,219
3 votes

Most impactful optimisations to improve transaction finality on solana?

Hey I am currently working on the same topic for a game. I have not yet figured out. Totally makes sense and then only update the account data. The biggest improvements I saw came from using socket c …
Jonas H.'s user avatar
  • 7,219
3 votes
Accepted

How can the system program credit accounts if the ownership changes?

When your PDA (program derived address) is not owned by the system program you can not use the system program transfer CPI anymore. But you can still change the data of the account so also the lamport …
Jonas H.'s user avatar
  • 7,219
3 votes
Accepted

Checking deployed programs causes a timeout error. Sometimes works

This may be a rate limit on the public RPC. https://api.devnet.solana.com/ There are many other commercial RPC provider like for example: Triton, Helius, Quicknode, Hellomoon and many more. Most of th …
Jonas H.'s user avatar
  • 7,219

1
2 3 4 5 6
15 30 50 per page