Skip to content

Commit

Permalink
fix Immunefi Report #31869
Browse files Browse the repository at this point in the history
  • Loading branch information
hujw77 committed Jun 3, 2024
1 parent ed758a0 commit 5470f33
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ORMP.sol
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ contract ORMP is ReentrancyGuard, Channel {
emit MessageAssigned(msgHash, uc.oracle, uc.relayer, oracleFee, relayerFee, params);

// refund
require(msg.value >= relayerFee + oracleFee, "!fee");
if (msg.value > relayerFee + oracleFee) {
uint256 refundFee = msg.value - (relayerFee + oracleFee);
_sendValue(refund, refundFee);
Expand Down Expand Up @@ -158,10 +159,7 @@ contract ORMP is ReentrancyGuard, Channel {
require(gasAvailable - gasAvailable / 64 > message.gasLimit, "!gas");
// Deliver the message to user application contract address.
(dispatchResult,) = message.to.excessivelySafeCall(
message.gasLimit,
msg.value,
0,
abi.encodePacked(message.encoded, msgHash, message.fromChainId, message.from)
message.gasLimit, 0, 0, abi.encodePacked(message.encoded, msgHash, message.fromChainId, message.from)
);
}

Expand Down

0 comments on commit 5470f33

Please sign in to comment.