Skip to content

Commit d5d576f

Browse files
authored
Merge pull request #119 from OffchainLabs/zero-basefee
Support zero basefee for gas estimation
2 parents 6822d51 + e253b8b commit d5d576f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/bridge/SequencerInbox.sol

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -462,12 +462,11 @@ contract SequencerInbox is DelegateCallAware, GasRefundEnabled, ISequencerInbox
462462
if (hostChainIsArbitrum) revert DataBlobsNotSupported();
463463

464464
// submit a batch spending report to refund the entity that produced the blob batch data
465-
submitBatchSpendingReport(
466-
dataHash,
467-
seqMessageIndex,
468-
block.basefee,
469-
blobCost / block.basefee
470-
);
465+
uint256 blobGas = 0;
466+
if (block.basefee > 0) {
467+
blobGas = blobCost / block.basefee;
468+
}
469+
submitBatchSpendingReport(dataHash, seqMessageIndex, block.basefee, blobGas);
471470
}
472471

473472
function addSequencerL2Batch(

0 commit comments

Comments
 (0)