Skip to content

Commit ef90208

Browse files
committed
commit: composeMsg explanation
Signed-off-by: shankar <shankar@layerzerolabs.org>
1 parent 1b1e341 commit ef90208

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

packages/ovault-evm/contracts/VaultComposerSync.sol

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,10 +141,11 @@ contract VaultComposerSync is IVaultComposerSync, ReentrancyGuard {
141141
bytes memory _composeMsg,
142142
uint256 _amount
143143
) external payable {
144-
// @dev Can only be called by self
144+
/// @dev Can only be called by self
145145
if (msg.sender != address(this)) revert OnlySelf(msg.sender);
146146

147-
// TODO comment why we do this
147+
/// @dev SendParam defines how the composer will handle the user's funds
148+
/// @dev The minMsgValue is the minimum amount of msg.value that must be sent, failing to do so will revert and the transaction will be retained in the endpoint for future retries
148149
(SendParam memory sendParam, uint256 minMsgValue) = abi.decode(_composeMsg, (SendParam, uint256));
149150
if (msg.value < minMsgValue) revert InsufficientMsgValue(minMsgValue, msg.value);
150151

0 commit comments

Comments
 (0)