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 1708
6 votes
Accepted

Error:Deploying program failed transaction simulation failed: Error processing Instruction 0...

You will need to extend your program size, if you made changes to it. This is possible from the CLI version 1.18 > To fix this run solana program extend PROGRAM_ADDRESS_HERE 20000 -u d -k ~/.config/s …
Jimii's user avatar
  • 7,672
3 votes
Accepted

Escrow program help

You violated borrow checker rules. You borrow the Escrow account as a mutable variable here let escrow: &mut Account<Escrow> = &mut ctx.accounts.escrow; but try to use it as an immutable reference her …
Jimii's user avatar
  • 7,672
3 votes

Solana Anchor Program - Withdraw Functions says - Error processing Instruction 0: Provided o...

authority over different token accounts and can make transfers for your i.e // pda to have authority over tokens on your program #[account] pub struct AuthorityPDA { bump: u8 } // in the give tip IX ```rust
Jimii's user avatar
  • 7,672
2 votes
Accepted

How to check that an account is the owner of an onchain program?

You can check this using the solana cli using solana program show C3N7mj1oCrQNkzLW3dcaV7FrSbqJjbRX6BKkXePz2tFG and you'll get an output like then one displayed below where the Authority is the owner …
Jimii's user avatar
  • 7,672
2 votes
Accepted

avm install 0.30.1 is failing - could not compile `ahash` (lib)

It might be because you are using the latest version of Nightly Rust. … the tool-chain rustup install 1.78.0 # use the toolchain rustup default 1.78.0 For anchor, avm install latest avm use latest A counter to what you mentioned, the avm CLI binary uses your system's Rust
Jimii's user avatar
  • 7,672
2 votes
Accepted

How to organize program's anchor code properly

Take a look at https://github.com/coral-xyz/xnft/, this is the recommended way. Putting the state in the state directory and instructions i.e. the functions together with the Accounts struct in the in …
Jimii's user avatar
  • 7,672
2 votes

I want to better understand how to create tokens in typescript and how to create tokens in p...

Using Metaplex and the create helpers from Umi -> https://developers.metaplex.com/guides/javascript/how-to-create-a-solana-token These are the easiest paths to follow, If you want to achieve this in a Rust
Jimii's user avatar
  • 7,672
2 votes
Accepted

How to test Programs with Rust in Anchor?

To initialize a new project with version anchor-cli 0.30.1 using Rust for the tests anchor init --test-template rust PROJECT_NAME To change anchor version, use AVM avm install latest # not needed if you …
Jimii's user avatar
  • 7,672
2 votes
Accepted

How to Check if an NFT Belongs to a Specific Collection in Solana with mpl_token_metadata?

If you are using anchor, you will be able to fetch this from the deserialized account in the collection field key, ref: https://docs.rs/mpl-token-metadata/latest/mpl_token_metadata/types/struct.Collec …
Jimii's user avatar
  • 7,672
1 vote

Raydium swap with rust

Check out the Anchor CPI examples in this repo https://github.com/raydium-io/raydium-cpi-example
Jimii's user avatar
  • 7,672
1 vote

How to resolve 'Collection Must Be a Unique Master Edition v2' error?

Check the master_edition address you are passing in. That might be causing it. To also simplify your work, Metaplex provides CPI IX builders so that you do not have to worry about account management. …
Jimii's user avatar
  • 7,672
1 vote

"failed: An account required by the instruction is missing" transfer within contract

The error you are encountering means you are trying to you are trying to transfer to an account you haven't specified on your client side. Double-check to make sure that the user_pda and user_account …
Jimii's user avatar
  • 7,672
1 vote

Error Number: 2006. Error Message: A seeds constraint was violated

You migh be deriving the lottery address incorrectly, Try this and check whether the tests pass const [lotteryPda, lotteryBump] = PublicKey.findProgramAddressSync( [Buffer.from(lotterySeed), ne …
Jimii's user avatar
  • 7,672
1 vote

How to Convert from Account<'info, TokenAccount> to UncheckedAccount<'info>

Not sure if I fully understand your question, but you want to convert a typed account to an untyped account? Since both AccountInfo and UncheckedAccount are basically just AccountInfo types, using .to …
Jimii's user avatar
  • 7,672
1 vote

Reference to mint is not recognized in Struct creation while trying to create an NFT in Anchor

This tutorial uses an outdated version of mpl_token_metadata. Switch to a Metaplex version >0.4.0 e.g mpl-token-metadata = "4.1.2" Update your Solana version to 1.18.8. You'll face some stack overflow …
Jimii's user avatar
  • 7,672

15 30 50 per page