Skip to content

Commit

Permalink
feat: updated
Browse files Browse the repository at this point in the history
  • Loading branch information
ratankaliani committed Dec 17, 2024
1 parent 1bb93d0 commit 60743c7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions contracts/src/OPSuccinctL2OutputOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -375,13 +375,17 @@ contract OPSuccinctL2OutputOracle is Initializable, ISemver {
/// @param _l2BlockNumber The L2 block number that resulted in _outputRoot.
/// @param _l1BlockHash A block hash which must be included in the current chain.
/// @param _l1BlockNumber The block number with the specified block hash.
/// @dev This function is sourced from the original L2OutputOracle contract.
/// @dev This function is sourced from the original L2OutputOracle contract. The only modification is that the proposer address must be in the approvedProposers mapping, or permissionless proposing is enabled.
function proposeL2Output(bytes32 _outputRoot, uint256 _l2BlockNumber, bytes32 _l1BlockHash, uint256 _l1BlockNumber)
external
payable
whenOptimistic
{
require(msg.sender == proposer, "L2OutputOracle: only the proposer address can propose new outputs");
// The proposer must be explicitly approved, or the zero address must be approved (permissionless proposing).
require(
approvedProposers[msg.sender] || approvedProposers[address(0)],
"L2OutputOracle: only approved proposers can propose new outputs"
);

require(
_l2BlockNumber == nextBlockNumber(),
Expand Down

0 comments on commit 60743c7

Please sign in to comment.