Add a library for creating Rewards transactions
And move out of the SDK
This commit is contained in:
@ -12,7 +12,6 @@ pub mod native_program;
|
||||
pub mod packet;
|
||||
pub mod payment_plan;
|
||||
pub mod pubkey;
|
||||
pub mod rewards_program;
|
||||
pub mod shortvec;
|
||||
pub mod signature;
|
||||
pub mod storage_program;
|
||||
|
@ -1,24 +0,0 @@
|
||||
use crate::pubkey::Pubkey;
|
||||
use bincode::serialized_size;
|
||||
|
||||
pub const REWARDS_PROGRAM_ID: [u8; 32] = [
|
||||
133, 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() == REWARDS_PROGRAM_ID
|
||||
}
|
||||
|
||||
pub fn id() -> Pubkey {
|
||||
Pubkey::new(&REWARDS_PROGRAM_ID)
|
||||
}
|
||||
|
||||
#[derive(Debug, Default, Serialize, Deserialize, PartialEq, Eq)]
|
||||
struct RewardsState {}
|
||||
|
||||
/// Upper limit on the size of the Rewards State.
|
||||
pub fn get_max_size() -> usize {
|
||||
let rewards_state = RewardsState::default();
|
||||
serialized_size(&rewards_state).unwrap() as usize
|
||||
}
|
Reference in New Issue
Block a user