pub fn send_typed_message<T>(recipient: b256, msg_data: T, coins: u64) 
Expand description

Sends a message msg_data of type T to recipient with a coins amount of the base asset.

Additional Information

Use send_typed_message instead of send_message if the message needs to be indexed.

Arguments

  • recipient: [b256] - The address of the message recipient.
  • msg_data: [T] - Message data of arbitrary type T.
  • coins: [u64] - Amount of base asset to send.

Examples

use std::message::send_typed_message;

fn foo() {
    let recipient = 0xee45573606c96c98ba970ff7cf9511f1b8b25e6bcd52ced30b89df1e4a9c4323;
    send_message(recipient, "Fuel is blazingly fast", 50);
}