Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
aroralanuk committed Nov 7, 2024
1 parent 99647fe commit 6876905
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
13 changes: 10 additions & 3 deletions solidity/contracts/hooks/OPL2ToL1Hook.sol
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,12 @@ contract OPL2ToL1Hook is AbstractMessageIdAuthHook {
bytes calldata metadata,
bytes calldata message
) internal view override returns (uint256) {
bytes memory metadataWithGasLimit = metadata.overrideGasLimit(
MIN_GAS_LIMIT
);
return
metadata.msgValue(0) + childHook.quoteDispatch(metadata, message);
metadata.msgValue(0) +
childHook.quoteDispatch(metadataWithGasLimit, message);
}

// ============ Internal functions ============
Expand All @@ -83,9 +87,12 @@ contract OPL2ToL1Hook is AbstractMessageIdAuthHook {
(message.id(), metadata.msgValue(0))
);

bytes memory metadataWithGasLimit = metadata.overrideGasLimit(
MIN_GAS_LIMIT
);
childHook.postDispatch{
value: childHook.quoteDispatch(metadata, message)
}(metadata, message);
value: childHook.quoteDispatch(metadataWithGasLimit, message)
}(metadataWithGasLimit, message);
l2Messenger.sendMessage{value: metadata.msgValue(0)}(
TypeCasts.bytes32ToAddress(ism),
payload,
Expand Down
2 changes: 1 addition & 1 deletion solidity/contracts/token/HypValue.sol
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// SPDX-License-Identifier: Apache-2.0
// SPDX-License-Identifier: MIT AND Apache-2.0
pragma solidity >=0.8.0;

/*@@@@@@@ @@@@@@@@@
Expand Down

0 comments on commit 6876905

Please sign in to comment.