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 not deleted user 400

Should be used for all things relating to the Anchor Framework.

1 vote

how to transfer native SOL from program to user

// creating SOL transfer instruction let ix = anchor_lang::solana_program::system_instruction::transfer( from_pubkey, &to_pubkey, amount ); // invoking SOL t …
SwayStar123's user avatar
4 votes
2 answers
91 views

In what ways does Anchor improve security in a solana program?

I had heard that all accounts that are passed into the Accounts struct are enforced to be owned by the program, but that evidently seems to be false
SwayStar123's user avatar
1 vote
2 answers
102 views

How to get Data for an instruction from a program that uses an older version of anchor?

Im trying to CPI into marinade finance, but their codebase is in anchor 0.14, and im using anchor 0.24, so I cannot import the crate to get anything. …
SwayStar123's user avatar
5 votes
2 answers
211 views

error: failed to select a version for the requirement `anchor-lang = "^0.14.0"`

Im trying to use marinade finance program to CPI into for my project, however while trying to import it in my cargo.toml i get this error My cargo.toml dependencies [dependencies] anchor-lang = "0.24.2 … " anchor-spl = "0.24.2" marinade-finance = { git = "https://github.com/marinade-finance/liquid-staking-program" } The error Failed to obtain package metadata: `cargo metadata` exited with an error: warning …
SwayStar123's user avatar
1 vote
1 answer
296 views

How do I make a PDA own a system account

Anchor btw …
SwayStar123's user avatar
1 vote
1 answer
128 views

How do I advance time in localnet?

Im using anchor and trdelnik if that matters …
SwayStar123's user avatar
1 vote
1 answer
120 views

How do I make a DAO in anchor?

I see theres a governance library in anchor spl, but i cant find any examples on how its supposed to work. …
SwayStar123's user avatar