remove some boilerplate (#4143)

This commit is contained in:
Rob Walker
2019-05-06 10:11:18 -07:00
committed by GitHub
parent 88fdba5aca
commit 694d28acf8
5 changed files with 5 additions and 45 deletions

View File

@ -3,17 +3,9 @@ pub mod budget_instruction;
pub mod budget_processor;
pub mod budget_state;
use solana_sdk::pubkey::Pubkey;
const BUDGET_PROGRAM_ID: [u8; 32] = [
2, 203, 81, 223, 225, 24, 34, 35, 203, 214, 138, 130, 144, 208, 35, 77, 63, 16, 87, 51, 47,
198, 115, 123, 98, 188, 19, 160, 0, 0, 0, 0,
];
pub fn id() -> Pubkey {
Pubkey::new(&BUDGET_PROGRAM_ID)
}
pub fn check_id(program_id: &Pubkey) -> bool {
program_id.as_ref() == BUDGET_PROGRAM_ID
}
solana_sdk::solana_program_id!(BUDGET_PROGRAM_ID);