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/IGetters.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 {VerifierParams} from "../chain-interfaces/IVerifier.sol";
import {PubdataPricingMode} from "../chain-deps/ZKChainStorage.sol";
import {IZKChainBase} from "./IZKChainBase.sol";
import {DisabledProofSystems, L2DACommitmentScheme} from "../../common/Config.sol";
/// @title The interface of the Getters Contract that implements functions for getting contract state from outside the blockchain.
/// @author Matter Labs
/// @custom:security-contact [email protected]
/// @dev Most of the methods simply return the values that correspond to the current diamond proxy and possibly
/// not to the ZK Chain as a whole. For example, if the chain is migrated to another settlement layer, the values returned
/// by this facet will correspond to the values stored on this chain and possilbly not the canonical state of the chain.
interface IGetters is IZKChainBase {
/*//////////////////////////////////////////////////////////////
CUSTOM GETTERS
//////////////////////////////////////////////////////////////*/
/// @return The address of the verifier smart contract
function getVerifier() external view returns (address);
/// @return The address of the current admin
function getAdmin() external view returns (address);
/// @return The address of the pending admin
function getPendingAdmin() external view returns (address);
/// @return The address of the bridgehub
function getBridgehub() external view returns (address);
/// @return The address of the state transition
function getChainTypeManager() external view returns (address);
/// @return The chain ID
function getChainId() external view returns (uint256);
/// @return The address of the base token
function getBaseToken() external view returns (address);
/// @return The address of the base token
function getBaseTokenAssetId() external view returns (bytes32);
/// @return Whether the chain's base token exposes total supply in a trusted way.
function baseTokenSupportsTotalSupply() external view returns (bool);
/// @return The total number of batches that were committed
function getTotalBatchesCommitted() external view returns (uint256);
/// @return The total number of batches that were committed & verified
function getTotalBatchesVerified() external view returns (uint256);
/// @return The total number of batches that were committed & verified & executed
function getTotalBatchesExecuted() external view returns (uint256);
// @return Address of transaction filterer
function getTransactionFilterer() external view returns (address);
/// @return The total number of priority operations that were added to the priority queue, including all processed ones
function getTotalPriorityTxs() external view returns (uint256);
/// @return The start index of the priority tree, i.e. the index of the first priority operation that
/// was included into the priority tree.
function getPriorityTreeStartIndex() external view returns (uint256);
/// @return The root hash of the priority tree
function getPriorityTreeRoot() external view returns (bytes32);
/// @return Whether the priority queue is active, i.e. whether new priority operations are appended to it.
/// Once the chain processes all the transactions that were present in the priority queue, all the L1->L2 related
/// operations will start to get done using the priority tree.
function isPriorityQueueActive() external view returns (bool);
/// @notice The function that returns the first unprocessed priority transaction.
/// @dev Returns zero if and only if no operations were processed from the queue.
/// @dev If all the transactions were processed, it will return the last processed index, so
/// in case exactly *unprocessed* transactions are needed, one should check that getPriorityQueueSize() is greater than 0.
/// @return Index of the oldest priority operation that wasn't processed yet
function getFirstUnprocessedPriorityTx() external view returns (uint256);
/// @return The number of priority operations currently in the queue
function getPriorityQueueSize() external view returns (uint256);
/// @return Whether the address has a validator access
function isValidator(address _address) external view returns (bool);
/// @return merkleRoot Merkle root of the tree with L2 logs for the selected batch
function l2LogsRootHash(uint256 _batchNumber) external view returns (bytes32 merkleRoot);
/// @notice For unfinalized (non executed) batches may change
/// @dev returns zero for non-committed batches
/// @return The hash of committed L2 batch.
function storedBatchHash(uint256 _batchNumber) external view returns (bytes32);
/// @return Bytecode hash of bootloader program.
function getL2BootloaderBytecodeHash() external view returns (bytes32);
/// @return Bytecode hash of default account (bytecode for EOA).
function getL2DefaultAccountBytecodeHash() external view returns (bytes32);
/// @return Bytecode hash of EVM emulator.
function getL2EvmEmulatorBytecodeHash() external view returns (bytes32);
/// @return Verifier parameters.
/// @dev This function is deprecated and will soon be removed.
function getVerifierParams() external view returns (VerifierParams memory);
/// @return Whether the diamond is frozen or not
function isDiamondStorageFrozen() external view returns (bool);
/// @return The current packed protocol version. To access human-readable version, use `getSemverProtocolVersion` function.
function getProtocolVersion() external view returns (uint256);
/// @return The tuple of (major, minor, patch) protocol version.
function getSemverProtocolVersion() external view returns (uint32, uint32, uint32);
/// @return The upgrade system contract transaction hash, 0 if the upgrade is not initialized
function getL2SystemContractsUpgradeTxHash() external view returns (bytes32);
/// @return The L2 batch number in which the upgrade transaction was processed.
/// @dev It is equal to 0 in the following two cases:
/// - No upgrade transaction has ever been processed.
/// - The upgrade transaction has been processed and the batch with such transaction has been
/// executed (i.e. finalized).
function getL2SystemContractsUpgradeBatchNumber() external view returns (uint256);
/// @return The chain-configured maximum transaction body gas for L1 -> L2 transactions.
/// @dev This is the limit protocol-authored transactions are validated against. Caller-supplied
/// transactions on an EraVM chain are additionally capped by `USER_PRIORITY_TX_MAX_GAS_LIMIT`,
/// so their effective ceiling, returned by `getUserPriorityTxMaxGasLimit`, may be below this value.
function getPriorityTxMaxGasLimit() external view returns (uint256);
/// @return The maximum transaction body gas for caller-supplied L1 -> L2 transactions: the lower of
/// `getPriorityTxMaxGasLimit` and `USER_PRIORITY_TX_MAX_GAS_LIMIT` on EraVM chains, the former on
/// ZKsync OS chains.
function getUserPriorityTxMaxGasLimit() external view returns (uint256);
/// @return The effective ZKsync OS single-transaction gas limit (EIP-7825), with the default
/// substituted when the value was never set explicitly.
function getZKsyncOSMaxTxGasLimit() external view returns (uint64);
/// @return The proof systems this Era chain does not require. Read by `EraMultiProofVerifier`.
function disabledProofSystems() external view returns (DisabledProofSystems memory);
/// @return Whether a withdrawal has been finalized.
/// @param _l2BatchNumber The L2 batch number within which the withdrawal happened.
/// @param _l2MessageIndex The index of the L2->L1 message denoting the withdrawal.
function isEthWithdrawalFinalized(uint256 _l2BatchNumber, uint256 _l2MessageIndex) external view returns (bool);
/// @return The pubdata pricing mode.
function getPubdataPricingMode() external view returns (PubdataPricingMode);
/// @return the baseTokenGasPriceMultiplierNominator, used to compare the baseTokenPrice to ether for L1->L2 transactions
function baseTokenGasPriceMultiplierNominator() external view returns (uint128);
/// @return the baseTokenGasPriceMultiplierDenominator, used to compare the baseTokenPrice to ether for L1->L2 transactions
function baseTokenGasPriceMultiplierDenominator() external view returns (uint128);
/*//////////////////////////////////////////////////////////////
DIAMOND LOUPE
//////////////////////////////////////////////////////////////*/
/// @notice Faсet structure compatible with the EIP-2535 diamond loupe
/// @param addr The address of the facet contract
/// @param selectors The NON-sorted array with selectors associated with facet
struct Facet {
address addr;
bytes4[] selectors;
}
/// @return result All facet addresses and their function selectors
function facets() external view returns (Facet[] memory);
/// @return NON-sorted array with function selectors supported by a specific facet
function facetFunctionSelectors(address _facet) external view returns (bytes4[] memory);
/// @return facets NON-sorted array of facet addresses supported on diamond
function facetAddresses() external view returns (address[] memory facets);
/// @return facet The facet address associated with a selector. Zero if the selector is not added to the diamond
function facetAddress(bytes4 _selector) external view returns (address facet);
/// @return Whether the selector can be frozen by the admin or always accessible
function isFunctionFreezable(bytes4 _selector) external view returns (bool);
/// @return isFreezable Whether the facet can be frozen by the admin or always accessible
function isFacetFreezable(address _facet) external view returns (bool isFreezable);
/// @return The address of the current settlement layer.
function getSettlementLayer() external view returns (address);
/// @return DA configuration.
function getDAValidatorPair() external view returns (address, L2DACommitmentScheme);
/// @return Whether the chain uses ZKsyncOS.
function getZKsyncOS() external view returns (bool);
}
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.