use fuel_types::ContractId;
pub struct Return {
pub contract_id: ContractId,
pub val: u64,
pub pc: u64,
pub is: u64,
}
Return
receipt is generated when returning a non-reference type in a Sway contract.
bool
, u8
, u16
, u32
, and u64
. val
field includes the value being returned. Log
in the Fuel protocol ABI spec You can handle functions that produce a Return
receipt type by adding a parameter with the type Return
.
fn handle_return(data: Return) {
// handle the emitted Return receipt
}