macro_rules! output {
($output: ident, $buffer: expr, $host_fn:path, $($arg:expr),*) => { ... };
}
Expand description
Utility macro to invoke a host function that expect a output: &mut &mut [u8]
as last argument.
Example:
ⓘ
use pallet_revive_uapi::{output, HostFn, HostFnImpl as api};
// call `api::caller` and store the output in `caller`
output!(caller, [0u8; 32], api::caller,);
// call `api::get_storage` and store the output in `address`
output!(address, [0u8; 32], api::get_storage, &[1u8; 32]);