use fuel_types::ContractId;
pub struct Log {
pub contract_id: ContractId,
pub ra: u64,
pub rb: u64,
}
Log
receipt is generated when calling log()
on a non-reference types in a Sway contracts.
bool
, u8
, u16
, u32
, and u64
. ra
field includes the value being logged while rb
may include a non-zero value representing a unique ID for the log
instance. Log
in the Fuel protocol ABI spec You can handle functions that produce a Log
receipt type by adding a parameter with the type Log
.
fn handle_log(log: Log) {
// handle the emitted Log receipt
}
Was this page helpful?