Questions tagged [native-programs]
The native-programs tag has no usage guidance.
8 questions with no upvoted or accepted answers
3
votes
0
answers
77
views
How to do account white listing using merkle tree on solana native rust program? Is it really possible to do whitelist account using merkle on solana?
I did this code But have doubt that it will not work as desired:-
use borsh::{BorshDeserialize, BorshSerialize};
use merkletreers::tree::MerkleTree;
use merkletreers::utils::hash_it;
use ...
3
votes
1
answer
67
views
What is the instruction_data struct for program ED25519?
I'm trying to deserialize the ED25519 program, but the struct I derived does not tally with the bytes in the instruction data (buffer)
https://github.com/solana-labs/solana/blob/master/sdk/src/...
1
vote
0
answers
13
views
How to prevent signature replay when using Ed25519 Native Program
If I am using the Native Ed25519 Program to verify a message signature, I will need to add the pre instruction that will contain signature, message and public key to verify. In my custom program, I ...
1
vote
0
answers
37
views
Here i am not able to access the tree in native rust. It shows symbol name is longer than 16 bytes
Here in processor in instruction pre_sale i want to use Tree struct from whitelist. but this error comes Error: ELF error: ELF error: Failed to parse ELF file: Section or symbol name .bss._ZN3ico12in ...
1
vote
0
answers
17
views
I want to use tree struct in presale instructions. But it takes more memory than 16 bytes please suggest a way to access Tree Struct form white list
Whitelist :-
use {
borsh::{BorshDeserialize, BorshSerialize},
merkletreers::{tree::MerkleTree, utils::hash_it},
solana_program::{entrypoint::ProgramResult, msg, program_error::ProgramError}...
1
vote
0
answers
20
views
Failed to send transaction: Transaction simulation failed: Error processing Instruction 0: incorrect program id for instruction
In the const sx = await sendAndConfirmTransaction i am getting error
const {
Connection,
Keypair,
SystemProgram,
SYSVAR_RENT_PUBKEY,
TransactionInstruction,
...
0
votes
0
answers
23
views
Is there any other way to store the merkle tree as global variables are not recommended in solana like static?
use {
borsh::{BorshDeserialize, BorshSerialize},
merkletreers::{tree::MerkleTree, utils::hash_it},
solana_program::{entrypoint::ProgramResult, msg, program_error::ProgramError,},
};
#[...
0
votes
0
answers
13
views
cannot move out of `whitelist_tree.merkle_tree` which is behind a shared reference
move occurs because whitelist_tree.merkle_tree has type MerkleTree, which does not implement the Copy trait :-
use {
super::WhitelistArgs,
crate::instructions::{transfer_tokens, whitelist::...