Function: sendMessageWithFee(OrderlyCrossChainMessage.MessageV1 data, byte[] payload)
This allows a caller (privileged role) to send a cross-chain message over the LZ endpoint.
Inputs
data
Control: Fully controlled by the caller.
Constraints: None.
Impact: The cross-chain message that will be sent.
payload
Control: 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.value
is 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
_refundAddress
is set toaddress(this)
.Estimate the native fee using
lzEndpoint.estimateFees
.Call
_lzSend
with the estimated native fee.
Negative behavior
Should not be callable by anyone other than a trusted caller.