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 868
2 votes

Anchor test fails on Fedora

For Ubuntu users. I fixed it by installing the following lib. Step 1: wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb Step 2: sudo dpkg -i libssl1. …
Abdullah Qureshi's user avatar
5 votes

What does `entrypoint` do in solana rust?

(process_instruction);, tells the compiler to begin program execution as we don't have a main function here as we have in simple rust program for example: fn main() { println!("Hello, world!") … ; } In anchor projects, it is handled by the following library. use anchor_lang::solana_program In solana official docs it says: Solana Rust programs may depend directly on each other in order to gain …
Abdullah Qureshi's user avatar
1 vote
Accepted

Charge SOL Fee Before Minting NFT

This is what worked for me. First called the Transfer function from system_instruction::transfer() and then invoke it using invoke(). What I was doing wrong was that I was calling Transfer function fr …
Abdullah Qureshi's user avatar
1 vote
Accepted

Error Code: AccountDidNotSerialize. Error Number: 3004. Error Message: Failed to serialize t...

I increased the space that didn't worked initially. What worked for me is that after I increased the space (i.e space = 1024) and then deleted target folder, fetch new keys using anchor keys list, rep …
Abdullah Qureshi's user avatar
1 vote
Accepted

Do I need to create ATA for TokenAccount

I resolved the issue by setting authority as a PDA address in the token account. Token Account #[account( init_if_needed, seeds = [mint.key().as_ref(), b"nfts_vault_seed", from.key …
Abdullah Qureshi's user avatar
2 votes
Accepted

Stress Testing: 1000 Tranactions at the same Time

I think I need to look into the private RPC nodes such as Alchemy. On Solana Offical Docs it is mentioned that public RPC has the following limitations: Rate Limits# Maximum number of requests per 10 …
Abdullah Qureshi's user avatar
3 votes
Accepted

Use any Random Function in anchor lang

Found a way that we can simply use timestamps for this. let clock = Clock::get()?; let clock = clock.unix_timestamp % 10; // any number between range 0-10 Just make sure the random number rang …
Abdullah Qureshi's user avatar
3 votes
Accepted

Error Code: AccountDidNotSerialize. Error Number: 3004. Error Message: Failed to serialize t...

I increased the space of my account and redeployed the programs with new keys. #[account( init, payer = payer, space = 82+36, seeds = [b"my_custom_seed"], bump) ] pub ledger_account: A …
Abdullah Qureshi's user avatar