Function: sendMessageWithFee(OrderlyCrossChainMessage.MessageV1 data, byte[] payload)
This allows a caller (privileged role) to send a cross-chain message over the LZ endpoint.
Inputs
dataControl: Fully controlled by the caller.
Constraints: None.
Impact: The cross-chain message that will be sent.
payloadControl: Fully controlled by the caller.
Constraints: None.
Impact: The cross-chain message that will be sent.
Branches and code coverage
Intended branches
Assure that
msg.valueis enough to cover for the native fee. Currently there is nothing to check it against (e.g., against some estimation).In case that user sends more than the native fee, the excess should be refunded. Currently not implemented, as the
_refundAddressis set toaddress(this).Estimate the native fee using
lzEndpoint.estimateFees.Call
_lzSendwith the estimated native fee.
Negative behavior
Should not be callable by anyone other than a trusted caller.