new macros

This commit is contained in:
Hardhat Chad
2024-08-25 01:36:32 +00:00
parent 9239847675
commit 18b87be8ea
8 changed files with 37 additions and 32 deletions

View File

@@ -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);
};
}