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 |
6
votes
Accepted
Is program account size resizable
It will be soon possible to resize the program data using UpgradeableLoaderInstruction::ExtendProgramData but the feature is currently behind the feature flag.
https://github.com/solana-labs/solana/pu …
2
votes
trait bound `AccountInfo<'_>: BorshSerialize` was not satisfied
You cannot send SOL to an account without providing that account to the runtime, alternatively what you can do is save the address in the state, then validate the provided owner is correct / do that v …
2
votes
Accepted
How to Dedupe a Common Context Struct
Yes, you can use the use the composite accounts feature of anchor to factorize the common part.
It would become
#[derive(Accounts)]
pub CommonStuff<'info> {
pub signed: Signer<'info>,
#[account(
…
1
vote
Proper usage of `getProgramAccounts` via Rust SDK. Cannot execute RPC call from SDK
If you read the first error message, it complains about the returned data being too large for base58.
// Err(ClientError { request: Some(GetProgramAccounts), kind: RpcError(RpcResponseError { code: -3 …
1
vote
Accepted
How to override a trait implementation generated by a macro
You cannot override/redefine a trait but the crate could allow skipping the implementation.
Since it is reserved space and ser/deser that data does not add anything, could you simply omit the reserved …
2
votes
Best way to pack data and then hash it, both in Rust and NodeJS
It is the same as solidity, you need to encode the data structure first, then only you can hash it. So once encoded to bytes you can use solana_program::keccak::hashv on the slice of bytes.
To pack da …