macro_rules! hopper_dispatch {
(
$program_id:expr, $accounts:expr, $data:expr;
$( $tag:literal => $handler:expr ),+ $(,)?
) => { ... };
}Expand description
Macro for instruction dispatch.
ⓘ
hopper_dispatch! {
program_id, accounts, instruction_data;
0 => process_init,
1 => process_deposit,
2 => process_withdraw,
}