Verified contractPartialMIT
EraChainTypeManager
Address0xe642b64ac222503573ffbebfbd7bb7f072c99ef7
- Balance
0 ETH
- Transactions
0
- Compiler
solc 0.8.28
- Same code
Only this contract
Details
- Compiler
- solc 0.8.28+commit.7893614a
- Language
- solidity
- Optimization
- Yes, 9,999,999 runs
- EVM version
- prague
- License
- MIT
- Match
- Partialcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 26,378,190
- Creation transaction
- 0x087d522567…f55d378cbe
83 files
The source code is large: one file is shown at a time. Choose a file in the list.
- contracts/state-transition/EraChainTypeManager.solmain2.53 KB
- ../system-contracts/contracts/Constants.sol10.57 KB
- contracts/bridge/asset-router/IAssetRouterBase.sol1.39 KB
- contracts/bridge/asset-router/IL1AssetRouter.sol9 KB
- contracts/bridge/asset-router/IL2AssetRouter.sol1.59 KB
- contracts/bridge/asset-tracker/IGWAssetTracker.sol8.5 KB
- contracts/bridge/asset-tracker/IL1AssetTracker.sol3.34 KB
- contracts/bridge/asset-tracker/IL2AssetTracker.sol2.59 KB
- contracts/bridge/interfaces/IAssetHandler.sol2.27 KB
- contracts/bridge/interfaces/IL1AssetDeploymentTracker.sol375 B
- contracts/bridge/interfaces/IL1CrossChainSender.sol1.91 KB
- contracts/bridge/interfaces/IL1ERC20Bridge.sol2.75 KB
- contracts/bridge/interfaces/IL1Nullifier.sol6.78 KB
- contracts/bridge/interfaces/IL1SharedBridgeLegacy.sol291 B
- contracts/bridge/interfaces/IL2CrossChainSender.sol1.64 KB
- contracts/bridge/ntv/IL1NativeTokenVault.sol1.55 KB
- contracts/bridge/ntv/IL2NativeTokenVault.sol1.07 KB
- contracts/bridge/ntv/INativeTokenVaultBase.sol2.17 KB
- contracts/common/Config.sol18.45 KB
- contracts/common/L1ContractErrors.sol14.84 KB
- contracts/common/Messaging.sol21.68 KB
- contracts/common/ReentrancyGuard.sol4.06 KB
- contracts/common/interfaces/IL2ContractDeployer.sol2.65 KB
- contracts/common/interfaces/IMessageVerification.sol4.59 KB
- contracts/common/interfaces/ISystemContext.sol2.77 KB
- contracts/common/l2-helpers/IBaseToken.sol1.26 KB
- contracts/common/l2-helpers/IL2ToL1MessengerEra.sol3.01 KB
- contracts/common/l2-helpers/L2ContractAddresses.sol8.1 KB
- contracts/common/l2-helpers/L2ContractHelper.sol11.32 KB
- contracts/common/l2-helpers/L2ContractInterfaces.sol4.62 KB
- contracts/common/libraries/DynamicIncrementalMerkle.sol7.04 KB
- contracts/common/libraries/Merkle.sol5.88 KB
- contracts/common/libraries/SemVer.sol2.14 KB
- contracts/common/libraries/UncheckedMath.sol671 B
- contracts/core/bridgehub/IBridgehubBase.sol6.56 KB
- contracts/core/bridgehub/IL1Bridgehub.sol1.94 KB
- contracts/core/chain-asset-handler/IChainAssetHandler.sol3.67 KB
- contracts/core/ctm-deployment/ICTMDeploymentTracker.sol729 B
- contracts/core/message-root/IMessageRoot.sol4.47 KB
- contracts/interop/IInteropCenter.sol8.29 KB
- contracts/interop/IInteropHandler.sol2.56 KB
- contracts/interop/IL2InteropRootStorage.sol595 B
- contracts/l2-system/interfaces/IBaseTokenHolder.sol3.41 KB
- contracts/state-transition/ChainTypeManagerBase.sol36.99 KB
- contracts/state-transition/IChainTypeManager.sol9.02 KB
- contracts/state-transition/L1StateTransitionErrors.sol3.9 KB
- contracts/state-transition/chain-deps/DiamondProxy.sol2.86 KB
- contracts/state-transition/chain-deps/StoredBatchHashing.sol2.31 KB
- contracts/state-transition/chain-deps/ZKChainStorage.sol15.03 KB
- contracts/state-transition/chain-deps/facets/ZKChainBase.sol15.54 KB
- contracts/state-transition/chain-interfaces/IAdmin.sol10.81 KB
- contracts/state-transition/chain-interfaces/IChainUpgrader.sol1.09 KB
- contracts/state-transition/chain-interfaces/ICommitter.sol8.36 KB
- contracts/state-transition/chain-interfaces/IDiamondInit.sol1.83 KB
- contracts/state-transition/chain-interfaces/IExecutor.sol10.6 KB
- contracts/state-transition/chain-interfaces/IGetters.sol10.68 KB
- contracts/state-transition/chain-interfaces/IMailbox.sol790 B
- contracts/state-transition/chain-interfaces/IMailboxImpl.sol8.95 KB
- contracts/state-transition/chain-interfaces/IMailboxLegacy.sol3.61 KB
- contracts/state-transition/chain-interfaces/IMigrator.sol2.44 KB
- contracts/state-transition/chain-interfaces/IVerifier.sol1.18 KB
- contracts/state-transition/chain-interfaces/IZKChain.sol811 B
- contracts/state-transition/chain-interfaces/IZKChainBase.sol507 B
- contracts/state-transition/libraries/Diamond.sol15.39 KB
- contracts/state-transition/libraries/PriorityQueue.sol3.85 KB
- contracts/state-transition/libraries/PriorityTree.sol7.72 KB
- contracts/state-transition/libraries/ProposedUpgradeLib.sol3.64 KB
- contracts/state-transition/libraries/TransactionValidator.sol11.59 KB
- contracts/upgrades/BaseZkSyncUpgrade.sol17.39 KB
- contracts/upgrades/IDefaultUpgrade.sol320 B
- contracts/upgrades/ZkSyncUpgradeErrors.sol1.25 KB
- lib/openzeppelin-contracts-upgradeable-v4/contracts/access/Ownable2StepUpgradeable.sol2.54 KB
- lib/openzeppelin-contracts-upgradeable-v4/contracts/access/OwnableUpgradeable.sol3.17 KB
- lib/openzeppelin-contracts-upgradeable-v4/contracts/proxy/utils/Initializable.sol6.64 KB
- lib/openzeppelin-contracts-upgradeable-v4/contracts/utils/AddressUpgradeable.sol9.38 KB
- lib/openzeppelin-contracts-upgradeable-v4/contracts/utils/ContextUpgradeable.sol1.48 KB
- lib/openzeppelin-contracts-v4/contracts/token/ERC20/IERC20.sol2.74 KB
- lib/openzeppelin-contracts-v4/contracts/utils/Arrays.sol3.97 KB
- lib/openzeppelin-contracts-v4/contracts/utils/StorageSlot.sol4.11 KB
- lib/openzeppelin-contracts-v4/contracts/utils/math/Math.sol12.79 KB
- lib/openzeppelin-contracts-v4/contracts/utils/math/SafeCast.sol35.08 KB
- lib/openzeppelin-contracts-v4/contracts/utils/structs/EnumerableMap.sol21.33 KB
- lib/openzeppelin-contracts-v4/contracts/utils/structs/EnumerableSet.sol12.96 KB
contracts/state-transition/chain-interfaces/IAdmin.sol
// SPDX-License-Identifier: MIT
// We use a floating point pragma here so it can be used within other projects that interact with the ZKsync ecosystem without using our exact pragma version.
pragma solidity ^0.8.21;
import {IZKChainBase} from "../chain-interfaces/IZKChainBase.sol";
import {IChainUpgrader} from "../chain-interfaces/IChainUpgrader.sol";
import {Diamond} from "../libraries/Diamond.sol";
import {FeeParams, PubdataPricingMode} from "../chain-deps/ZKChainStorage.sol";
import {L2DACommitmentScheme, ProofSystem} from "../../common/Config.sol";
/// @title The interface of the Admin Contract that controls access rights for contract management.
/// @author Matter Labs
/// @custom:security-contact [email protected]
interface IAdmin is IZKChainBase, IChainUpgrader {
/// @notice Starts the transfer of admin rights. Only the current admin can propose a new pending one.
/// @notice New admin can accept admin rights by calling `acceptAdmin` function.
/// @param _newPendingAdmin Address of the new admin
function setPendingAdmin(address _newPendingAdmin) external;
/// @notice Accepts transfer of admin rights. Only pending admin can accept the role.
function acceptAdmin() external;
/// @notice Change validator status (active or not active)
/// @param _validator Validator address
/// @param _active Active flag
function setValidator(address _validator, bool _active) external;
/// @notice Change zk porter availability
/// @param _zkPorterIsAvailable The availability of zk porter shard
function setPorterAvailability(bool _zkPorterIsAvailable) external;
/// @notice Change the max L2 gas limit for L1 -> L2 transactions
/// @param _newPriorityTxMaxGasLimit The maximum number of L2 gas that a user can request for L1 -> L2 transactions
function setPriorityTxMaxGasLimit(uint256 _newPriorityTxMaxGasLimit) external;
/// @notice Change the ZKsync OS single-transaction gas limit (EIP-7825).
/// @dev Only for ZKsync OS chains, callable on the active settlement layer instance. The limit is
/// part of the runtime chain config committed into each batch proof public input, so it can only
/// change when all committed batches are verified.
/// @param _newMaxTxGasLimit The new single-transaction gas limit; must not be below
/// `ZKSYNC_OS_DEFAULT_MAX_TX_GAS_LIMIT`
function setZKsyncOSMaxTxGasLimit(uint64 _newMaxTxGasLimit) external;
/// @notice Enables or disables one of the proof systems an Era chain requires. At least one of the systems the
/// installed verifier supports must stay enabled.
/// @dev Disabling only skips that system's proof. Both commitments are still built and stored, so the fields only
/// that system proves (its bootloader heap hash and events queue hash) stay unverified for the affected batches.
/// @param _proofSystem The proof system to configure.
/// @param _enabled Whether the selected proof system is required.
function setProofSystemStatus(ProofSystem _proofSystem, bool _enabled) external;
/// @notice Change the fee params for L1->L2 transactions
/// @param _newFeeParams The new fee params
function changeFeeParams(FeeParams calldata _newFeeParams) external;
/// @notice Change the token multiplier for L1->L2 transactions
function setTokenMultiplier(uint128 _nominator, uint128 _denominator) external;
/// @notice Change the pubdata pricing mode before the first batch is processed
/// @param _pricingMode The new pubdata pricing mode
function setPubdataPricingMode(PubdataPricingMode _pricingMode) external;
/// @notice Set the transaction filterer
function setTransactionFilterer(address _transactionFilterer) external;
/// @notice Sets the transaction filterer used in Priority Mode.
/// By default, there is no transaction filtering in Priority Mode. This is the recommended setup.
/// However, for some chains (e.g., Prividium or Gateway), a custom filterer may be required
/// for correct system operation. This function allows ZK Governance to set it.
function setPriorityModeTransactionFilterer(address _priorityModeTransactionFilterer) external;
/// @notice Allow EVM emulation on chain
function allowEvmEmulation() external returns (bytes32 canonicalTxHash);
/// @notice Sets the pre-V31 total supply on ZKOS chains.
/// @dev Sends a service transaction to L2BaseTokenZKOS to set the value.
/// @param _totalSupply The total supply that existed before the V31 upgrade.
function setZKsyncOSPreV31TotalSupply(uint256 _totalSupply) external returns (bytes32 canonicalTxHash);
/// @notice Allow Priority Mode to be activated on the chain (does not activate it).
function permanentlyAllowPriorityMode() external;
/// @notice Deactivate Priority Mode and return the chain to normal mode.
function deactivatePriorityMode() external;
/// @notice Activates the Priority Mode if the whitelisted operator fails
/// to process priority transactions within the allotted time.
/// @dev Priority Mode is an escape hatch mechanism in which anyone can settle batches (only with L1 -> L2 transactions).
/// @dev Priority Mode can be activated if:
/// 1. The Chain Admin has explicitly enabled the Priority Mode feature.
/// 2. A priority transaction has been outstanding for at least `PRIORITY_EXPIRATION` since it was requested.
function activatePriorityMode() external;
/// @inheritdoc IChainUpgrader
function upgradeChainFromVersion(
address _chainAddress,
uint256 _protocolVersion,
Diamond.DiamondCutData calldata _cutData
) external override;
/// @notice Executes a proposed governor upgrade
/// @dev Only the ChainTypeManager contract can execute the upgrade
/// @param _diamondCut The diamond cut parameters to be executed
function executeUpgrade(Diamond.DiamondCutData calldata _diamondCut) external;
/// @notice Instantly pause the functionality of all freezable facets & their selectors
/// @dev Only the governance mechanism may freeze Diamond Proxy
function freezeDiamond() external;
/// @notice Unpause the functionality of all freezable facets & their selectors
/// @dev Only the CTM can unfreeze Diamond Proxy
function unfreezeDiamond() external;
function genesisUpgrade(
address _l1GenesisUpgrade,
address _ctmDeployer,
bytes calldata _forceDeploymentData,
bytes[] calldata _factoryDeps
) external;
/// @notice Returns address of the RollupDAManager of the ZK Chain.
function getRollupDAManager() external view returns (address);
/// @notice Set the L1 DA validator address as well as the L2 DA commitment scheme.
/// @dev While in principle it is possible that updating only one of the values is needed,
/// usually these should work in pair and L1 validator typically expects a specific input from the L2 Validator.
/// That's why we change those together to prevent admins of chains from shooting themselves in the foot.
/// @param _l1DAValidator The address of the L1 DA validator
/// @param _l2DACommitmentScheme The scheme of the L2 DA commitment
function setDAValidatorPair(address _l1DAValidator, L2DACommitmentScheme _l2DACommitmentScheme) external;
/// @notice Makes the chain as permanent rollup.
/// @dev This is a security feature needed for chains that should be
/// trusted to keep their data available even if the chain admin becomes malicious
/// and tries to set the DA validator pair to something which does not publish DA to Ethereum.
/// @dev DANGEROUS: once activated, there is no way back!
function makePermanentRollup() external;
/// @notice Porter availability status changes
event IsPorterAvailableStatusUpdate(bool isPorterAvailable);
/// @notice Validator's status changed
event ValidatorStatusUpdate(address indexed validatorAddress, bool isActive);
/// @notice pendingAdmin is changed
/// @dev Also emitted when new admin is accepted and in this case, `newPendingAdmin` would be zero address
event NewPendingAdmin(address indexed oldPendingAdmin, address indexed newPendingAdmin);
/// @notice Admin changed
event NewAdmin(address indexed oldAdmin, address indexed newAdmin);
/// @notice Priority transaction max L2 gas limit changed
event NewPriorityTxMaxGasLimit(uint256 oldPriorityTxMaxGasLimit, uint256 newPriorityTxMaxGasLimit);
/// @notice ZKsync OS single-transaction gas limit (EIP-7825) changed
event NewZKsyncOSMaxTxGasLimit(uint64 oldMaxTxGasLimit, uint64 newMaxTxGasLimit);
/// @notice The set of proof systems this chain does not require has changed
event NewDisabledProofSystems(uint8 indexed oldDisabledProofSystems, uint8 indexed newDisabledProofSystems);
/// @notice Fee params for L1->L2 transactions changed
event NewFeeParams(FeeParams oldFeeParams, FeeParams newFeeParams);
/// @notice Validium mode status changed
event PubdataPricingModeUpdate(PubdataPricingMode validiumMode);
/// @notice The transaction filterer has been updated
event NewTransactionFilterer(address oldTransactionFilterer, address newTransactionFilterer);
/// @notice The address of the transaction filterer contract used when Priority Mode is activated
event NewPriorityModeTransactionFilterer(address oldTransactionFilterer, address newTransactionFilterer);
/// @notice BaseToken multiplier for L1->L2 transactions changed
event NewBaseTokenMultiplier(
uint128 oldNominator,
uint128 oldDenominator,
uint128 newNominator,
uint128 newDenominator
);
/// @notice Emitted when an upgrade is executed.
event ExecuteUpgrade(Diamond.DiamondCutData diamondCut);
/// @notice Emitted when the contract is frozen.
event Freeze();
/// @notice Emitted when the contract is unfrozen.
event Unfreeze();
/// @notice The EVM emulator has been enabled
event EnableEvmEmulator();
/// @notice Emitted when the ZKOS pre-V31 total supply is set via service transaction
event ZKsyncOSPreV31TotalSupplySet(uint256 totalSupply);
/// @notice New L2 DA commitment scheme set
event NewL2DACommitmentScheme(
L2DACommitmentScheme indexed oldL2DACommitmentScheme,
L2DACommitmentScheme indexed newL2DACommitmentScheme
);
event NewL1DAValidator(address indexed oldL1DAValidator, address indexed newL1DAValidator);
event BridgeMint(address indexed _account, uint256 _amount);
event PriorityModeAllowed();
event PriorityModeDeactivated();
/// @notice Emitted when Priority Mode is activated for the chain.
event PriorityModeActivated();
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 9999999,
"enabled": true
},
"evmVersion": "prague",
"remappings": [
"@ensdomains/=node_modules/@ensdomains/",
"ds-test/=lib/forge-std/lib/ds-test/src/",
"eth-gas-reporter/=node_modules/eth-gas-reporter/",
"forge-std/=lib/forge-std/src/",
"hardhat/=node_modules/hardhat/",
"murky/=lib/murky/src/",
"foundry-test/=test/foundry/",
"l2-contracts/=../l2-contracts/contracts/",
"system-contracts/=../system-contracts/",
"@openzeppelin/contracts-v4/=lib/openzeppelin-contracts-v4/contracts/",
"@openzeppelin/contracts-upgradeable-v4/=lib/openzeppelin-contracts-upgradeable-v4/contracts/",
"test-utils/=test/foundry/l1/integration/utils/",
"openzeppelin-contracts-upgradeable-v4/=lib/openzeppelin-contracts-upgradeable-v4/",
"openzeppelin-contracts-v4/=lib/openzeppelin-contracts-v4/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.