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 5470f33 commit 7feb5c3
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tron/ORMP.f.sol
Original file line number Diff line number Diff line change
Expand Up @@ -471,6 +471,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 @@ -537,10 +538,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 7feb5c3

Please sign in to comment.