Skip to content

Commit

Permalink
Fix audittens I02 (#37)
Browse files Browse the repository at this point in the history
  • Loading branch information
StanislavBreadless authored Nov 29, 2024
1 parent fcca8de commit f54121e
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 13 deletions.
11 changes: 0 additions & 11 deletions l1-contracts/contracts/state-transition/ChainTypeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -432,17 +432,6 @@ contract ChainTypeManager is IChainTypeManager, ReentrancyGuard, Ownable2StepUpg
return IZKChain(getZKChain(_chainId)).getProtocolVersion();
}

/// @param _newSettlementLayerChainId the chainId of the chain
/// @param _isWhitelisted whether the chain is whitelisted
function registerSettlementLayer(uint256 _newSettlementLayerChainId, bool _isWhitelisted) external onlyOwner {
require(_newSettlementLayerChainId != 0, "Bad chain id");

// Currently, we require that the sync layer is deployed by the same CTM.
require(getZKChain(_newSettlementLayerChainId) != address(0), "CTM: sync layer not registered");

IBridgehub(BRIDGE_HUB).registerSettlementLayer(_newSettlementLayerChainId, _isWhitelisted);
}

/// @notice Called by the bridgehub during the migration of a chain to another settlement layer.
/// @param _chainId The chain id of the chain to be migrated.
/// @param _data The data needed to perform the migration.
Expand Down
2 changes: 0 additions & 2 deletions l1-contracts/contracts/state-transition/IChainTypeManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -153,8 +153,6 @@ interface IChainTypeManager {

function getSemverProtocolVersion() external view returns (uint32, uint32, uint32);

function registerSettlementLayer(uint256 _newSettlementLayerChainId, bool _isWhitelisted) external;

event BridgeInitialize(address indexed l1Token, string name, string symbol, uint8 decimals);

function forwardedBridgeBurn(
Expand Down

0 comments on commit f54121e

Please sign in to comment.