add passive staking and rewards (#3579)
* add stake stuff * more generic * test decode bail cases * favor early returns
This commit is contained in:
17
programs/stake_api/src/lib.rs
Normal file
17
programs/stake_api/src/lib.rs
Normal file
@@ -0,0 +1,17 @@
|
||||
pub mod stake_instruction;
|
||||
pub mod stake_state;
|
||||
|
||||
use solana_sdk::pubkey::Pubkey;
|
||||
|
||||
const STAKE_PROGRAM_ID: [u8; 32] = [
|
||||
135, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,
|
||||
];
|
||||
|
||||
pub fn check_id(program_id: &Pubkey) -> bool {
|
||||
program_id.as_ref() == STAKE_PROGRAM_ID
|
||||
}
|
||||
|
||||
pub fn id() -> Pubkey {
|
||||
Pubkey::new(&STAKE_PROGRAM_ID)
|
||||
}
|
Reference in New Issue
Block a user