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

@ -1,5 +1,4 @@
use serde::Serialize;
use solana_sdk::pubkey::Pubkey;
pub mod config_instruction;
pub mod config_processor;
@ -9,13 +8,7 @@ const CONFIG_PROGRAM_ID: [u8; 32] = [
64, 25, 163, 35, 239, 160, 0, 0, 0, 0,
];
pub fn check_id(program_id: &Pubkey) -> bool {
program_id.as_ref() == CONFIG_PROGRAM_ID
}
pub fn id() -> Pubkey {
Pubkey::new(&CONFIG_PROGRAM_ID)
}
solana_sdk::solana_program_id!(CONFIG_PROGRAM_ID);
pub trait ConfigState: Serialize {
/// Maximum space that the serialized representation will require