Add exchange program (#3444)

This commit is contained in:
Jack May
2019-03-22 21:07:36 -07:00
committed by GitHub
parent de2b6bc9fc
commit 6505221629
13 changed files with 1459 additions and 0 deletions

View File

@@ -0,0 +1,19 @@
pub mod exchange_instruction;
pub mod exchange_processor;
pub mod exchange_state;
pub mod exchange_transaction;
use solana_sdk::pubkey::Pubkey;
pub const EXCHANGE_PROGRAM_ID: [u8; 32] = [
134, 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() == EXCHANGE_PROGRAM_ID
}
pub fn id() -> Pubkey {
Pubkey::new(&EXCHANGE_PROGRAM_ID)
}