Skip to content

Commit 2f3d5a6

Browse files
committed
rename
1 parent 8c1adfe commit 2f3d5a6

File tree

7 files changed

+17
-20
lines changed

7 files changed

+17
-20
lines changed

Diff for: packages/protocol/contracts/layer1/based/ITaikoProposerEntryPoint.sol renamed to packages/protocol/contracts/layer1/based/IProposeBatch.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ pragma solidity ^0.8.24;
33

44
import "./ITaikoInbox.sol";
55

6-
/// @title ITaikoProposerEntryPoint
6+
/// @title IProposeBatch
77
/// @custom:security-contact [email protected]
8-
interface ITaikoProposerEntryPoint {
8+
interface IProposeBatch {
99
/// @notice Proposes a batch of blocks.
1010
/// @param _params ABI-encoded parameters.
1111
/// @param _txList The transaction list in calldata. If the txList is empty, blob will be used

Diff for: packages/protocol/contracts/layer1/forced-inclusion/TaikoWrapper.sol

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.24;
33

44
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
5-
import "src/layer1/based/ITaikoProposerEntryPoint.sol";
5+
import "src/layer1/based/IProposeBatch.sol";
66
import "./ForcedInclusionStore.sol";
77

88
/// @title TaikoWrapper
@@ -31,7 +31,7 @@ import "./ForcedInclusionStore.sol";
3131
/// consumption.
3232
///
3333
/// @custom:security-contact [email protected]
34-
contract TaikoWrapper is EssentialContract, ITaikoProposerEntryPoint {
34+
contract TaikoWrapper is EssentialContract, IProposeBatch {
3535
using LibMath for uint256;
3636

3737
/// @dev Event emitted when a forced inclusion is processed.
@@ -52,7 +52,7 @@ contract TaikoWrapper is EssentialContract, ITaikoProposerEntryPoint {
5252
__Essential_init(_owner);
5353
}
5454

55-
/// @inheritdoc ITaikoProposerEntryPoint
55+
/// @inheritdoc IProposeBatch
5656
function proposeBatch(
5757
bytes calldata _params,
5858
bytes calldata _txList

Diff for: packages/protocol/contracts/layer1/preconf/iface/IPreconfRouter.sol

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity ^0.8.24;
33

4-
import "src/layer1/based/ITaikoProposerEntryPoint.sol";
4+
import "src/layer1/based/IProposeBatch.sol";
55

66
/// @title IPreconfRouter
77
/// @custom:security-contact [email protected]
8-
interface IPreconfRouter is ITaikoProposerEntryPoint {
8+
interface IPreconfRouter is IProposeBatch {
99
error ForcedInclusionNotSupported();
1010
error NotTheOperator();
1111
error ProposerIsNotTheSender();

Diff for: packages/protocol/contracts/layer1/preconf/impl/PreconfRouter.sol

+5-5
Original file line numberDiff line numberDiff line change
@@ -9,27 +9,27 @@ import "../iface/IPreconfWhitelist.sol";
99
/// @title PreconfRouter
1010
/// @custom:security-contact [email protected]
1111
contract PreconfRouter is EssentialContract, IPreconfRouter {
12-
address public immutable proposerEntryPoint;
12+
address public immutable inbox;
1313
address public immutable preconfWhitelist;
1414

1515
uint256[50] private __gap;
1616

1717
constructor(
1818
address _resolver,
19-
address _proposerEntryPoint,
19+
address _inbox,
2020
address _preconfWhitelist
2121
)
2222
EssentialContract(_resolver)
2323
{
24-
proposerEntryPoint = _proposerEntryPoint;
24+
inbox = _inbox;
2525
preconfWhitelist = _preconfWhitelist;
2626
}
2727

2828
function init(address _owner) external initializer {
2929
__Essential_init(_owner);
3030
}
3131

32-
/// @inheritdoc ITaikoProposerEntryPoint
32+
/// @inheritdoc IProposeBatch
3333
function proposeBatch(
3434
bytes calldata _params,
3535
bytes calldata _txList
@@ -42,7 +42,7 @@ contract PreconfRouter is EssentialContract, IPreconfRouter {
4242
require(msg.sender == selectedOperator, NotTheOperator());
4343

4444
// Both TaikoInbox and TaikoWrapper implement the same ABI for proposeBatch.
45-
(info_, meta_) = ITaikoProposerEntryPoint(proposerEntryPoint).proposeBatch(_params, _txList);
45+
(info_, meta_) = IProposeBatch(inbox).proposeBatch(_params, _txList);
4646

4747
// Verify that the sender had set itself as the proposer
4848
require(meta_.proposer == msg.sender, ProposerIsNotTheSender());

Diff for: packages/protocol/contracts/layer1/provers/ProverSet.sol

+4-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
pragma solidity ^0.8.24;
33

44
import "./ProverSetBase.sol";
5-
import "../based/ITaikoProposerEntryPoint.sol";
5+
import "../based/IProposeBatch.sol";
66

7-
contract ProverSet is ProverSetBase, ITaikoProposerEntryPoint {
7+
contract ProverSet is ProverSetBase, IProposeBatch {
88
using Address for address;
99

1010
error ForcedInclusionParamsNotAllowed();
@@ -22,7 +22,8 @@ contract ProverSet is ProverSetBase, ITaikoProposerEntryPoint {
2222
onlyProver
2323
returns (ITaikoInbox.BatchInfo memory, ITaikoInbox.BatchMetadata memory)
2424
{
25-
return ITaikoProposerEntryPoint(proposerEntryPoint()).proposeBatch(_params, _txList);
25+
address entrypoint = resolve(LibStrings.B_PROPOSE_BLOCK_ENTRYPOINT, false);
26+
return IProposeBatch(entrypoint).proposeBatch(_params, _txList);
2627
}
2728

2829
/// @notice Proves multiple Taiko batches.

Diff for: packages/protocol/contracts/layer1/provers/ProverSetBase.sol

-4
Original file line numberDiff line numberDiff line change
@@ -125,10 +125,6 @@ abstract contract ProverSetBase is EssentialContract, IERC1271 {
125125
return resolve(LibStrings.B_TAIKO, false);
126126
}
127127

128-
function proposerEntryPoint() internal view virtual returns (address) {
129-
return resolve(LibStrings.B_PROPOSER_ENTRY_POINT, false);
130-
}
131-
132128
function bondToken() internal view virtual returns (address) {
133129
return resolve(LibStrings.B_BOND_TOKEN, true);
134130
}

Diff for: packages/protocol/contracts/shared/libs/LibStrings.sol

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ library LibStrings {
2121
bytes32 internal constant B_PRECONF_WHITELIST = bytes32("preconf_whitelist");
2222
bytes32 internal constant B_PRECONF_WHITELIST_OWNER = bytes32("preconf_whitelist_owner");
2323
bytes32 internal constant B_PROOF_VERIFIER = bytes32("proof_verifier");
24-
bytes32 internal constant B_PROPOSER_ENTRY_POINT = bytes32("proposer_entry_point");
24+
bytes32 internal constant B_PROPOSE_BLOCK_ENTRYPOINT = bytes32("propose_block_entrypoint");
2525
bytes32 internal constant B_PROVER_SET = bytes32("prover_set");
2626
bytes32 internal constant B_QUOTA_MANAGER = bytes32("quota_manager");
2727
bytes32 internal constant B_SGX_WATCHDOG = bytes32("sgx_watchdog");

0 commit comments

Comments
 (0)