@@ -5,27 +5,15 @@ use pinocchio::{AccountView, Address, ProgramResult, entrypoint};
55pub mod error;
66pub mod instruction;
77pub mod pmm;
8- pub mod processor;
98pub mod state;
109
11- use instruction:: * ;
12-
1310entrypoint ! ( process_instruction) ;
1411
1512pub fn process_instruction (
16- program_id : & Address ,
17- accounts : & mut [ AccountView ] ,
18- instruction_data : & [ u8 ] ,
13+ _program_id : & Address ,
14+ _accounts : & mut [ AccountView ] ,
15+ _instruction_data : & [ u8 ] ,
1916) -> ProgramResult {
20- match instruction_data. first ( ) {
21- Some ( & INIT_MARKET ) => processor:: initialize_market ( program_id, accounts, & instruction_data[ 1 ..] ) ,
22- Some ( & PLACE_ORDER ) => processor:: place_order ( program_id, accounts, & instruction_data[ 1 ..] ) ,
23- Some ( & CANCEL_ORDER ) => processor:: cancel_order ( program_id, accounts, & instruction_data[ 1 ..] ) ,
24- Some ( & DELEGATE_ORDERBOOK ) => processor:: delegate_orderbook ( program_id, accounts, & instruction_data[ 1 ..] ) ,
25- Some ( & UNDELEGATE_ORDERBOOK ) => processor:: undelegate_orderbook ( program_id, accounts, & instruction_data[ 1 ..] ) ,
26- Some ( & UPDATE_ORDERBOOK ) => processor:: update_orderbook ( program_id, accounts, & instruction_data[ 1 ..] ) ,
27- Some ( & MATCH_ORDERS ) => processor:: match_orders ( program_id, accounts, & instruction_data[ 1 ..] ) ,
28- Some ( & SETTLE_TRADE ) => processor:: settle_trade ( program_id, accounts, & instruction_data[ 1 ..] ) ,
29- _ => Err ( pinocchio:: error:: ProgramError :: InvalidInstructionData ) ,
30- }
17+ // TODO: Implement instruction dispatch in Ticket 1.5
18+ Err ( pinocchio:: error:: ProgramError :: InvalidInstructionData )
3119}
0 commit comments