2018-12-04 14:38:19 -08:00
|
|
|
mod budget_program;
|
|
|
|
|
|
2018-12-14 20:39:10 -08:00
|
|
|
use crate::budget_program::process_instruction;
|
|
|
|
|
use log::*;
|
2018-12-04 14:38:19 -08:00
|
|
|
use solana_sdk::account::KeyedAccount;
|
|
|
|
|
use solana_sdk::native_program::ProgramError;
|
|
|
|
|
use solana_sdk::pubkey::Pubkey;
|
2019-03-11 14:50:31 -06:00
|
|
|
use solana_sdk::{custom_error, solana_entrypoint};
|
2018-12-04 14:38:19 -08:00
|
|
|
|
|
|
|
|
solana_entrypoint!(entrypoint);
|
|
|
|
|
fn entrypoint(
|
2019-03-07 13:34:13 -07:00
|
|
|
program_id: &Pubkey,
|
2018-12-04 14:38:19 -08:00
|
|
|
keyed_accounts: &mut [KeyedAccount],
|
|
|
|
|
data: &[u8],
|
|
|
|
|
_tick_height: u64,
|
|
|
|
|
) -> Result<(), ProgramError> {
|
2018-12-14 12:36:50 -08:00
|
|
|
solana_logger::setup();
|
2018-12-04 14:38:19 -08:00
|
|
|
|
|
|
|
|
trace!("process_instruction: {:?}", data);
|
|
|
|
|
trace!("keyed_accounts: {:?}", keyed_accounts);
|
2019-03-11 14:50:31 -06:00
|
|
|
process_instruction(program_id, keyed_accounts, data)
|
|
|
|
|
.map_err(|e| ProgramError::CustomError(custom_error!(e)))
|
2018-12-04 14:38:19 -08:00
|
|
|
}
|