MessageTransmitter

Learn about the different MessageTransmitter endpoints and the parameters associated with each.

Cross-Chain Transfer Protocol (CCTP) is a permissionless on-chain utility that can burn native USDC on a source chain and mint native USDC of the same amount on a destination chain. This is made possible by two primary CCTP contracts found on each chain, MessageTransmitter and TokenMessenger.

receiveMessage

Messages with a given nonce can only be broadcast successfully once for a pair of domains. The message body of a valid message is passed to the specified recipient for further processing.

Parameters

FieldTypeDescription
messagebytes calldataMessage bytes.
attestationbytes calldatasigned attestation of message.

sendMessage

Sends a message to the destination domain and recipient. Emits a MessageSent event which will be attested by Circle’s attestation service.

Parameters

FieldTypeDescription
destinationDomainuint32Destination domain identifier.
recipientbytes32Address to handle message body on destination domain.
messageBodybytes calldataApplication-specific message to be handled by recipient.

sendMessageWithCaller

Same as sendMessage, but with an additional parameter, destinationCaller. This parameter specifies which address has permission to call receiveMessage on the destination domain for this message.

Parameters

FieldTypeDescription
destinationDomainuint32Destination domain identifier.
recipientbytes32Address of message recipient on destination domain as bytes32.
destinationCallerbytes32Caller on the destination domain, as bytes32.
messageBodybytes calldataApplication-specific message to be handled by recipient.

replaceMessage

Replace a message with a new message body and/or destination caller. The originalAttestation must be a valid attestation of originalMessage, produced by Circle’s attestation service.

Parameters

FieldTypeDescription
originalMessagebytes calldataOriginal message to replace.
originalAttestationbytes calldataAttestation of originalMessage.
newMessageBodybytes calldataNew message body of replaced message.
newDestinationCallerbytes32The new destination caller, which may be the same as the original destination caller, a new destination caller, or an empty destination caller (bytes32(0), indicating that any destination caller is valid.)

What’s Next