use fuel_types::{MessageId, Bytes32, Address};
pub struct MessageOut {
pub message_id: MessageId,
pub sender: Address,
pub recipient: Address,
pub amount: u64,
pub nonce: Bytes32,
pub len: u64,
pub digest: Bytes32,
pub data: Vec<u8>,
}
MessageOut
receipt is generated as a result of the send_typed_message()
Sway method in which a message is sent to a recipient address along with a certain amount of coins. data
field supports data of an arbitrary type T
and will be decoded by the indexer upon receipt. MessageOut
in the Fuel protocol ABI spec You can handle functions that produce a MessageOut
receipt type by adding a parameter with the type MessageOut
.
fn handle_message_out(message_out: MessageOut) {
// handle the emitted MessageOut receipt
}
Was this page helpful?