Questions tagged [native-programs]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
1 answer
55 views

WSOL Account Keypairs

I created a WSOL token account so I don't have to be creating temporary token accounts every time I want to make a transaction. Thing is, I created that account using Python and the function that does ...
lsrth's user avatar
  • 21
0 votes
1 answer
53 views

What is the compute cost for calling the native Ed25519 signature verification program?

I'm trying to measure the compute unit cost for my transaction which has 2 instructions: { ix0: native ed25519 sig verify (Ed25519SigVerify111111111111111111111111111) ix1: myprogram.foobar } but ...
Nick G's user avatar
  • 3
1 vote
2 answers
141 views

Can invoke_signed Be Used in Solana Native Programs to Handle SPL Tokens for Staking?

While reviewing the Solana codebase, I came across the invoke_signed function, which is commonly used for cross-program invocations. I'm particularly interested in understanding if it's possible to ...
Syed Ghazanfer Anwar's user avatar
0 votes
1 answer
41 views

How reliable is the accounts: &[AccountInfo] array is?

I am trying to learn solana development[native solana] and when reading some example programs I saw they all use the "accounts: &[AccountInfo]" in order to figure out the accounts ...
Yali Haviv's user avatar
2 votes
2 answers
242 views

How can I transfer SOL using programs and PDA's with native rust?

Hey I try to create a basic program which takes and manages sol for users. Something like the weth contract on ethereum. The program just needs to store the SOL and under some conditions users will be ...
Yali Haviv's user avatar
3 votes
1 answer
54 views

Where can I find ic_msg logs?

I’m writing a native program and I’m using the ic_msg macro with the solana_test_validator binary, but I can’t seem to find the log messages. Where do the ic_msg logs go? Do I need to configure ...
Kevin Ji's user avatar
  • 185
0 votes
1 answer
77 views

Why we need to pass all that accounts into functions in native solana?

I am go through the solana course and I am not understand that basics of writing solana native programs. Why do we need to pass to the functions some AccountInfo slice? Where this adressess should ...
Gilsson's user avatar
2 votes
1 answer
49 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/...
Sewy's user avatar
  • 85
2 votes
1 answer
150 views

Can not send transaction from client

In my project, I'm using native Solana to create a contract. It is a basic program for users to enter their product info. I successfully built and deployed the contract but when I try to send a ...
brknarsy's user avatar
0 votes
1 answer
51 views

native invoke_signed create_account pda: writable privilege escalated [closed]

i'm thinking the client can't create my pda state_account since only the program can sign for it, but i must be missing something. my native excerpt: let state_account = next_account_info(...
user3438's user avatar
1 vote
1 answer
36 views

Is it safe to assume that the program_id passed via the solana runtime Entrypoint cannot be Forged

I am writing a program of which I cannot know the program ID ahead of time for several non-trivial reasons. I am curious whether or not it is safe to assume the safety of the program_id passed via the ...
Cyrial Kamda's user avatar
1 vote
1 answer
72 views

Is the zk proof verifier program open source?

So i wanted to get an idea on how the equality and range proofs get verified by the native proof verifier program but I don’t see verifier codebase anywhere. Is it open source? If not when will it be?
Harsh Patel's user avatar
0 votes
1 answer
72 views

Unable to execute unit tests

I am writing unit tests for a native rust program using solana-sdk, solana-program-test and assert_matches crates. After writing the tests, when I try to execute them using cargo test-bpf command, I ...
Shubham Singh's user avatar
0 votes
2 answers
33 views

Do Native program adresses should also be passed into the transaction?

I have reached the maximum transaction size and looking for a way to reduce the number of 32bytes addresses involved. I see the proposal being accepted but not implemented https://docs.solana.com/...
mehh's user avatar
  • 117