File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/protocol/contracts/bridge Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ contract Bridge is EssentialContract, IBridge {
4343 /// @dev The gas overhead for both receiving and invoking a message, as well as the proof
4444 /// calldata cost.
4545 /// This value should be fine-tuned with production data.
46- uint32 public constant GAS_OVERHEAD = 60_000 ;
46+ uint32 public constant GAS_OVERHEAD = 120_000 ;
4747
4848 /// @dev The amount of gas not to charge fee per cache operation.
4949 uint256 private constant _GAS_REFUND_PER_CACHE_OPERATION = 20_000 ;
@@ -262,11 +262,9 @@ contract Bridge is EssentialContract, IBridge {
262262 if (msg .sender != _message.destOwner && _message.gasLimit != 0 ) {
263263 unchecked {
264264 uint256 refund = numCacheOps * _GAS_REFUND_PER_CACHE_OPERATION;
265- stats.gasUsedInFeeCalc = stats.start - gasleft ();
266-
267- uint256 gasCharged =
268- (GAS_OVERHEAD + stats.gasUsedInFeeCalc).max (refund) - refund;
265+ stats.gasUsedInFeeCalc = GAS_OVERHEAD + stats.start - gasleft ();
269266
267+ uint256 gasCharged = stats.gasUsedInFeeCalc.max (refund) - refund;
270268 uint256 maxFee = gasCharged * _message.fee / _message.gasLimit;
271269 uint256 baseFee = gasCharged * block .basefee ;
272270 uint256 fee =
You can’t perform that action at this time.
0 commit comments