Skip to main content
5 votes
Accepted

How to store data directly on the Solana blockchain?

While the accepted answer indicates No, it depends on your use case: You actually can store data on chain vis-a-vis the transaction you submit. When you submit a transaction the entire content of the ...
Frank C.'s user avatar
  • 656
3 votes

How can one paginate large number of accounts fetch on solana?

You can achieve it by using configuration object key named 'dataSlice'. const conn = new Connection('https://xxx'); // mainnet-beta connection const accountInfos = await conn.getAccountInfo(publicKey, ...
yacho's user avatar
  • 107
3 votes

how many Accounts i can create & how much max data that each Account can store in Anchor PDA program?

The maximum size of any account is 10 megabytes. Each account address on your Solana program will take 32 bytes for the address. You can make as many as your solana program can handle. You can study ...
Abdullah Qureshi's user avatar
2 votes

Print in Solana Playground

Try msg!("asdf"); or msg!("some var: {:?}", some_var) to print a variable to the logs.
Whiteseal's user avatar
  • 3,597
2 votes

How can one paginate large number of accounts fetch on solana?

here is a great explanation of paginating accounts by loris leiva that also happens to use candymachine as an example: https://lorisleiva.com/paginating-and-ordering-accounts-in-solana Content from ...
john's user avatar
  • 7,794
2 votes

How to store data directly on the Solana blockchain?

Shortly No Transactions are stored in the block. Transactions are called public ledger and a ledger means a record of a business's financial transactions. From here If the program needs to store ...
Yilmaz's user avatar
  • 1,264
2 votes

: AccountOwnedByWrongProgram. Error Number: 3007

When the owner is 11111111111111111111111111111111, that usually means the account is not initialized.
Whiteseal's user avatar
  • 3,597
1 vote
Accepted

Extend Account struct in anchor

This feature will come in Anchor 0.30.0. At the moment i don't know a way to improve this beside using native and use the account iterator or just passing in all the accounts in all instructions which ...
Jonas H.'s user avatar
  • 7,209
1 vote
Accepted

How to calculate space for an account dynamically using remaining_accounts

Should I just send the length of remaining_accounts as instruction data? This is the only way to do it, and then use that instruction data in the context macros with #[instruction(...)] The Context&...
m_callens's user avatar
  • 909
1 vote

Defining composite fields using Anchor Accounts structs from other crates

I have encountered this issue before, although with a different error as I was going cross-module, not cross-crate. I even raised it on the Anchor repo but it remains, as of now, unloved. The ...
sohrab's user avatar
  • 1,851

Only top scored, non community-wiki answers of a minimum length are eligible