Function: executeMessage(bytes memory message)
The function processes incoming cross-chain messages, updating the total supply and user positions accordingly.
Inputs
messageControl: Arbitrary.
Constraints: Must be a properly formatted message containing encoded
msgTime,supply, and optionaluserData.Impact: The parameter contains the data needed for updating the total supply and user positions.
Branches and code coverage
Intended branches
Decode
messageto accessmsgTime,supply, anduserData.Call
_setNewTotalSupplyto update the total supply atmsgTime.Call
_setNewUserPositionto update the user's position ifuserDatais not empty.
Negative behavior
Revert if
msgTimeis older thanlastTotalSupplyReceivedAt.