mirror of
https://github.com/d0zingcat/ore.git
synced 2026-05-15 15:10:19 +00:00
new macros
This commit is contained in:
@@ -137,3 +137,19 @@ macro_rules! impl_instruction_from_bytes {
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! account {
|
||||
($struct_name:ident) => {
|
||||
$crate::impl_to_bytes!($struct_name);
|
||||
$crate::impl_account_from_bytes!($struct_name);
|
||||
};
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! instruction {
|
||||
($struct_name:ident) => {
|
||||
$crate::impl_to_bytes!($struct_name);
|
||||
$crate::impl_instruction_from_bytes!($struct_name);
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user