Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(protocol): add proposeBlocksV2 method to ProverSet #18115

Merged
merged 7 commits into from
Sep 18, 2024
Merged
2 changes: 1 addition & 1 deletion packages/protocol/contracts/layer1/based/ITaikoL1.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ interface ITaikoL1 {
external
returns (TaikoData.BlockMetadataV2 memory meta_);

/// @notice Proposes a Taiko L2 block (version 2)
/// @notice Proposes multiple Taiko L2 blocks (version 2)
/// @param _paramsArr A list of encoded BlockParamsV2 objects.
/// @param _txListArr A list of txList.
/// @return metaArr_ The metadata objects of the proposed L2 blocks.
Expand Down
13 changes: 13 additions & 0 deletions packages/protocol/contracts/layer1/provers/ProverSet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ contract ProverSet is EssentialContract, IERC1271 {
ITaikoL1(taikoL1()).proposeBlockV2(_params, _txList);
}

/// @notice Propose multiple Taiko blocks.
function proposeBlocksV2(
bytes[] calldata _paramsArr,
bytes[] calldata _txListArr
)
external
payable
onlyProver
nonReentrant
{
ITaikoL1(taikoL1()).proposeBlocksV2(_paramsArr, _txListArr);
}

/// @notice Proves or contests a Taiko block.
function proveBlock(uint64 _blockId, bytes calldata _input) external onlyProver nonReentrant {
ITaikoL1(taikoL1()).proveBlock(_blockId, _input);
Expand Down