Function: receiveMessage(OrderlyCrossChainMessage.MessageV1 message, byte[] payload)
This allows receiving a message from the relay.
Inputs
message
Control: Fully controlled by the relay.
Constraints: None.
Impact: The message to be received.
payload
Control: Fully controlled by the relay.
Constraints: None.
Impact: The payload to be received.
Branches and code coverage
Intended branches
Assumes that the message and payload have been validated before calling this function.
Assure that the destination chain ID matches the current chain ID.
If the message is a deposit, decode the payload and call deposit on the ledger.
If the message is a withdraw, decode the payload and call
withdrawFinish
on the ledger.If the message is not a deposit or withdraw, revert, as it is not supported.
Negative behavior
No one other than the
crossChainRelay
can call this function.