MessageOut
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>,
}
- A
MessageOutreceipt is generated as a result of thesend_typed_message()Sway method in which a message is sent to a recipient address along with a certain amount of coins. - The
datafield supports data of an arbitrary typeTand will be decoded by the indexer upon receipt. - Read more about
MessageOutin the Fuel protocol ABI spec
You can handle functions that produce a MessageOut receipt type by adding a parameter with the type abi::MessageOut.
fn handle_message_out(message_out: abi::MessageOut) {
// handle the message out
}