Skip to content

Commit

Permalink
refactor(protocol): remove unused state vars from TaikoL2 (#17002)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored May 6, 2024
1 parent b4ce6c8 commit b83cb99
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions packages/protocol/contracts/L2/TaikoL2.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit b83cb99

Please sign in to comment.