From b83cb99e2871d7c6862dcedf6acb89530bda5d93 Mon Sep 17 00:00:00 2001 From: Daniel Wang <99078276+dantaik@users.noreply.github.com> Date: Mon, 6 May 2024 16:20:00 +0800 Subject: [PATCH] refactor(protocol): remove unused state vars from TaikoL2 (#17002) --- packages/protocol/contracts/L2/TaikoL2.sol | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/packages/protocol/contracts/L2/TaikoL2.sol b/packages/protocol/contracts/L2/TaikoL2.sol index e0d36a4f97..6ae9d7d456 100644 --- a/packages/protocol/contracts/L2/TaikoL2.sol +++ b/packages/protocol/contracts/L2/TaikoL2.sol @@ -40,11 +40,8 @@ contract TaikoL2 is EssentialContract { /// @notice The last synced L1 block height. uint64 public lastSyncedBlock; - /// @notice The parent block's timestamp. - uint64 public parentTimestamp; - - /// @notice The current block's timestamp. - uint64 private __currentBlockTimestamp; + uint64 private __deprecated1; // was parentTimestamp + uint64 private __deprecated2; // was __currentBlockTimestamp /// @notice The L1's chain ID. uint64 public l1ChainId; @@ -100,7 +97,6 @@ contract TaikoL2 is EssentialContract { l1ChainId = _l1ChainId; gasExcess = _gasExcess; (publicInputHash,) = _calcPublicInputHash(block.number); - __currentBlockTimestamp = uint64(block.timestamp); } /// @notice Anchors the latest L1 block details to L2 for cross-layer @@ -163,9 +159,6 @@ contract TaikoL2 is EssentialContract { bytes32 _parentHash = blockhash(parentId); l2Hashes[parentId] = _parentHash; publicInputHash = publicInputHashNew; - - parentTimestamp = __currentBlockTimestamp; - __currentBlockTimestamp = uint64(block.timestamp); gasExcess = _gasExcess; emit Anchored(_parentHash, _gasExcess);