1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
#[macro_export]
macro_rules! prepare_entry_point {
($name:ident) => {
#[no_mangle]
pub fn prepare() {
$name(OBIDecode::try_from_slice(&oei::get_calldata()).unwrap());
}
};
}
#[macro_export]
macro_rules! execute_entry_point {
($name:ident) => {
#[no_mangle]
pub fn execute() {
oei::save_return_data(
&$name(OBIDecode::try_from_slice(&oei::get_calldata()).unwrap())
.try_to_vec()
.unwrap(),
);
}
};
}