Contracts
Last updated
Last updated
Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.
Find verified contracts on our Verified Contracts Source Code page.
https://api.abscan.org/api
?module=contract
&action=getabi
&address=0x000000000000000000000000000000000000800B
&apikey=YourApiKeyToken
Try this endpoint in your browser
Query Parameters
address
the contract address
that has a verified source code
Sample Response
{
"status": "1",
"message": "OK",
"result": "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"}],\"name\":\"appendTransactionToCurrentL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"blockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coinbase\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentBlockInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockInfo\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPerPubdataByte\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchNumber\",\"type\":\"uint256\"}],\"name\":\"getBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBatchNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"batchNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"batchTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"getBlockHashEVM\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getL2BlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"blockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"blockTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"incrementTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"origin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publishTimestampDataToL1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newChainId\",\"type\":\"uint256\"}],\"name\":\"setChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPrice\",\"type\":\"uint256\"}],\"name\":\"setGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_l2BlockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_l2BlockTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"bytes32\",\"name\":\"_expectedPrevL2BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isFirstInBatch\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"_maxVirtualBlocksToCreate\",\"type\":\"uint128\"}],\"name\":\"setL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_prevBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint128\",\"name\":\"_newTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_expectedNewNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"setNewBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPerPubdataByte\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_basePubdataSpent\",\"type\":\"uint256\"}],\"name\":\"setPubdataInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOrigin\",\"type\":\"address\"}],\"name\":\"setTxOrigin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"txNumberInBlock\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_number\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"unsafeOverrideBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]"
}
Returns the Solidity source code of a verified smart contract.
Tip : You can also download a CSV list of verified contracts addresses of which the code publishers have provided a corresponding Open Source license for redistribution.
Try this endpoint in your browser
https://api.abscan.org/api
?module=contract
&action=getsourcecode
&address=0x000000000000000000000000000000000000800B
&apikey=YourApiKeyToken
Query Parameters
address
the contract address
that has a verified source code
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"SourceCode": "{{\"language\":\"Solidity\",\"sources\":{\"contracts-preprocessed/SystemContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {ISystemContext} from \\\"./interfaces/ISystemContext.sol\\\";\\nimport {ISystemContract} from \\\"./interfaces/ISystemContract.sol\\\";\\nimport {ISystemContextDeprecated} from \\\"./interfaces/ISystemContextDeprecated.sol\\\";\\nimport {SystemContractHelper} from \\\"./libraries/SystemContractHelper.sol\\\";\\nimport {BOOTLOADER_FORMAL_ADDRESS, SystemLogKey} from \\\"./Constants.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Contract that stores some of the context variables, that may be either\\n * block-scoped, tx-scoped or system-wide.\\n */\\ncontract SystemContext is ISystemContext, ISystemContextDeprecated, ISystemContract {\\n /// @notice The number of latest L2 blocks to store.\\n /// @dev EVM requires us to be able to query the hashes of previous 256 blocks.\\n /// We could either:\\n /// - Store the latest 256 hashes (and strictly rely that we do not accidentally override the hash of the block 256 blocks ago)\\n /// - Store the latest 257 blocks' hashes.\\n uint256 internal constant MINIBLOCK_HASHES_TO_STORE = 257;\\n\\n /// @notice The chainId of the network. It is set at the genesis.\\n uint256 public chainId;\\n\\n /// @notice The `tx.origin` in the current transaction.\\n /// @dev It is updated before each transaction by the bootloader\\n address public origin;\\n\\n /// @notice The `tx.gasPrice` in the current transaction.\\n /// @dev It is updated before each transaction by the bootloader\\n uint256 public gasPrice;\\n\\n /// @notice The current block's gasLimit.\\n /// @dev The same limit is used for both batches and L2 blocks. At this moment this limit is not explicitly\\n /// forced by the system, rather it is the responsibility of the operator to ensure that this value is never achieved.\\n uint256 public blockGasLimit = (1 \u003C\u003C 50);\\n\\n /// @notice The `block.coinbase` in the current transaction.\\n /// @dev For the support of coinbase, we will use the bootloader formal address for now\\n address public coinbase = BOOTLOADER_FORMAL_ADDRESS;\\n\\n /// @notice Formal `block.difficulty` parameter.\\n uint256 public difficulty = 2.5e15;\\n\\n /// @notice The `block.basefee`.\\n /// @dev It is currently a constant.\\n uint256 public baseFee;\\n\\n /// @notice The number and the timestamp of the current L1 batch stored packed.\\n BlockInfo internal currentBatchInfo;\\n\\n /// @notice The hashes of batches.\\n /// @dev It stores batch hashes for all previous batches.\\n mapping(uint256 batchNumber =\u003E bytes32 batchHash) internal batchHashes;\\n\\n /// @notice The number and the timestamp of the current L2 block.\\n BlockInfo internal currentL2BlockInfo;\\n\\n /// @notice The rolling hash of the transactions in the current L2 block.\\n bytes32 internal currentL2BlockTxsRollingHash;\\n\\n /// @notice The hashes of L2 blocks.\\n /// @dev It stores block hashes for previous L2 blocks. Note, in order to make publishing the hashes\\n /// of the miniblocks cheaper, we only store the previous MINIBLOCK_HASHES_TO_STORE ones. Since whenever we need to publish a state\\n /// diff, a pair of \u003Ckey, value\u003E is published and for cached keys only 8-byte id is used instead of 32 bytes.\\n /// By having this data in a cyclic array of MINIBLOCK_HASHES_TO_STORE blocks, we bring the costs down by 40% (i.e. 40 bytes per miniblock instead of 64 bytes).\\n /// @dev The hash of a miniblock with number N would be stored under slot N%MINIBLOCK_HASHES_TO_STORE.\\n /// @dev Hashes of the blocks older than the ones which are stored here can be calculated as _calculateLegacyL2BlockHash(blockNumber).\\n bytes32[MINIBLOCK_HASHES_TO_STORE] internal l2BlockHash;\\n\\n /// @notice To make migration to L2 blocks smoother, we introduce a temporary concept of virtual L2 blocks, the data\\n /// about which will be returned by the EVM-like methods: block.number/block.timestamp/blockhash.\\n /// - Their number will start from being equal to the number of the batch and it will increase until it reaches the L2 block number.\\n /// - Their timestamp is updated each time a new virtual block is created.\\n /// - Their hash is calculated as `keccak256(uint256(number))`\\n BlockInfo internal currentVirtualL2BlockInfo;\\n\\n /// @notice The information about the virtual blocks upgrade, which tracks when the migration to the L2 blocks has started and finished.\\n VirtualBlockUpgradeInfo internal virtualBlockUpgradeInfo;\\n\\n /// @notice Set the chainId origin.\\n /// @param _newChainId The chainId\\n function setChainId(uint256 _newChainId) external onlyCallFromForceDeployer {\\n chainId = _newChainId;\\n }\\n\\n /// @notice Number of current transaction in block.\\n uint16 public txNumberInBlock;\\n\\n /// @notice The current gas per pubdata byte\\n uint256 public gasPerPubdataByte;\\n\\n /// @notice The number of pubdata spent as of the start of the transaction\\n uint256 internal basePubdataSpent;\\n\\n /// @notice Set the current tx origin.\\n /// @param _newOrigin The new tx origin.\\n function setTxOrigin(address _newOrigin) external onlyCallFromBootloader {\\n origin = _newOrigin;\\n }\\n\\n /// @notice Set the the current gas price.\\n /// @param _gasPrice The new tx gasPrice.\\n function setGasPrice(uint256 _gasPrice) external onlyCallFromBootloader {\\n gasPrice = _gasPrice;\\n }\\n\\n /// @notice Sets the number of L2 gas that is needed to pay a single byte of pubdata.\\n /// @dev This value does not have any impact on the execution and purely serves as a way for users\\n /// to access the current gas price for the pubdata.\\n /// @param _gasPerPubdataByte The amount L2 gas that the operator charge the user for single byte of pubdata.\\n /// @param _basePubdataSpent The number of pubdata spent as of the start of the transaction.\\n function setPubdataInfo(uint256 _gasPerPubdataByte, uint256 _basePubdataSpent) external onlyCallFromBootloader {\\n basePubdataSpent = _basePubdataSpent;\\n gasPerPubdataByte = _gasPerPubdataByte;\\n }\\n\\n function getCurrentPubdataSpent() public view returns (uint256) {\\n uint256 pubdataPublished = SystemContractHelper.getZkSyncMeta().pubdataPublished;\\n return pubdataPublished \u003E basePubdataSpent ? pubdataPublished - basePubdataSpent : 0;\\n }\\n\\n function getCurrentPubdataCost() external view returns (uint256) {\\n return gasPerPubdataByte * getCurrentPubdataSpent();\\n }\\n\\n /// @notice The method that emulates `blockhash` opcode in EVM.\\n /// @dev Just like the blockhash in the EVM, it returns bytes32(0),\\n /// when queried about hashes that are older than 256 blocks ago.\\n /// @dev Since zksolc compiler calls this method to emulate `blockhash`,\\n /// its signature can not be changed to `getL2BlockHashEVM`.\\n /// @return hash The blockhash of the block with the given number.\\n function getBlockHashEVM(uint256 _block) external view returns (bytes32 hash) {\\n uint128 blockNumber = currentVirtualL2BlockInfo.number;\\n\\n VirtualBlockUpgradeInfo memory currentVirtualBlockUpgradeInfo = virtualBlockUpgradeInfo;\\n\\n // Due to virtual blocks upgrade, we'll have to use the following logic for retrieving the blockhash:\\n // 1. If the block number is out of the 256-block supported range, return 0.\\n // 2. If the block was created before the upgrade for the virtual blocks (i.e. there we used to use hashes of the batches),\\n // we return the hash of the batch.\\n // 3. If the block was created after the day when the virtual blocks have caught up with the L2 blocks, i.e.\\n // all the information which is returned for users should be for L2 blocks, we return the hash of the corresponding L2 block.\\n // 4. If the block queried is a virtual blocks, calculate it on the fly.\\n if (blockNumber \u003C= _block || blockNumber - _block \u003E 256) {\\n hash = bytes32(0);\\n } else if (_block \u003C currentVirtualBlockUpgradeInfo.virtualBlockStartBatch) {\\n // Note, that we will get into this branch only for a brief moment of time, right after the upgrade\\n // for virtual blocks before 256 virtual blocks are produced.\\n hash = batchHashes[_block];\\n } else if (\\n _block \u003E= currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block &&\\n currentVirtualBlockUpgradeInfo.virtualBlockFinishL2Block \u003E 0\\n ) {\\n hash = _getLatest257L2blockHash(_block);\\n } else {\\n // Important: we do not want this number to ever collide with the L2 block hash (either new or old one) and so\\n // that's why the legacy L2 blocks' hashes are keccak256(abi.encodePacked(uint32(_block))), while these are equivalent to\\n // keccak256(abi.encodePacked(_block))\\n hash = keccak256(abi.encode(_block));\\n }\\n }\\n\\n /// @notice Returns the hash of the given batch.\\n /// @param _batchNumber The number of the batch.\\n /// @return hash The hash of the batch.\\n function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash) {\\n hash = batchHashes[_batchNumber];\\n }\\n\\n /// @notice Returns the current batch's number and timestamp.\\n /// @return batchNumber and batchTimestamp tuple of the current batch's number and the current batch's timestamp\\n function getBatchNumberAndTimestamp() public view returns (uint128 batchNumber, uint128 batchTimestamp) {\\n BlockInfo memory batchInfo = currentBatchInfo;\\n batchNumber = batchInfo.number;\\n batchTimestamp = batchInfo.timestamp;\\n }\\n\\n /// @notice Returns the current block's number and timestamp.\\n /// @return blockNumber and blockTimestamp tuple of the current L2 block's number and the current block's timestamp\\n function getL2BlockNumberAndTimestamp() public view returns (uint128 blockNumber, uint128 blockTimestamp) {\\n BlockInfo memory blockInfo = currentL2BlockInfo;\\n blockNumber = blockInfo.number;\\n blockTimestamp = blockInfo.timestamp;\\n }\\n\\n /// @notice Returns the current L2 block's number.\\n /// @dev Since zksolc compiler calls this method to emulate `block.number`,\\n /// its signature can not be changed to `getL2BlockNumber`.\\n /// @return blockNumber The current L2 block's number.\\n function getBlockNumber() public view returns (uint128) {\\n return currentVirtualL2BlockInfo.number;\\n }\\n\\n /// @notice Returns the current L2 block's timestamp.\\n /// @dev Since zksolc compiler calls this method to emulate `block.timestamp`,\\n /// its signature can not be changed to `getL2BlockTimestamp`.\\n /// @return timestamp The current L2 block's timestamp.\\n function getBlockTimestamp() public view returns (uint128) {\\n return currentVirtualL2BlockInfo.timestamp;\\n }\\n\\n /// @notice Assuming that block is one of the last MINIBLOCK_HASHES_TO_STORE ones, returns its hash.\\n /// @param _block The number of the block.\\n /// @return hash The hash of the block.\\n function _getLatest257L2blockHash(uint256 _block) internal view returns (bytes32) {\\n return l2BlockHash[_block % MINIBLOCK_HASHES_TO_STORE];\\n }\\n\\n /// @notice Assuming that the block is one of the last MINIBLOCK_HASHES_TO_STORE ones, sets its hash.\\n /// @param _block The number of the block.\\n /// @param _hash The hash of the block.\\n function _setL2BlockHash(uint256 _block, bytes32 _hash) internal {\\n l2BlockHash[_block % MINIBLOCK_HASHES_TO_STORE] = _hash;\\n }\\n\\n /// @notice Calculates the hash of an L2 block.\\n /// @param _blockNumber The number of the L2 block.\\n /// @param _blockTimestamp The timestamp of the L2 block.\\n /// @param _prevL2BlockHash The hash of the previous L2 block.\\n /// @param _blockTxsRollingHash The rolling hash of the transactions in the L2 block.\\n function _calculateL2BlockHash(\\n uint128 _blockNumber,\\n uint128 _blockTimestamp,\\n bytes32 _prevL2BlockHash,\\n bytes32 _blockTxsRollingHash\\n ) internal pure returns (bytes32) {\\n return keccak256(abi.encode(_blockNumber, _blockTimestamp, _prevL2BlockHash, _blockTxsRollingHash));\\n }\\n\\n /// @notice Calculates the legacy block hash of L2 block, which were used before the upgrade where\\n /// the advanced block hashes were introduced.\\n /// @param _blockNumber The number of the L2 block.\\n function _calculateLegacyL2BlockHash(uint128 _blockNumber) internal pure returns (bytes32) {\\n return keccak256(abi.encodePacked(uint32(_blockNumber)));\\n }\\n\\n /// @notice Performs the upgrade where we transition to the L2 blocks.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _expectedPrevL2BlockHash The expected hash of the previous L2 block.\\n /// @param _isFirstInBatch Whether this method is called for the first time in the batch.\\n function _upgradeL2Blocks(uint128 _l2BlockNumber, bytes32 _expectedPrevL2BlockHash, bool _isFirstInBatch) internal {\\n require(_isFirstInBatch, \\\"Upgrade transaction must be first\\\");\\n\\n // This is how it will be commonly done in practice, but it will simplify some logic later\\n require(_l2BlockNumber \u003E 0, \\\"L2 block number is never expected to be zero\\\");\\n\\n unchecked {\\n bytes32 correctPrevBlockHash = _calculateLegacyL2BlockHash(_l2BlockNumber - 1);\\n require(correctPrevBlockHash == _expectedPrevL2BlockHash, \\\"The previous L2 block hash is incorrect\\\");\\n\\n // Whenever we'll be queried about the hashes of the blocks before the upgrade,\\n // we'll use batches' hashes, so we don't need to store 256 previous hashes.\\n // However, we do need to store the last previous hash in order to be able to correctly calculate the\\n // hash of the new L2 block.\\n _setL2BlockHash(_l2BlockNumber - 1, correctPrevBlockHash);\\n }\\n }\\n\\n /// @notice Creates new virtual blocks, while ensuring they don't exceed the L2 block number.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _maxVirtualBlocksToCreate The maximum number of virtual blocks to create with this L2 block.\\n /// @param _newTimestamp The timestamp of the new L2 block, which is also the timestamp of the new virtual block.\\n function _setVirtualBlock(\\n uint128 _l2BlockNumber,\\n uint128 _maxVirtualBlocksToCreate,\\n uint128 _newTimestamp\\n ) internal {\\n if (virtualBlockUpgradeInfo.virtualBlockFinishL2Block != 0) {\\n // No need to to do anything about virtual blocks anymore\\n // All the info is the same as for L2 blocks.\\n currentVirtualL2BlockInfo = currentL2BlockInfo;\\n return;\\n }\\n\\n BlockInfo memory virtualBlockInfo = currentVirtualL2BlockInfo;\\n\\n if (currentVirtualL2BlockInfo.number == 0 && virtualBlockInfo.timestamp == 0) {\\n uint128 currentBatchNumber = currentBatchInfo.number;\\n\\n // The virtual block is set for the first time. We can count it as 1 creation of a virtual block.\\n // Note, that when setting the virtual block number we use the batch number to make a smoother upgrade from batch number to\\n // the L2 block number.\\n virtualBlockInfo.number = currentBatchNumber;\\n // Remembering the batch number on which the upgrade to the virtual blocks has been done.\\n virtualBlockUpgradeInfo.virtualBlockStartBatch = currentBatchNumber;\\n\\n require(_maxVirtualBlocksToCreate \u003E 0, \\\"Can't initialize the first virtual block\\\");\\n _maxVirtualBlocksToCreate -= 1;\\n } else if (_maxVirtualBlocksToCreate == 0) {\\n // The virtual blocks have been already initialized, but the operator didn't ask to create\\n // any new virtual blocks. So we can just return.\\n return;\\n }\\n\\n virtualBlockInfo.number += _maxVirtualBlocksToCreate;\\n virtualBlockInfo.timestamp = _newTimestamp;\\n\\n // The virtual block number must never exceed the L2 block number.\\n // We do not use a `require` here, since the virtual blocks are a temporary solution to let the Solidity's `block.number`\\n // catch up with the L2 block number and so the situation where virtualBlockInfo.number starts getting larger\\n // than _l2BlockNumber is expected once virtual blocks have caught up the L2 blocks.\\n if (virtualBlockInfo.number \u003E= _l2BlockNumber) {\\n virtualBlockUpgradeInfo.virtualBlockFinishL2Block = _l2BlockNumber;\\n virtualBlockInfo.number = _l2BlockNumber;\\n }\\n\\n currentVirtualL2BlockInfo = virtualBlockInfo;\\n }\\n\\n /// @notice Sets the current block number and timestamp of the L2 block.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _l2BlockTimestamp The timestamp of the new L2 block.\\n /// @param _prevL2BlockHash The hash of the previous L2 block.\\n function _setNewL2BlockData(uint128 _l2BlockNumber, uint128 _l2BlockTimestamp, bytes32 _prevL2BlockHash) internal {\\n // In the unsafe version we do not check that the block data is correct\\n currentL2BlockInfo = BlockInfo({number: _l2BlockNumber, timestamp: _l2BlockTimestamp});\\n\\n // It is always assumed in production that _l2BlockNumber \u003E 0\\n _setL2BlockHash(_l2BlockNumber - 1, _prevL2BlockHash);\\n\\n // Resetting the rolling hash\\n currentL2BlockTxsRollingHash = bytes32(0);\\n }\\n\\n /// @notice Sets the current block number and timestamp of the L2 block.\\n /// @dev Called by the bootloader before each transaction. This is needed to ensure\\n /// that the data about the block is consistent with the sequencer.\\n /// @dev If the new block number is the same as the current one, we ensure that the block's data is\\n /// consistent with the one in the current block.\\n /// @dev If the new block number is greater than the current one by 1,\\n /// then we ensure that timestamp has increased.\\n /// @dev If the currently stored number is 0, we assume that it is the first upgrade transaction\\n /// and so we will fill up the old data.\\n /// @param _l2BlockNumber The number of the new L2 block.\\n /// @param _l2BlockTimestamp The timestamp of the new L2 block.\\n /// @param _expectedPrevL2BlockHash The expected hash of the previous L2 block.\\n /// @param _isFirstInBatch Whether this method is called for the first time in the batch.\\n /// @param _maxVirtualBlocksToCreate The maximum number of virtual block to create with this L2 block.\\n /// @dev It is a strict requirement that a new virtual block is created at the start of the batch.\\n /// @dev It is also enforced that the number of the current virtual L2 block can not exceed the number of the L2 block.\\n function setL2Block(\\n uint128 _l2BlockNumber,\\n uint128 _l2BlockTimestamp,\\n bytes32 _expectedPrevL2BlockHash,\\n bool _isFirstInBatch,\\n uint128 _maxVirtualBlocksToCreate\\n ) external onlyCallFromBootloader {\\n // We check that the timestamp of the L2 block is consistent with the timestamp of the batch.\\n if (_isFirstInBatch) {\\n uint128 currentBatchTimestamp = currentBatchInfo.timestamp;\\n require(\\n _l2BlockTimestamp \u003E= currentBatchTimestamp,\\n \\\"The timestamp of the L2 block must be greater than or equal to the timestamp of the current batch\\\"\\n );\\n require(_maxVirtualBlocksToCreate \u003E 0, \\\"There must be a virtual block created at the start of the batch\\\");\\n }\\n\\n (uint128 currentL2BlockNumber, uint128 currentL2BlockTimestamp) = getL2BlockNumberAndTimestamp();\\n\\n if (currentL2BlockNumber == 0 && currentL2BlockTimestamp == 0) {\\n // Since currentL2BlockNumber and currentL2BlockTimestamp are zero it means that it is\\n // the first ever batch with L2 blocks, so we need to initialize those.\\n _upgradeL2Blocks(_l2BlockNumber, _expectedPrevL2BlockHash, _isFirstInBatch);\\n\\n _setNewL2BlockData(_l2BlockNumber, _l2BlockTimestamp, _expectedPrevL2BlockHash);\\n } else if (currentL2BlockNumber == _l2BlockNumber) {\\n require(!_isFirstInBatch, \\\"Can not reuse L2 block number from the previous batch\\\");\\n require(currentL2BlockTimestamp == _l2BlockTimestamp, \\\"The timestamp of the same L2 block must be same\\\");\\n require(\\n _expectedPrevL2BlockHash == _getLatest257L2blockHash(_l2BlockNumber - 1),\\n \\\"The previous hash of the same L2 block must be same\\\"\\n );\\n require(_maxVirtualBlocksToCreate == 0, \\\"Can not create virtual blocks in the middle of the miniblock\\\");\\n } else if (currentL2BlockNumber + 1 == _l2BlockNumber) {\\n // From the checks in _upgradeL2Blocks it is known that currentL2BlockNumber can not be 0\\n bytes32 prevL2BlockHash = _getLatest257L2blockHash(currentL2BlockNumber - 1);\\n\\n bytes32 pendingL2BlockHash = _calculateL2BlockHash(\\n currentL2BlockNumber,\\n currentL2BlockTimestamp,\\n prevL2BlockHash,\\n currentL2BlockTxsRollingHash\\n );\\n\\n require(_expectedPrevL2BlockHash == pendingL2BlockHash, \\\"The current L2 block hash is incorrect\\\");\\n require(\\n _l2BlockTimestamp \u003E currentL2BlockTimestamp,\\n \\\"The timestamp of the new L2 block must be greater than the timestamp of the previous L2 block\\\"\\n );\\n\\n // Since the new block is created, we'll clear out the rolling hash\\n _setNewL2BlockData(_l2BlockNumber, _l2BlockTimestamp, _expectedPrevL2BlockHash);\\n } else {\\n revert(\\\"Invalid new L2 block number\\\");\\n }\\n\\n _setVirtualBlock(_l2BlockNumber, _maxVirtualBlocksToCreate, _l2BlockTimestamp);\\n }\\n\\n /// @notice Appends the transaction hash to the rolling hash of the current L2 block.\\n /// @param _txHash The hash of the transaction.\\n function appendTransactionToCurrentL2Block(bytes32 _txHash) external onlyCallFromBootloader {\\n currentL2BlockTxsRollingHash = keccak256(abi.encode(currentL2BlockTxsRollingHash, _txHash));\\n }\\n\\n /// @notice Publishes L2-\u003EL1 logs needed to verify the validity of this batch on L1.\\n /// @dev Should be called at the end of the current batch.\\n function publishTimestampDataToL1() external onlyCallFromBootloader {\\n (uint128 currentBatchNumber, uint128 currentBatchTimestamp) = getBatchNumberAndTimestamp();\\n (, uint128 currentL2BlockTimestamp) = getL2BlockNumberAndTimestamp();\\n\\n // The structure of the \\\"setNewBatch\\\" implies that currentBatchNumber \u003E 0, but we still double check it\\n require(currentBatchNumber \u003E 0, \\\"The current batch number must be greater than 0\\\");\\n\\n // In order to spend less pubdata, the packed version is published\\n uint256 packedTimestamps = (uint256(currentBatchTimestamp) \u003C\u003C 128) | currentL2BlockTimestamp;\\n\\n SystemContractHelper.toL1(\\n false,\\n bytes32(uint256(SystemLogKey.PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY)),\\n bytes32(packedTimestamps)\\n );\\n }\\n\\n /// @notice Ensures that the timestamp of the batch is greater than the timestamp of the last L2 block.\\n /// @param _newTimestamp The timestamp of the new batch.\\n function _ensureBatchConsistentWithL2Block(uint128 _newTimestamp) internal view {\\n uint128 currentBlockTimestamp = currentL2BlockInfo.timestamp;\\n require(\\n _newTimestamp \u003E currentBlockTimestamp,\\n \\\"The timestamp of the batch must be greater than the timestamp of the previous block\\\"\\n );\\n }\\n\\n /// @notice Increments the current batch number and sets the new timestamp\\n /// @dev Called by the bootloader at the start of the batch.\\n /// @param _prevBatchHash The hash of the previous batch.\\n /// @param _newTimestamp The timestamp of the new batch.\\n /// @param _expectedNewNumber The new batch's number.\\n /// @param _baseFee The new batch's base fee\\n /// @dev While _expectedNewNumber can be derived as prevBatchNumber + 1, we still\\n /// manually supply it here for consistency checks.\\n /// @dev The correctness of the _prevBatchHash and _newTimestamp should be enforced on L1.\\n function setNewBatch(\\n bytes32 _prevBatchHash,\\n uint128 _newTimestamp,\\n uint128 _expectedNewNumber,\\n uint256 _baseFee\\n ) external onlyCallFromBootloader {\\n (uint128 previousBatchNumber, uint128 previousBatchTimestamp) = getBatchNumberAndTimestamp();\\n require(_newTimestamp \u003E previousBatchTimestamp, \\\"Timestamps should be incremental\\\");\\n require(previousBatchNumber + 1 == _expectedNewNumber, \\\"The provided batch number is not correct\\\");\\n\\n _ensureBatchConsistentWithL2Block(_newTimestamp);\\n\\n batchHashes[previousBatchNumber] = _prevBatchHash;\\n\\n // Setting new block number and timestamp\\n BlockInfo memory newBlockInfo = BlockInfo({number: previousBatchNumber + 1, timestamp: _newTimestamp});\\n\\n currentBatchInfo = newBlockInfo;\\n\\n baseFee = _baseFee;\\n\\n // The correctness of this block hash:\\n SystemContractHelper.toL1(false, bytes32(uint256(SystemLogKey.PREV_BATCH_HASH_KEY)), _prevBatchHash);\\n }\\n\\n /// @notice A testing method that manually sets the current blocks' number and timestamp.\\n /// @dev Should be used only for testing / ethCalls and should never be used in production.\\n function unsafeOverrideBatch(\\n uint256 _newTimestamp,\\n uint256 _number,\\n uint256 _baseFee\\n ) external onlyCallFromBootloader {\\n BlockInfo memory newBlockInfo = BlockInfo({number: uint128(_number), timestamp: uint128(_newTimestamp)});\\n currentBatchInfo = newBlockInfo;\\n\\n baseFee = _baseFee;\\n }\\n\\n function incrementTxNumberInBatch() external onlyCallFromBootloader {\\n txNumberInBlock += 1;\\n }\\n\\n function resetTxNumberInBatch() external onlyCallFromBootloader {\\n txNumberInBlock = 0;\\n }\\n\\n /*//////////////////////////////////////////////////////////////\\n DEPRECATED METHODS\\n //////////////////////////////////////////////////////////////*/\\n\\n /// @notice Returns the current batch's number and timestamp.\\n /// @dev Deprecated in favor of getBatchNumberAndTimestamp.\\n function currentBlockInfo() external view returns (uint256 blockInfo) {\\n (uint128 blockNumber, uint128 blockTimestamp) = getBatchNumberAndTimestamp();\\n blockInfo = (uint256(blockNumber) \u003C\u003C 128) | uint256(blockTimestamp);\\n }\\n\\n /// @notice Returns the current batch's number and timestamp.\\n /// @dev Deprecated in favor of getBatchNumberAndTimestamp.\\n function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp) {\\n (blockNumber, blockTimestamp) = getBatchNumberAndTimestamp();\\n }\\n\\n /// @notice Returns the hash of the given batch.\\n /// @dev Deprecated in favor of getBatchHash.\\n function blockHash(uint256 _blockNumber) external view returns (bytes32 hash) {\\n hash = batchHashes[_blockNumber];\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/ISystemContext.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Contract that stores some of the context variables, that may be either\\n * block-scoped, tx-scoped or system-wide.\\n */\\ninterface ISystemContext {\\n struct BlockInfo {\\n uint128 timestamp;\\n uint128 number;\\n }\\n\\n /// @notice A structure representing the timeline for the upgrade from the batch numbers to the L2 block numbers.\\n /// @dev It will be used for the L1 batch -\u003E L2 block migration in Q3 2023 only.\\n struct VirtualBlockUpgradeInfo {\\n /// @notice In order to maintain consistent results for `blockhash` requests, we'll\\n /// have to remember the number of the batch when the upgrade to the virtual blocks has been done.\\n /// The hashes for virtual blocks before the upgrade are identical to the hashes of the corresponding batches.\\n uint128 virtualBlockStartBatch;\\n /// @notice L2 block when the virtual blocks have caught up with the L2 blocks. Starting from this block,\\n /// all the information returned to users for block.timestamp/number, etc should be the information about the L2 blocks and\\n /// not virtual blocks.\\n uint128 virtualBlockFinishL2Block;\\n }\\n\\n function chainId() external view returns (uint256);\\n\\n function origin() external view returns (address);\\n\\n function gasPrice() external view returns (uint256);\\n\\n function blockGasLimit() external view returns (uint256);\\n\\n function coinbase() external view returns (address);\\n\\n function difficulty() external view returns (uint256);\\n\\n function baseFee() external view returns (uint256);\\n\\n function txNumberInBlock() external view returns (uint16);\\n\\n function getBlockHashEVM(uint256 _block) external view returns (bytes32);\\n\\n function getBatchHash(uint256 _batchNumber) external view returns (bytes32 hash);\\n\\n function getBlockNumber() external view returns (uint128);\\n\\n function getBlockTimestamp() external view returns (uint128);\\n\\n function getBatchNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp);\\n\\n function getL2BlockNumberAndTimestamp() external view returns (uint128 blockNumber, uint128 blockTimestamp);\\n\\n function gasPerPubdataByte() external view returns (uint256 gasPerPubdataByte);\\n\\n function getCurrentPubdataSpent() external view returns (uint256 currentPubdataSpent);\\n}\\n\"},\"contracts-preprocessed/interfaces/ISystemContract.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {SystemContractHelper} from \\\"../libraries/SystemContractHelper.sol\\\";\\nimport {BOOTLOADER_FORMAL_ADDRESS, FORCE_DEPLOYER} from \\\"../Constants.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice An abstract contract that is used to reuse modifiers across the system contracts.\\n * @dev Solidity does not allow exporting modifiers via libraries, so\\n * the only way to do reuse modifiers is to have a base contract\\n * @dev Never add storage variables into this contract as some\\n * system contracts rely on this abstract contract as on interface!\\n */\\nabstract contract ISystemContract {\\n /// @notice Modifier that makes sure that the method\\n /// can only be called via a system call.\\n modifier onlySystemCall() {\\n require(\\n SystemContractHelper.isSystemCall() || SystemContractHelper.isSystemContract(msg.sender),\\n \\\"This method require system call flag\\\"\\n );\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from a system contract.\\n modifier onlyCallFromSystemContract() {\\n require(\\n SystemContractHelper.isSystemContract(msg.sender),\\n \\\"This method require the caller to be system contract\\\"\\n );\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from a special given address.\\n modifier onlyCallFrom(address caller) {\\n require(msg.sender == caller, \\\"Inappropriate caller\\\");\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from the bootloader.\\n modifier onlyCallFromBootloader() {\\n require(msg.sender == BOOTLOADER_FORMAL_ADDRESS, \\\"Callable only by the bootloader\\\");\\n _;\\n }\\n\\n /// @notice Modifier that makes sure that the method\\n /// can only be called from the L1 force deployer.\\n modifier onlyCallFromForceDeployer() {\\n require(msg.sender == FORCE_DEPLOYER);\\n _;\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/ISystemContextDeprecated.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface with deprecated functions of the SystemContext contract. It is aimed for backward compatibility.\\n */\\ninterface ISystemContextDeprecated {\\n function currentBlockInfo() external view returns (uint256);\\n\\n function getBlockNumberAndTimestamp() external view returns (uint256 blockNumber, uint256 blockTimestamp);\\n\\n function blockHash(uint256 _blockNumber) external view returns (bytes32 hash);\\n}\\n\"},\"contracts-preprocessed/libraries/SystemContractHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {MAX_SYSTEM_CONTRACT_ADDRESS} from \\\"../Constants.sol\\\";\\n\\nimport {CALLFLAGS_CALL_ADDRESS, CODE_ADDRESS_CALL_ADDRESS, EVENT_WRITE_ADDRESS, EVENT_INITIALIZE_ADDRESS, GET_EXTRA_ABI_DATA_ADDRESS, LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS, META_CODE_SHARD_ID_OFFSET, META_CALLER_SHARD_ID_OFFSET, META_SHARD_ID_OFFSET, META_AUX_HEAP_SIZE_OFFSET, META_HEAP_SIZE_OFFSET, META_PUBDATA_PUBLISHED_OFFSET, META_CALL_ADDRESS, PTR_CALLDATA_CALL_ADDRESS, PTR_ADD_INTO_ACTIVE_CALL_ADDRESS, PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS, PTR_PACK_INTO_ACTIVE_CALL_ADDRESS, PRECOMPILE_CALL_ADDRESS, SET_CONTEXT_VALUE_CALL_ADDRESS, TO_L1_CALL_ADDRESS} from \\\"./SystemContractsCaller.sol\\\";\\n\\nuint256 constant UINT32_MASK = type(uint32).max;\\nuint256 constant UINT64_MASK = type(uint64).max;\\nuint256 constant UINT128_MASK = type(uint128).max;\\nuint256 constant ADDRESS_MASK = type(uint160).max;\\n\\n/// @notice NOTE: The `getZkSyncMeta` that is used to obtain this struct will experience a breaking change in 2024.\\nstruct ZkSyncMeta {\\n uint32 pubdataPublished;\\n uint32 heapSize;\\n uint32 auxHeapSize;\\n uint8 shardId;\\n uint8 callerShardId;\\n uint8 codeShardId;\\n}\\n\\nenum Global {\\n CalldataPtr,\\n CallFlags,\\n ExtraABIData1,\\n ExtraABIData2,\\n ReturndataPtr\\n}\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Library used for accessing zkEVM-specific opcodes, needed for the development\\n * of system contracts.\\n * @dev While this library will be eventually available to public, some of the provided\\n * methods won't work for non-system contracts and also breaking changes at short notice are possible.\\n * We do not recommend this library for external use.\\n */\\nlibrary SystemContractHelper {\\n /// @notice Send an L2Log to L1.\\n /// @param _isService The `isService` flag.\\n /// @param _key The `key` part of the L2Log.\\n /// @param _value The `value` part of the L2Log.\\n /// @dev The meaning of all these parameters is context-dependent, but they\\n /// have no intrinsic meaning per se.\\n function toL1(bool _isService, bytes32 _key, bytes32 _value) internal {\\n address callAddr = TO_L1_CALL_ADDRESS;\\n assembly {\\n // Ensuring that the type is bool\\n _isService := and(_isService, 1)\\n // This `success` is always 0, but the method always succeeds\\n // (except for the cases when there is not enough gas)\\n // solhint-disable-next-line no-unused-vars\\n let success := call(_isService, callAddr, _key, _value, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Get address of the currently executed code.\\n /// @dev This allows differentiating between `call` and `delegatecall`.\\n /// During the former `this` and `codeAddress` are the same, while\\n /// during the latter they are not.\\n function getCodeAddress() internal view returns (address addr) {\\n address callAddr = CODE_ADDRESS_CALL_ADDRESS;\\n assembly {\\n addr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Provide a compiler hint, by placing calldata fat pointer into virtual `ACTIVE_PTR`,\\n /// that can be manipulated by `ptr.add`/`ptr.sub`/`ptr.pack`/`ptr.shrink` later.\\n /// @dev This allows making a call by forwarding calldata pointer to the child call.\\n /// It is a much more efficient way to forward calldata, than standard EVM bytes copying.\\n function loadCalldataIntoActivePtr() internal view {\\n address callAddr = LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS;\\n assembly {\\n pop(staticcall(0, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Compiler simulation of the `ptr.pack` opcode for the virtual `ACTIVE_PTR` pointer.\\n /// @dev Do the concatenation between lowest part of `ACTIVE_PTR` and highest part of `_farCallAbi`\\n /// forming packed fat pointer for a far call or ret ABI when necessary.\\n /// Note: Panics if the lowest 128 bits of `_farCallAbi` are not zeroes.\\n function ptrPackIntoActivePtr(uint256 _farCallAbi) internal view {\\n address callAddr = PTR_PACK_INTO_ACTIVE_CALL_ADDRESS;\\n assembly {\\n pop(staticcall(_farCallAbi, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Compiler simulation of the `ptr.add` opcode for the virtual `ACTIVE_PTR` pointer.\\n /// @dev Transforms `ACTIVE_PTR.offset` into `ACTIVE_PTR.offset + u32(_value)`. If overflow happens then it panics.\\n function ptrAddIntoActive(uint32 _value) internal view {\\n address callAddr = PTR_ADD_INTO_ACTIVE_CALL_ADDRESS;\\n uint256 cleanupMask = UINT32_MASK;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n _value := and(_value, cleanupMask)\\n pop(staticcall(_value, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Compiler simulation of the `ptr.shrink` opcode for the virtual `ACTIVE_PTR` pointer.\\n /// @dev Transforms `ACTIVE_PTR.length` into `ACTIVE_PTR.length - u32(_shrink)`. If underflow happens then it panics.\\n function ptrShrinkIntoActive(uint32 _shrink) internal view {\\n address callAddr = PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS;\\n uint256 cleanupMask = UINT32_MASK;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n _shrink := and(_shrink, cleanupMask)\\n pop(staticcall(_shrink, callAddr, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice packs precompile parameters into one word\\n /// @param _inputMemoryOffset The memory offset in 32-byte words for the input data for calling the precompile.\\n /// @param _inputMemoryLength The length of the input data in words.\\n /// @param _outputMemoryOffset The memory offset in 32-byte words for the output data.\\n /// @param _outputMemoryLength The length of the output data in words.\\n /// @param _perPrecompileInterpreted The constant, the meaning of which is defined separately for\\n /// each precompile. For information, please read the documentation of the precompilecall log in\\n /// the VM.\\n function packPrecompileParams(\\n uint32 _inputMemoryOffset,\\n uint32 _inputMemoryLength,\\n uint32 _outputMemoryOffset,\\n uint32 _outputMemoryLength,\\n uint64 _perPrecompileInterpreted\\n ) internal pure returns (uint256 rawParams) {\\n rawParams = _inputMemoryOffset;\\n rawParams |= uint256(_inputMemoryLength) \u003C\u003C 32;\\n rawParams |= uint256(_outputMemoryOffset) \u003C\u003C 64;\\n rawParams |= uint256(_outputMemoryLength) \u003C\u003C 96;\\n rawParams |= uint256(_perPrecompileInterpreted) \u003C\u003C 192;\\n }\\n\\n /// @notice Call precompile with given parameters.\\n /// @param _rawParams The packed precompile params. They can be retrieved by\\n /// the `packPrecompileParams` method.\\n /// @param _gasToBurn The number of gas to burn during this call.\\n /// @param _pubdataToSpend The number of pubdata bytes to burn during the call.\\n /// @return success Whether the call was successful.\\n /// @dev The list of currently available precompiles sha256, keccak256, ecrecover.\\n /// NOTE: The precompile type depends on `this` which calls precompile, which means that only\\n /// system contracts corresponding to the list of precompiles above can do `precompileCall`.\\n /// @dev If used not in the `sha256`, `keccak256` or `ecrecover` contracts, it will just burn the gas provided.\\n /// @dev This method is `unsafe` because it does not check whether there is enough gas to burn.\\n function unsafePrecompileCall(\\n uint256 _rawParams,\\n uint32 _gasToBurn,\\n uint32 _pubdataToSpend\\n ) internal view returns (bool success) {\\n address callAddr = PRECOMPILE_CALL_ADDRESS;\\n\\n uint256 params = uint256(_gasToBurn) + (uint256(_pubdataToSpend) \u003C\u003C 32);\\n\\n uint256 cleanupMask = UINT64_MASK;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n params := and(params, cleanupMask)\\n success := staticcall(_rawParams, callAddr, params, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Set `msg.value` to next far call.\\n /// @param _value The msg.value that will be used for the *next* call.\\n /// @dev If called not in kernel mode, it will result in a revert (enforced by the VM)\\n function setValueForNextFarCall(uint128 _value) internal returns (bool success) {\\n uint256 cleanupMask = UINT128_MASK;\\n address callAddr = SET_CONTEXT_VALUE_CALL_ADDRESS;\\n assembly {\\n // Clearing input params as they are not cleaned by Solidity by default\\n _value := and(_value, cleanupMask)\\n success := call(0, callAddr, _value, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Initialize a new event.\\n /// @param initializer The event initializing value.\\n /// @param value1 The first topic or data chunk.\\n function eventInitialize(uint256 initializer, uint256 value1) internal {\\n address callAddr = EVENT_INITIALIZE_ADDRESS;\\n assembly {\\n pop(call(initializer, callAddr, value1, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Continue writing the previously initialized event.\\n /// @param value1 The first topic or data chunk.\\n /// @param value2 The second topic or data chunk.\\n function eventWrite(uint256 value1, uint256 value2) internal {\\n address callAddr = EVENT_WRITE_ADDRESS;\\n assembly {\\n pop(call(value1, callAddr, value2, 0, 0xFFFF, 0, 0))\\n }\\n }\\n\\n /// @notice Get the packed representation of the `ZkSyncMeta` from the current context.\\n /// @notice NOTE: The behavior of this function will experience a breaking change in 2024.\\n /// @return meta The packed representation of the ZkSyncMeta.\\n /// @dev The fields in ZkSyncMeta are NOT tightly packed, i.e. there is a special rule on how\\n /// they are packed. For more information, please read the documentation on ZkSyncMeta.\\n function getZkSyncMetaBytes() internal view returns (uint256 meta) {\\n address callAddr = META_CALL_ADDRESS;\\n assembly {\\n meta := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns the bits [offset..offset+size-1] of the meta.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @param offset The offset of the bits.\\n /// @param size The size of the extracted number in bits.\\n /// @return result The extracted number.\\n function extractNumberFromMeta(uint256 meta, uint256 offset, uint256 size) internal pure returns (uint256 result) {\\n // Firstly, we delete all the bits after the field\\n uint256 shifted = (meta \u003C\u003C (256 - size - offset));\\n // Then we shift everything back\\n result = (shifted \u003E\u003E (256 - size));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the number of pubdata\\n /// bytes published in the batch so far.\\n /// @notice NOTE: The behavior of this function will experience a breaking change in 2024.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return pubdataPublished The amount of pubdata published in the system so far.\\n function getPubdataPublishedFromMeta(uint256 meta) internal pure returns (uint32 pubdataPublished) {\\n pubdataPublished = uint32(extractNumberFromMeta(meta, META_PUBDATA_PUBLISHED_OFFSET, 32));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the number of the current size\\n /// of the heap in bytes.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return heapSize The size of the memory in bytes byte.\\n /// @dev The following expression: getHeapSizeFromMeta(getZkSyncMetaBytes()) is\\n /// equivalent to the MSIZE in Solidity.\\n function getHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 heapSize) {\\n heapSize = uint32(extractNumberFromMeta(meta, META_HEAP_SIZE_OFFSET, 32));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the number of the current size\\n /// of the auxiliary heap in bytes.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return auxHeapSize The size of the auxiliary memory in bytes byte.\\n /// @dev You can read more on auxiliary memory in the VM1.2 documentation.\\n function getAuxHeapSizeFromMeta(uint256 meta) internal pure returns (uint32 auxHeapSize) {\\n auxHeapSize = uint32(extractNumberFromMeta(meta, META_AUX_HEAP_SIZE_OFFSET, 32));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the shardId of `this`.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return shardId The shardId of `this`.\\n /// @dev Currently only shard 0 (zkRollup) is supported.\\n function getShardIdFromMeta(uint256 meta) internal pure returns (uint8 shardId) {\\n shardId = uint8(extractNumberFromMeta(meta, META_SHARD_ID_OFFSET, 8));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the shardId of\\n /// the msg.sender.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return callerShardId The shardId of the msg.sender.\\n /// @dev Currently only shard 0 (zkRollup) is supported.\\n function getCallerShardIdFromMeta(uint256 meta) internal pure returns (uint8 callerShardId) {\\n callerShardId = uint8(extractNumberFromMeta(meta, META_CALLER_SHARD_ID_OFFSET, 8));\\n }\\n\\n /// @notice Given the packed representation of `ZkSyncMeta`, retrieves the shardId of\\n /// the currently executed code.\\n /// @param meta Packed representation of the ZkSyncMeta.\\n /// @return codeShardId The shardId of the currently executed code.\\n /// @dev Currently only shard 0 (zkRollup) is supported.\\n function getCodeShardIdFromMeta(uint256 meta) internal pure returns (uint8 codeShardId) {\\n codeShardId = uint8(extractNumberFromMeta(meta, META_CODE_SHARD_ID_OFFSET, 8));\\n }\\n\\n /// @notice Retrieves the ZkSyncMeta structure.\\n /// @notice NOTE: The behavior of this function will experience a breaking change in 2024.\\n /// @return meta The ZkSyncMeta execution context parameters.\\n function getZkSyncMeta() internal view returns (ZkSyncMeta memory meta) {\\n uint256 metaPacked = getZkSyncMetaBytes();\\n meta.pubdataPublished = getPubdataPublishedFromMeta(metaPacked);\\n meta.heapSize = getHeapSizeFromMeta(metaPacked);\\n meta.auxHeapSize = getAuxHeapSizeFromMeta(metaPacked);\\n meta.shardId = getShardIdFromMeta(metaPacked);\\n meta.callerShardId = getCallerShardIdFromMeta(metaPacked);\\n meta.codeShardId = getCodeShardIdFromMeta(metaPacked);\\n }\\n\\n /// @notice Returns the call flags for the current call.\\n /// @return callFlags The bitmask of the callflags.\\n /// @dev Call flags is the value of the first register\\n /// at the start of the call.\\n /// @dev The zero bit of the callFlags indicates whether the call is\\n /// a constructor call. The first bit of the callFlags indicates whether\\n /// the call is a system one.\\n function getCallFlags() internal view returns (uint256 callFlags) {\\n address callAddr = CALLFLAGS_CALL_ADDRESS;\\n assembly {\\n callFlags := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns the current calldata pointer.\\n /// @return ptr The current calldata pointer.\\n /// @dev NOTE: This file is just an integer and it cannot be used\\n /// to forward the calldata to the next calls in any way.\\n function getCalldataPtr() internal view returns (uint256 ptr) {\\n address callAddr = PTR_CALLDATA_CALL_ADDRESS;\\n assembly {\\n ptr := staticcall(0, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns the N-th extraAbiParam for the current call.\\n /// @return extraAbiData The value of the N-th extraAbiParam for this call.\\n /// @dev It is equal to the value of the (N+2)-th register\\n /// at the start of the call.\\n function getExtraAbiData(uint256 index) internal view returns (uint256 extraAbiData) {\\n require(index \u003C 10, \\\"There are only 10 accessible registers\\\");\\n\\n address callAddr = GET_EXTRA_ABI_DATA_ADDRESS;\\n assembly {\\n extraAbiData := staticcall(index, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Returns whether the current call is a system call.\\n /// @return `true` or `false` based on whether the current call is a system call.\\n function isSystemCall() internal view returns (bool) {\\n uint256 callFlags = getCallFlags();\\n // When the system call is passed, the 2-bit is set to 1\\n return (callFlags & 2) != 0;\\n }\\n\\n /// @notice Returns whether the address is a system contract.\\n /// @param _address The address to test\\n /// @return `true` or `false` based on whether the `_address` is a system contract.\\n function isSystemContract(address _address) internal pure returns (bool) {\\n return uint160(_address) \u003C= uint160(MAX_SYSTEM_CONTRACT_ADDRESS);\\n }\\n\\n /// @notice Method used for burning a certain amount of gas.\\n /// @param _gasToPay The number of gas to burn.\\n /// @param _pubdataToSpend The number of pubdata bytes to burn during the call.\\n function burnGas(uint32 _gasToPay, uint32 _pubdataToSpend) internal view {\\n bool precompileCallSuccess = unsafePrecompileCall(\\n 0, // The precompile parameters are formal ones. We only need the precompile call to burn gas.\\n _gasToPay,\\n _pubdataToSpend\\n );\\n require(precompileCallSuccess, \\\"Failed to charge gas\\\");\\n }\\n}\\n\"},\"contracts-preprocessed/Constants.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {IAccountCodeStorage} from \\\"./interfaces/IAccountCodeStorage.sol\\\";\\nimport {INonceHolder} from \\\"./interfaces/INonceHolder.sol\\\";\\nimport {IContractDeployer} from \\\"./interfaces/IContractDeployer.sol\\\";\\nimport {IKnownCodesStorage} from \\\"./interfaces/IKnownCodesStorage.sol\\\";\\nimport {IImmutableSimulator} from \\\"./interfaces/IImmutableSimulator.sol\\\";\\nimport {IBaseToken} from \\\"./interfaces/IBaseToken.sol\\\";\\nimport {IL1Messenger} from \\\"./interfaces/IL1Messenger.sol\\\";\\nimport {ISystemContext} from \\\"./interfaces/ISystemContext.sol\\\";\\nimport {ICompressor} from \\\"./interfaces/ICompressor.sol\\\";\\nimport {IComplexUpgrader} from \\\"./interfaces/IComplexUpgrader.sol\\\";\\nimport {IBootloaderUtilities} from \\\"./interfaces/IBootloaderUtilities.sol\\\";\\nimport {IPubdataChunkPublisher} from \\\"./interfaces/IPubdataChunkPublisher.sol\\\";\\n\\n/// @dev All the system contracts introduced by zkSync have their addresses\\n/// started from 2^15 in order to avoid collision with Ethereum precompiles.\\nuint160 constant SYSTEM_CONTRACTS_OFFSET = 0x8000; // 2^15\\n\\n/// @dev Unlike the value above, it is not overridden for the purpose of testing and\\n/// is identical to the constant value actually used as the system contracts offset on\\n/// mainnet.\\nuint160 constant REAL_SYSTEM_CONTRACTS_OFFSET = 0x8000;\\n\\n/// @dev All the system contracts must be located in the kernel space,\\n/// i.e. their addresses must be below 2^16.\\nuint160 constant MAX_SYSTEM_CONTRACT_ADDRESS = 0xffff; // 2^16 - 1\\n\\naddress constant ECRECOVER_SYSTEM_CONTRACT = address(0x01);\\naddress constant SHA256_SYSTEM_CONTRACT = address(0x02);\\naddress constant ECADD_SYSTEM_CONTRACT = address(0x06);\\naddress constant ECMUL_SYSTEM_CONTRACT = address(0x07);\\naddress constant ECPAIRING_SYSTEM_CONTRACT = address(0x08);\\n\\n\\n/// @dev The number of ergs that need to be spent for a single byte of pubdata regardless of the pubdata price.\\n/// This variable is used to ensure the following:\\n/// - That the long-term storage of the operator is compensated properly.\\n/// - That it is not possible that the pubdata counter grows too high without spending proportional amount of computation.\\nuint256 constant COMPUTATIONAL_PRICE_FOR_PUBDATA = 80;\\n\\n/// @dev The maximal possible address of an L1-like precompie. These precompiles maintain the following properties:\\n/// - Their extcodehash is EMPTY_STRING_KECCAK\\n/// - Their extcodesize is 0 despite having a bytecode formally deployed there.\\nuint256 constant CURRENT_MAX_PRECOMPILE_ADDRESS = 0xff;\\n\\naddress payable constant BOOTLOADER_FORMAL_ADDRESS = payable(address(SYSTEM_CONTRACTS_OFFSET + 0x01));\\nIAccountCodeStorage constant ACCOUNT_CODE_STORAGE_SYSTEM_CONTRACT = IAccountCodeStorage(\\n address(SYSTEM_CONTRACTS_OFFSET + 0x02)\\n);\\nINonceHolder constant NONCE_HOLDER_SYSTEM_CONTRACT = INonceHolder(address(SYSTEM_CONTRACTS_OFFSET + 0x03));\\nIKnownCodesStorage constant KNOWN_CODE_STORAGE_CONTRACT = IKnownCodesStorage(address(SYSTEM_CONTRACTS_OFFSET + 0x04));\\nIImmutableSimulator constant IMMUTABLE_SIMULATOR_SYSTEM_CONTRACT = IImmutableSimulator(\\n address(SYSTEM_CONTRACTS_OFFSET + 0x05)\\n);\\nIContractDeployer constant DEPLOYER_SYSTEM_CONTRACT = IContractDeployer(address(SYSTEM_CONTRACTS_OFFSET + 0x06));\\nIContractDeployer constant REAL_DEPLOYER_SYSTEM_CONTRACT = IContractDeployer(address(REAL_SYSTEM_CONTRACTS_OFFSET + 0x06));\\n\\n// A contract that is allowed to deploy any codehash\\n// on any address. To be used only during an upgrade.\\naddress constant FORCE_DEPLOYER = address(SYSTEM_CONTRACTS_OFFSET + 0x07);\\nIL1Messenger constant L1_MESSENGER_CONTRACT = IL1Messenger(address(SYSTEM_CONTRACTS_OFFSET + 0x08));\\naddress constant MSG_VALUE_SYSTEM_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x09);\\n\\nIBaseToken constant BASE_TOKEN_SYSTEM_CONTRACT = IBaseToken(address(SYSTEM_CONTRACTS_OFFSET + 0x0a));\\nIBaseToken constant REAL_BASE_TOKEN_SYSTEM_CONTRACT = IBaseToken(address(REAL_SYSTEM_CONTRACTS_OFFSET + 0x0a));\\n\\n// Hardcoded because even for tests we should keep the address. (Instead `SYSTEM_CONTRACTS_OFFSET + 0x10`)\\n// Precompile call depends on it.\\n// And we don't want to mock this contract.\\naddress constant KECCAK256_SYSTEM_CONTRACT = address(0x8010);\\n\\nISystemContext constant SYSTEM_CONTEXT_CONTRACT = ISystemContext(payable(address(SYSTEM_CONTRACTS_OFFSET + 0x0b)));\\nISystemContext constant REAL_SYSTEM_CONTEXT_CONTRACT = ISystemContext(payable(address(REAL_SYSTEM_CONTRACTS_OFFSET + 0x0b)));\\n\\nIBootloaderUtilities constant BOOTLOADER_UTILITIES = IBootloaderUtilities(address(SYSTEM_CONTRACTS_OFFSET + 0x0c));\\n\\n// It will be a different value for tests, while shouldn't. But for now, this constant is not used by other contracts, so that's fine.\\naddress constant EVENT_WRITER_CONTRACT = address(SYSTEM_CONTRACTS_OFFSET + 0x0d);\\n\\nICompressor constant COMPRESSOR_CONTRACT = ICompressor(address(SYSTEM_CONTRACTS_OFFSET + 0x0e));\\n\\nIComplexUpgrader constant COMPLEX_UPGRADER_CONTRACT = IComplexUpgrader(address(SYSTEM_CONTRACTS_OFFSET + 0x0f));\\n\\nIPubdataChunkPublisher constant PUBDATA_CHUNK_PUBLISHER = IPubdataChunkPublisher(\\n address(SYSTEM_CONTRACTS_OFFSET + 0x11)\\n);\\n\\n/// @dev If the bitwise AND of the extraAbi[2] param when calling the MSG_VALUE_SIMULATOR\\n/// is non-zero, the call will be assumed to be a system one.\\nuint256 constant MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT = 1;\\n\\n/// @dev The maximal msg.value that context can have\\nuint256 constant MAX_MSG_VALUE = type(uint128).max;\\n\\n/// @dev Prefix used during derivation of account addresses using CREATE2\\n/// @dev keccak256(\\\"zksyncCreate2\\\")\\nbytes32 constant CREATE2_PREFIX = 0x2020dba91b30cc0006188af794c2fb30dd8520db7e2c088b7fc7c103c00ca494;\\n/// @dev Prefix used during derivation of account addresses using CREATE\\n/// @dev keccak256(\\\"zksyncCreate\\\")\\nbytes32 constant CREATE_PREFIX = 0x63bae3a9951d38e8a3fbb7b70909afc1200610fc5bc55ade242f815974674f23;\\n\\n/// @dev Each state diff consists of 156 bytes of actual data and 116 bytes of unused padding, needed for circuit efficiency.\\nuint256 constant STATE_DIFF_ENTRY_SIZE = 272;\\n\\nenum SystemLogKey {\\n L2_TO_L1_LOGS_TREE_ROOT_KEY,\\n TOTAL_L2_TO_L1_PUBDATA_KEY,\\n STATE_DIFF_HASH_KEY,\\n PACKED_BATCH_AND_L2_BLOCK_TIMESTAMP_KEY,\\n PREV_BATCH_HASH_KEY,\\n CHAINED_PRIORITY_TXN_HASH_KEY,\\n NUMBER_OF_LAYER_1_TXS_KEY,\\n BLOB_ONE_HASH_KEY,\\n BLOB_TWO_HASH_KEY,\\n BLOB_THREE_HASH_KEY,\\n BLOB_FOUR_HASH_KEY,\\n BLOB_FIVE_HASH_KEY,\\n BLOB_SIX_HASH_KEY,\\n EXPECTED_SYSTEM_CONTRACT_UPGRADE_TX_HASH_KEY\\n}\\n\\n/// @dev The number of leaves in the L2-\u003EL1 log Merkle tree.\\n/// While formally a tree of any length is acceptable, the node supports only a constant length of 16384 leaves.\\nuint256 constant L2_TO_L1_LOGS_MERKLE_TREE_LEAVES = 16_384;\\n\\n/// @dev The length of the derived key in bytes inside compressed state diffs.\\nuint256 constant DERIVED_KEY_LENGTH = 32;\\n/// @dev The length of the enum index in bytes inside compressed state diffs.\\nuint256 constant ENUM_INDEX_LENGTH = 8;\\n/// @dev The length of value in bytes inside compressed state diffs.\\nuint256 constant VALUE_LENGTH = 32;\\n\\n/// @dev The length of the compressed initial storage write in bytes.\\nuint256 constant COMPRESSED_INITIAL_WRITE_SIZE = DERIVED_KEY_LENGTH + VALUE_LENGTH;\\n/// @dev The length of the compressed repeated storage write in bytes.\\nuint256 constant COMPRESSED_REPEATED_WRITE_SIZE = ENUM_INDEX_LENGTH + VALUE_LENGTH;\\n\\n/// @dev The position from which the initial writes start in the compressed state diffs.\\nuint256 constant INITIAL_WRITE_STARTING_POSITION = 4;\\n\\n/// @dev Each storage diffs consists of the following elements:\\n/// [20bytes address][32bytes key][32bytes derived key][8bytes enum index][32bytes initial value][32bytes final value]\\n/// @dev The offset of the derived key in a storage diff.\\nuint256 constant STATE_DIFF_DERIVED_KEY_OFFSET = 52;\\n/// @dev The offset of the enum index in a storage diff.\\nuint256 constant STATE_DIFF_ENUM_INDEX_OFFSET = 84;\\n/// @dev The offset of the final value in a storage diff.\\nuint256 constant STATE_DIFF_FINAL_VALUE_OFFSET = 124;\\n\\n/// @dev Total number of bytes in a blob. Blob = 4096 field elements * 31 bytes per field element\\n/// @dev EIP-4844 defines it as 131_072 but we use 4096 * 31 within our circuits to always fit within a field element\\n/// @dev Our circuits will prove that a EIP-4844 blob and our internal blob are the same.\\nuint256 constant BLOB_SIZE_BYTES = 126_976;\\n\\n/// @dev Max number of blobs currently supported\\nuint256 constant MAX_NUMBER_OF_BLOBS = 6;\\n\"},\"contracts-preprocessed/libraries/SystemContractsCaller.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {MSG_VALUE_SYSTEM_CONTRACT, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT} from \\\"../Constants.sol\\\";\\nimport {Utils} from \\\"./Utils.sol\\\";\\n\\n// Addresses used for the compiler to be replaced with the\\n// zkSync-specific opcodes during the compilation.\\n// IMPORTANT: these are just compile-time constants and are used\\n// only if used in-place by Yul optimizer.\\naddress constant TO_L1_CALL_ADDRESS = address((1 \u003C\u003C 16) - 1);\\naddress constant CODE_ADDRESS_CALL_ADDRESS = address((1 \u003C\u003C 16) - 2);\\naddress constant PRECOMPILE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 3);\\naddress constant META_CALL_ADDRESS = address((1 \u003C\u003C 16) - 4);\\naddress constant MIMIC_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 5);\\naddress constant SYSTEM_MIMIC_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 6);\\naddress constant MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 7);\\naddress constant SYSTEM_MIMIC_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 8);\\naddress constant RAW_FAR_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 9);\\naddress constant RAW_FAR_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 10);\\naddress constant SYSTEM_CALL_CALL_ADDRESS = address((1 \u003C\u003C 16) - 11);\\naddress constant SYSTEM_CALL_BY_REF_CALL_ADDRESS = address((1 \u003C\u003C 16) - 12);\\naddress constant SET_CONTEXT_VALUE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 13);\\naddress constant SET_PUBDATA_PRICE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 14);\\naddress constant INCREMENT_TX_COUNTER_CALL_ADDRESS = address((1 \u003C\u003C 16) - 15);\\naddress constant PTR_CALLDATA_CALL_ADDRESS = address((1 \u003C\u003C 16) - 16);\\naddress constant CALLFLAGS_CALL_ADDRESS = address((1 \u003C\u003C 16) - 17);\\naddress constant PTR_RETURNDATA_CALL_ADDRESS = address((1 \u003C\u003C 16) - 18);\\naddress constant EVENT_INITIALIZE_ADDRESS = address((1 \u003C\u003C 16) - 19);\\naddress constant EVENT_WRITE_ADDRESS = address((1 \u003C\u003C 16) - 20);\\naddress constant LOAD_CALLDATA_INTO_ACTIVE_PTR_CALL_ADDRESS = address((1 \u003C\u003C 16) - 21);\\naddress constant LOAD_LATEST_RETURNDATA_INTO_ACTIVE_PTR_CALL_ADDRESS = address((1 \u003C\u003C 16) - 22);\\naddress constant PTR_ADD_INTO_ACTIVE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 23);\\naddress constant PTR_SHRINK_INTO_ACTIVE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 24);\\naddress constant PTR_PACK_INTO_ACTIVE_CALL_ADDRESS = address((1 \u003C\u003C 16) - 25);\\naddress constant MULTIPLICATION_HIGH_ADDRESS = address((1 \u003C\u003C 16) - 26);\\naddress constant GET_EXTRA_ABI_DATA_ADDRESS = address((1 \u003C\u003C 16) - 27);\\n\\n// All the offsets are in bits\\nuint256 constant META_PUBDATA_PUBLISHED_OFFSET = 0 * 8;\\nuint256 constant META_HEAP_SIZE_OFFSET = 8 * 8;\\nuint256 constant META_AUX_HEAP_SIZE_OFFSET = 12 * 8;\\nuint256 constant META_SHARD_ID_OFFSET = 28 * 8;\\nuint256 constant META_CALLER_SHARD_ID_OFFSET = 29 * 8;\\nuint256 constant META_CODE_SHARD_ID_OFFSET = 30 * 8;\\n\\n/// @notice The way to forward the calldata:\\n/// - Use the current heap (i.e. the same as on EVM).\\n/// - Use the auxiliary heap.\\n/// - Forward via a pointer\\n/// @dev Note, that currently, users do not have access to the auxiliary\\n/// heap and so the only type of forwarding that will be used by the users\\n/// are UseHeap and ForwardFatPointer for forwarding a slice of the current calldata\\n/// to the next call.\\nenum CalldataForwardingMode {\\n UseHeap,\\n ForwardFatPointer,\\n UseAuxHeap\\n}\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice A library that allows calling contracts with the `isSystem` flag.\\n * @dev It is needed to call ContractDeployer and NonceHolder.\\n */\\nlibrary SystemContractsCaller {\\n /// @notice Makes a call with the `isSystem` flag.\\n /// @param gasLimit The gas limit for the call.\\n /// @param to The address to call.\\n /// @param value The value to pass with the transaction.\\n /// @param data The calldata.\\n /// @return success Whether the transaction has been successful.\\n /// @dev Note, that the `isSystem` flag can only be set when calling system contracts.\\n function systemCall(uint32 gasLimit, address to, uint256 value, bytes memory data) internal returns (bool success) {\\n address callAddr = SYSTEM_CALL_CALL_ADDRESS;\\n\\n uint32 dataStart;\\n assembly {\\n dataStart := add(data, 0x20)\\n }\\n uint32 dataLength = uint32(Utils.safeCastToU32(data.length));\\n\\n uint256 farCallAbi = SystemContractsCaller.getFarCallABI({\\n dataOffset: 0,\\n memoryPage: 0,\\n dataStart: dataStart,\\n dataLength: dataLength,\\n gasPassed: gasLimit,\\n // Only rollup is supported for now\\n shardId: 0,\\n forwardingMode: CalldataForwardingMode.UseHeap,\\n isConstructorCall: false,\\n isSystemCall: true\\n });\\n\\n if (value == 0) {\\n // Doing the system call directly\\n assembly {\\n success := call(to, callAddr, 0, 0, farCallAbi, 0, 0)\\n }\\n } else {\\n address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT;\\n // We need to supply the mask to the MsgValueSimulator to denote\\n // that the call should be a system one.\\n uint256 forwardMask = MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT;\\n\\n assembly {\\n success := call(msgValueSimulator, callAddr, value, to, farCallAbi, forwardMask, 0)\\n }\\n }\\n }\\n\\n /// @notice Makes a call with the `isSystem` flag.\\n /// @param gasLimit The gas limit for the call.\\n /// @param to The address to call.\\n /// @param value The value to pass with the transaction.\\n /// @param data The calldata.\\n /// @return success Whether the transaction has been successful.\\n /// @return returnData The returndata of the transaction (revert reason in case the transaction has failed).\\n /// @dev Note, that the `isSystem` flag can only be set when calling system contracts.\\n function systemCallWithReturndata(\\n uint32 gasLimit,\\n address to,\\n uint128 value,\\n bytes memory data\\n ) internal returns (bool success, bytes memory returnData) {\\n success = systemCall(gasLimit, to, value, data);\\n\\n uint256 size;\\n assembly {\\n size := returndatasize()\\n }\\n\\n returnData = new bytes(size);\\n assembly {\\n returndatacopy(add(returnData, 0x20), 0, size)\\n }\\n }\\n\\n /// @notice Makes a call with the `isSystem` flag.\\n /// @param gasLimit The gas limit for the call.\\n /// @param to The address to call.\\n /// @param value The value to pass with the transaction.\\n /// @param data The calldata.\\n /// @return returnData The returndata of the transaction. In case the transaction reverts, the error\\n /// bubbles up to the parent frame.\\n /// @dev Note, that the `isSystem` flag can only be set when calling system contracts.\\n function systemCallWithPropagatedRevert(\\n uint32 gasLimit,\\n address to,\\n uint128 value,\\n bytes memory data\\n ) internal returns (bytes memory returnData) {\\n bool success;\\n (success, returnData) = systemCallWithReturndata(gasLimit, to, value, data);\\n\\n if (!success) {\\n assembly {\\n let size := mload(returnData)\\n revert(add(returnData, 0x20), size)\\n }\\n }\\n }\\n\\n /// @notice Calculates the packed representation of the FarCallABI.\\n /// @param dataOffset Calldata offset in memory. Provide 0 unless using custom pointer.\\n /// @param memoryPage Memory page to use. Provide 0 unless using custom pointer.\\n /// @param dataStart The start of the calldata slice. Provide the offset in memory\\n /// if not using custom pointer.\\n /// @param dataLength The calldata length. Provide the length of the calldata in bytes\\n /// unless using custom pointer.\\n /// @param gasPassed The gas to pass with the call.\\n /// @param shardId Of the account to call. Currently only 0 is supported.\\n /// @param forwardingMode The forwarding mode to use:\\n /// - provide CalldataForwardingMode.UseHeap when using your current memory\\n /// - provide CalldataForwardingMode.ForwardFatPointer when using custom pointer.\\n /// @param isConstructorCall Whether the call will be a call to the constructor\\n /// (ignored when the caller is not a system contract).\\n /// @param isSystemCall Whether the call will have the `isSystem` flag.\\n /// @return farCallAbi The far call ABI.\\n /// @dev The `FarCallABI` has the following structure:\\n /// pub struct FarCallABI {\\n /// pub memory_quasi_fat_pointer: FatPointer,\\n /// pub gas_passed: u32,\\n /// pub shard_id: u8,\\n /// pub forwarding_mode: FarCallForwardPageType,\\n /// pub constructor_call: bool,\\n /// pub to_system: bool,\\n /// }\\n ///\\n /// The FatPointer struct:\\n ///\\n /// pub struct FatPointer {\\n /// pub offset: u32, // offset relative to `start`\\n /// pub memory_page: u32, // memory page where slice is located\\n /// pub start: u32, // absolute start of the slice\\n /// pub length: u32, // length of the slice\\n /// }\\n ///\\n /// @dev Note, that the actual layout is the following:\\n ///\\n /// [0..32) bits -- the calldata offset\\n /// [32..64) bits -- the memory page to use. Can be left blank in most of the cases.\\n /// [64..96) bits -- the absolute start of the slice\\n /// [96..128) bits -- the length of the slice.\\n /// [128..192) bits -- empty bits.\\n /// [192..224) bits -- gasPassed.\\n /// [224..232) bits -- forwarding_mode\\n /// [232..240) bits -- shard id.\\n /// [240..248) bits -- constructor call flag\\n /// [248..256] bits -- system call flag\\n function getFarCallABI(\\n uint32 dataOffset,\\n uint32 memoryPage,\\n uint32 dataStart,\\n uint32 dataLength,\\n uint32 gasPassed,\\n uint8 shardId,\\n CalldataForwardingMode forwardingMode,\\n bool isConstructorCall,\\n bool isSystemCall\\n ) internal pure returns (uint256 farCallAbi) {\\n // Fill in the call parameter fields\\n farCallAbi = getFarCallABIWithEmptyFatPointer({\\n gasPassed: gasPassed,\\n shardId: shardId,\\n forwardingMode: forwardingMode,\\n isConstructorCall: isConstructorCall,\\n isSystemCall: isSystemCall\\n });\\n\\n // Fill in the fat pointer fields\\n farCallAbi |= dataOffset;\\n farCallAbi |= (uint256(memoryPage) \u003C\u003C 32);\\n farCallAbi |= (uint256(dataStart) \u003C\u003C 64);\\n farCallAbi |= (uint256(dataLength) \u003C\u003C 96);\\n }\\n\\n /// @notice Calculates the packed representation of the FarCallABI with zero fat pointer fields.\\n /// @param gasPassed The gas to pass with the call.\\n /// @param shardId Of the account to call. Currently only 0 is supported.\\n /// @param forwardingMode The forwarding mode to use:\\n /// - provide CalldataForwardingMode.UseHeap when using your current memory\\n /// - provide CalldataForwardingMode.ForwardFatPointer when using custom pointer.\\n /// @param isConstructorCall Whether the call will be a call to the constructor\\n /// (ignored when the caller is not a system contract).\\n /// @param isSystemCall Whether the call will have the `isSystem` flag.\\n /// @return farCallAbiWithEmptyFatPtr The far call ABI with zero fat pointer fields.\\n function getFarCallABIWithEmptyFatPointer(\\n uint32 gasPassed,\\n uint8 shardId,\\n CalldataForwardingMode forwardingMode,\\n bool isConstructorCall,\\n bool isSystemCall\\n ) internal pure returns (uint256 farCallAbiWithEmptyFatPtr) {\\n farCallAbiWithEmptyFatPtr |= (uint256(gasPassed) \u003C\u003C 192);\\n farCallAbiWithEmptyFatPtr |= (uint256(forwardingMode) \u003C\u003C 224);\\n farCallAbiWithEmptyFatPtr |= (uint256(shardId) \u003C\u003C 232);\\n if (isConstructorCall) {\\n farCallAbiWithEmptyFatPtr |= (1 \u003C\u003C 240);\\n }\\n if (isSystemCall) {\\n farCallAbiWithEmptyFatPtr |= (1 \u003C\u003C 248);\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/IAccountCodeStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\ninterface IAccountCodeStorage {\\n function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external;\\n\\n function storeAccountConstructedCodeHash(address _address, bytes32 _hash) external;\\n\\n function markAccountCodeHashAsConstructed(address _address) external;\\n\\n function getRawCodeHash(address _address) external view returns (bytes32 codeHash);\\n\\n function getCodeHash(uint256 _input) external view returns (bytes32 codeHash);\\n\\n function getCodeSize(uint256 _input) external view returns (uint256 codeSize);\\n}\\n\"},\"contracts-preprocessed/interfaces/INonceHolder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @dev Interface of the nonce holder contract -- a contract used by the system to ensure\\n * that there is always a unique identifier for a transaction with a particular account (we call it nonce).\\n * In other words, the pair of (address, nonce) should always be unique.\\n * @dev Custom accounts should use methods of this contract to store nonces or other possible unique identifiers\\n * for the transaction.\\n */\\ninterface INonceHolder {\\n event ValueSetUnderNonce(address indexed accountAddress, uint256 indexed key, uint256 value);\\n\\n /// @dev Returns the current minimal nonce for account.\\n function getMinNonce(address _address) external view returns (uint256);\\n\\n /// @dev Returns the raw version of the current minimal nonce\\n /// (equal to minNonce + 2^128 * deployment nonce).\\n function getRawNonce(address _address) external view returns (uint256);\\n\\n /// @dev Increases the minimal nonce for the msg.sender.\\n function increaseMinNonce(uint256 _value) external returns (uint256);\\n\\n /// @dev Sets the nonce value `key` as used.\\n function setValueUnderNonce(uint256 _key, uint256 _value) external;\\n\\n /// @dev Gets the value stored inside a custom nonce.\\n function getValueUnderNonce(uint256 _key) external view returns (uint256);\\n\\n /// @dev A convenience method to increment the minimal nonce if it is equal\\n /// to the `_expectedNonce`.\\n function incrementMinNonceIfEquals(uint256 _expectedNonce) external;\\n\\n /// @dev Returns the deployment nonce for the accounts used for CREATE opcode.\\n function getDeploymentNonce(address _address) external view returns (uint256);\\n\\n /// @dev Increments the deployment nonce for the account and returns the previous one.\\n function incrementDeploymentNonce(address _address) external returns (uint256);\\n\\n /// @dev Determines whether a certain nonce has been already used for an account.\\n function validateNonceUsage(address _address, uint256 _key, bool _shouldBeUsed) external view;\\n\\n /// @dev Returns whether a nonce has been used for an account.\\n function isNonceUsed(address _address, uint256 _nonce) external view returns (bool);\\n}\\n\"},\"contracts-preprocessed/interfaces/IContractDeployer.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\ninterface IContractDeployer {\\n /// @notice Defines the version of the account abstraction protocol\\n /// that a contract claims to follow.\\n /// - `None` means that the account is just a contract and it should never be interacted\\n /// with as a custom account\\n /// - `Version1` means that the account follows the first version of the account abstraction protocol\\n enum AccountAbstractionVersion {\\n None,\\n Version1\\n }\\n\\n /// @notice Defines the nonce ordering used by the account\\n /// - `Sequential` means that it is expected that the nonces are monotonic and increment by 1\\n /// at a time (the same as EOAs).\\n /// - `Arbitrary` means that the nonces for the accounts can be arbitrary. The operator\\n /// should serve the transactions from such an account on a first-come-first-serve basis.\\n /// @dev This ordering is more of a suggestion to the operator on how the AA expects its transactions\\n /// to be processed and is not considered as a system invariant.\\n enum AccountNonceOrdering {\\n Sequential,\\n Arbitrary\\n }\\n\\n struct AccountInfo {\\n AccountAbstractionVersion supportedAAVersion;\\n AccountNonceOrdering nonceOrdering;\\n }\\n\\n event ContractDeployed(\\n address indexed deployerAddress,\\n bytes32 indexed bytecodeHash,\\n address indexed contractAddress\\n );\\n\\n event AccountNonceOrderingUpdated(address indexed accountAddress, AccountNonceOrdering nonceOrdering);\\n\\n event AccountVersionUpdated(address indexed accountAddress, AccountAbstractionVersion aaVersion);\\n\\n function getNewAddressCreate2(\\n address _sender,\\n bytes32 _bytecodeHash,\\n bytes32 _salt,\\n bytes calldata _input\\n ) external view returns (address newAddress);\\n\\n function getNewAddressCreate(address _sender, uint256 _senderNonce) external pure returns (address newAddress);\\n\\n function create2(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input\\n ) external payable returns (address newAddress);\\n\\n function create2Account(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input,\\n AccountAbstractionVersion _aaVersion\\n ) external payable returns (address newAddress);\\n\\n /// @dev While the `_salt` parameter is not used anywhere here,\\n /// it is still needed for consistency between `create` and\\n /// `create2` functions (required by the compiler).\\n function create(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input\\n ) external payable returns (address newAddress);\\n\\n /// @dev While `_salt` is never used here, we leave it here as a parameter\\n /// for the consistency with the `create` function.\\n function createAccount(\\n bytes32 _salt,\\n bytes32 _bytecodeHash,\\n bytes calldata _input,\\n AccountAbstractionVersion _aaVersion\\n ) external payable returns (address newAddress);\\n\\n /// @notice Returns the information about a certain AA.\\n function getAccountInfo(address _address) external view returns (AccountInfo memory info);\\n\\n /// @notice Can be called by an account to update its account version\\n function updateAccountVersion(AccountAbstractionVersion _version) external;\\n\\n /// @notice Can be called by an account to update its nonce ordering\\n function updateNonceOrdering(AccountNonceOrdering _nonceOrdering) external;\\n}\\n\"},\"contracts-preprocessed/interfaces/IKnownCodesStorage.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface for the KnownCodesStorage contract, which is responsible\\n * for storing the hashes of the bytecodes that have been published to the network.\\n */\\ninterface IKnownCodesStorage {\\n event MarkedAsKnown(bytes32 indexed bytecodeHash, bool indexed sendBytecodeToL1);\\n\\n function markFactoryDeps(bool _shouldSendToL1, bytes32[] calldata _hashes) external;\\n\\n function markBytecodeAsPublished(bytes32 _bytecodeHash) external;\\n\\n function getMarker(bytes32 _hash) external view returns (uint256);\\n}\\n\"},\"contracts-preprocessed/interfaces/IImmutableSimulator.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nstruct ImmutableData {\\n uint256 index;\\n bytes32 value;\\n}\\n\\ninterface IImmutableSimulator {\\n function getImmutable(address _dest, uint256 _index) external view returns (bytes32);\\n\\n function setImmutables(address _dest, ImmutableData[] calldata _immutables) external;\\n}\\n\"},\"contracts-preprocessed/interfaces/IBaseToken.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\ninterface IBaseToken {\\n function balanceOf(uint256) external view returns (uint256);\\n\\n function transferFromTo(address _from, address _to, uint256 _amount) external;\\n\\n function totalSupply() external view returns (uint256);\\n\\n function name() external pure returns (string memory);\\n\\n function symbol() external pure returns (string memory);\\n\\n function decimals() external pure returns (uint8);\\n\\n function mint(address _account, uint256 _amount) external;\\n\\n function withdraw(address _l1Receiver) external payable;\\n\\n function withdrawWithMessage(address _l1Receiver, bytes calldata _additionalData) external payable;\\n\\n event Mint(address indexed account, uint256 amount);\\n\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n event Withdrawal(address indexed _l2Sender, address indexed _l1Receiver, uint256 _amount);\\n\\n event WithdrawalWithMessage(\\n address indexed _l2Sender,\\n address indexed _l1Receiver,\\n uint256 _amount,\\n bytes _additionalData\\n );\\n}\\n\"},\"contracts-preprocessed/interfaces/IL1Messenger.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/// @dev The log passed from L2\\n/// @param l2ShardId The shard identifier, 0 - rollup, 1 - porter. All other values are not used but are reserved for the future\\n/// @param isService A boolean flag that is part of the log along with `key`, `value`, and `sender` address.\\n/// This field is required formally but does not have any special meaning.\\n/// @param txNumberInBlock The L2 transaction number in a block, in which the log was sent\\n/// @param sender The L2 address which sent the log\\n/// @param key The 32 bytes of information that was sent in the log\\n/// @param value The 32 bytes of information that was sent in the log\\n// Both `key` and `value` are arbitrary 32-bytes selected by the log sender\\nstruct L2ToL1Log {\\n uint8 l2ShardId;\\n bool isService;\\n uint16 txNumberInBlock;\\n address sender;\\n bytes32 key;\\n bytes32 value;\\n}\\n\\n/// @dev Bytes in raw L2 to L1 log\\n/// @dev Equal to the bytes size of the tuple - (uint8 ShardId, bool isService, uint16 txNumberInBlock, address sender, bytes32 key, bytes32 value)\\nuint256 constant L2_TO_L1_LOG_SERIALIZE_SIZE = 88;\\n\\n/// @dev The value of default leaf hash for L2 to L1 logs Merkle tree\\n/// @dev An incomplete fixed-size tree is filled with this value to be a full binary tree\\n/// @dev Actually equal to the `keccak256(new bytes(L2_TO_L1_LOG_SERIALIZE_SIZE))`\\nbytes32 constant L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH = 0x72abee45b59e344af8a6e520241c4744aff26ed411f4c4b00f8af09adada43ba;\\n\\n/// @dev The current version of state diff compression being used.\\nuint256 constant STATE_DIFF_COMPRESSION_VERSION_NUMBER = 1;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface of the L1 Messenger contract, responsible for sending messages to L1.\\n */\\ninterface IL1Messenger {\\n // Possibly in the future we will be able to track the messages sent to L1 with\\n // some hooks in the VM. For now, it is much easier to track them with L2 events.\\n event L1MessageSent(address indexed _sender, bytes32 indexed _hash, bytes _message);\\n\\n event L2ToL1LogSent(L2ToL1Log _l2log);\\n\\n event BytecodeL1PublicationRequested(bytes32 _bytecodeHash);\\n\\n function sendToL1(bytes memory _message) external returns (bytes32);\\n\\n function sendL2ToL1Log(bool _isService, bytes32 _key, bytes32 _value) external returns (uint256 logIdInMerkleTree);\\n\\n // This function is expected to be called only by the KnownCodesStorage system contract\\n function requestBytecodeL1Publication(bytes32 _bytecodeHash) external;\\n}\\n\"},\"contracts-preprocessed/interfaces/ICompressor.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n// The bitmask by applying which to the compressed state diff metadata we retrieve its operation.\\nuint8 constant OPERATION_BITMASK = 7;\\n// The number of bits shifting the compressed state diff metadata by which we retrieve its length.\\nuint8 constant LENGTH_BITS_OFFSET = 3;\\n// The maximal length in bytes that an enumeration index can have.\\nuint8 constant MAX_ENUMERATION_INDEX_SIZE = 8;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface for the Compressor contract, responsible for verifying the correctness of\\n * the compression of the state diffs and bytecodes.\\n */\\ninterface ICompressor {\\n function publishCompressedBytecode(\\n bytes calldata _bytecode,\\n bytes calldata _rawCompressedData\\n ) external returns (bytes32 bytecodeHash);\\n\\n function verifyCompressedStateDiffs(\\n uint256 _numberOfStateDiffs,\\n uint256 _enumerationIndexSize,\\n bytes calldata _stateDiffs,\\n bytes calldata _compressedStateDiffs\\n ) external returns (bytes32 stateDiffHash);\\n}\\n\"},\"contracts-preprocessed/interfaces/IComplexUpgrader.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice The interface for the ComplexUpgrader contract.\\n */\\ninterface IComplexUpgrader {\\n function upgrade(address _delegateTo, bytes calldata _calldata) external payable;\\n}\\n\"},\"contracts-preprocessed/interfaces/IBootloaderUtilities.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {Transaction} from \\\"../libraries/TransactionHelper.sol\\\";\\n\\ninterface IBootloaderUtilities {\\n function getTransactionHashes(\\n Transaction calldata _transaction\\n ) external view returns (bytes32 txHash, bytes32 signedTxHash);\\n}\\n\"},\"contracts-preprocessed/interfaces/IPubdataChunkPublisher.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Interface for contract responsible chunking pubdata into the appropriate size for EIP-4844 blobs.\\n */\\ninterface IPubdataChunkPublisher {\\n /// @notice Chunks pubdata into pieces that can fit into blobs.\\n /// @param _pubdata The total l2 to l1 pubdata that will be sent via L1 blobs.\\n function chunkAndPublishPubdata(bytes calldata _pubdata) external;\\n}\\n\"},\"contracts-preprocessed/libraries/Utils.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\npragma solidity 0.8.20;\\n\\nimport {EfficientCall} from \\\"./EfficientCall.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @dev Common utilities used in zkSync system contracts\\n */\\nlibrary Utils {\\n /// @dev Bit mask of bytecode hash \\\"isConstructor\\\" marker\\n bytes32 constant IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK =\\n 0x00ff000000000000000000000000000000000000000000000000000000000000;\\n\\n /// @dev Bit mask to set the \\\"isConstructor\\\" marker in the bytecode hash\\n bytes32 constant SET_IS_CONSTRUCTOR_MARKER_BIT_MASK =\\n 0x0001000000000000000000000000000000000000000000000000000000000000;\\n\\n function safeCastToU128(uint256 _x) internal pure returns (uint128) {\\n require(_x \u003C= type(uint128).max, \\\"Overflow\\\");\\n\\n return uint128(_x);\\n }\\n\\n function safeCastToU32(uint256 _x) internal pure returns (uint32) {\\n require(_x \u003C= type(uint32).max, \\\"Overflow\\\");\\n\\n return uint32(_x);\\n }\\n\\n function safeCastToU24(uint256 _x) internal pure returns (uint24) {\\n require(_x \u003C= type(uint24).max, \\\"Overflow\\\");\\n\\n return uint24(_x);\\n }\\n\\n /// @return codeLength The bytecode length in bytes\\n function bytecodeLenInBytes(bytes32 _bytecodeHash) internal pure returns (uint256 codeLength) {\\n codeLength = bytecodeLenInWords(_bytecodeHash) \u003C\u003C 5; // _bytecodeHash * 32\\n }\\n\\n /// @return codeLengthInWords The bytecode length in machine words\\n function bytecodeLenInWords(bytes32 _bytecodeHash) internal pure returns (uint256 codeLengthInWords) {\\n unchecked {\\n codeLengthInWords = uint256(uint8(_bytecodeHash[2])) * 256 + uint256(uint8(_bytecodeHash[3]));\\n }\\n }\\n\\n /// @notice Denotes whether bytecode hash corresponds to a contract that already constructed\\n function isContractConstructed(bytes32 _bytecodeHash) internal pure returns (bool) {\\n return _bytecodeHash[1] == 0x00;\\n }\\n\\n /// @notice Denotes whether bytecode hash corresponds to a contract that is on constructor or has already been constructed\\n function isContractConstructing(bytes32 _bytecodeHash) internal pure returns (bool) {\\n return _bytecodeHash[1] == 0x01;\\n }\\n\\n /// @notice Sets \\\"isConstructor\\\" flag to TRUE for the bytecode hash\\n /// @param _bytecodeHash The bytecode hash for which it is needed to set the constructing flag\\n /// @return The bytecode hash with \\\"isConstructor\\\" flag set to TRUE\\n function constructingBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) {\\n // Clear the \\\"isConstructor\\\" marker and set it to 0x01.\\n return constructedBytecodeHash(_bytecodeHash) | SET_IS_CONSTRUCTOR_MARKER_BIT_MASK;\\n }\\n\\n /// @notice Sets \\\"isConstructor\\\" flag to FALSE for the bytecode hash\\n /// @param _bytecodeHash The bytecode hash for which it is needed to set the constructing flag\\n /// @return The bytecode hash with \\\"isConstructor\\\" flag set to FALSE\\n function constructedBytecodeHash(bytes32 _bytecodeHash) internal pure returns (bytes32) {\\n return _bytecodeHash & ~IS_CONSTRUCTOR_BYTECODE_HASH_BIT_MASK;\\n }\\n\\n /// @notice Validate the bytecode format and calculate its hash.\\n /// @param _bytecode The bytecode to hash.\\n /// @return hashedBytecode The 32-byte hash of the bytecode.\\n /// Note: The function reverts the execution if the bytecode has non expected format:\\n /// - Bytecode bytes length is not a multiple of 32\\n /// - Bytecode bytes length is not less than 2^21 bytes (2^16 words)\\n /// - Bytecode words length is not odd\\n function hashL2Bytecode(bytes calldata _bytecode) internal view returns (bytes32 hashedBytecode) {\\n // Note that the length of the bytecode must be provided in 32-byte words.\\n require(_bytecode.length % 32 == 0, \\\"po\\\");\\n\\n uint256 lengthInWords = _bytecode.length / 32;\\n require(lengthInWords \u003C 2 ** 16, \\\"pp\\\"); // bytecode length must be less than 2^16 words\\n require(lengthInWords % 2 == 1, \\\"pr\\\"); // bytecode length in words must be odd\\n hashedBytecode =\\n EfficientCall.sha(_bytecode) &\\n 0x00000000FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF;\\n // Setting the version of the hash\\n hashedBytecode = (hashedBytecode | bytes32(uint256(1 \u003C\u003C 248)));\\n // Setting the length\\n hashedBytecode = hashedBytecode | bytes32(lengthInWords \u003C\u003C 224);\\n }\\n}\\n\"},\"contracts-preprocessed/libraries/TransactionHelper.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {IERC20} from \\\"../openzeppelin/token/ERC20/IERC20.sol\\\";\\nimport {SafeERC20} from \\\"../openzeppelin/token/ERC20/utils/SafeERC20.sol\\\";\\n\\nimport {IPaymasterFlow} from \\\"../interfaces/IPaymasterFlow.sol\\\";\\nimport {BASE_TOKEN_SYSTEM_CONTRACT, BOOTLOADER_FORMAL_ADDRESS} from \\\"../Constants.sol\\\";\\nimport {RLPEncoder} from \\\"./RLPEncoder.sol\\\";\\nimport {EfficientCall} from \\\"./EfficientCall.sol\\\";\\n\\n/// @dev The type id of zkSync's EIP-712-signed transaction.\\nuint8 constant EIP_712_TX_TYPE = 0x71;\\n\\n/// @dev The type id of legacy transactions.\\nuint8 constant LEGACY_TX_TYPE = 0x0;\\n/// @dev The type id of legacy transactions.\\nuint8 constant EIP_2930_TX_TYPE = 0x01;\\n/// @dev The type id of EIP1559 transactions.\\nuint8 constant EIP_1559_TX_TYPE = 0x02;\\n\\n/// @notice Structure used to represent a zkSync transaction.\\nstruct Transaction {\\n // The type of the transaction.\\n uint256 txType;\\n // The caller.\\n uint256 from;\\n // The callee.\\n uint256 to;\\n // The gasLimit to pass with the transaction.\\n // It has the same meaning as Ethereum's gasLimit.\\n uint256 gasLimit;\\n // The maximum amount of gas the user is willing to pay for a byte of pubdata.\\n uint256 gasPerPubdataByteLimit;\\n // The maximum fee per gas that the user is willing to pay.\\n // It is akin to EIP1559's maxFeePerGas.\\n uint256 maxFeePerGas;\\n // The maximum priority fee per gas that the user is willing to pay.\\n // It is akin to EIP1559's maxPriorityFeePerGas.\\n uint256 maxPriorityFeePerGas;\\n // The transaction's paymaster. If there is no paymaster, it is equal to 0.\\n uint256 paymaster;\\n // The nonce of the transaction.\\n uint256 nonce;\\n // The value to pass with the transaction.\\n uint256 value;\\n // In the future, we might want to add some\\n // new fields to the struct. The `txData` struct\\n // is to be passed to account and any changes to its structure\\n // would mean a breaking change to these accounts. In order to prevent this,\\n // we should keep some fields as \\\"reserved\\\".\\n // It is also recommended that their length is fixed, since\\n // it would allow easier proof integration (in case we will need\\n // some special circuit for preprocessing transactions).\\n uint256[4] reserved;\\n // The transaction's calldata.\\n bytes data;\\n // The signature of the transaction.\\n bytes signature;\\n // The properly formatted hashes of bytecodes that must be published on L1\\n // with the inclusion of this transaction. Note, that a bytecode has been published\\n // before, the user won't pay fees for its republishing.\\n bytes32[] factoryDeps;\\n // The input to the paymaster.\\n bytes paymasterInput;\\n // Reserved dynamic type for the future use-case. Using it should be avoided,\\n // But it is still here, just in case we want to enable some additional functionality.\\n bytes reservedDynamic;\\n}\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice Library is used to help custom accounts to work with common methods for the Transaction type.\\n */\\nlibrary TransactionHelper {\\n using SafeERC20 for IERC20;\\n\\n /// @notice The EIP-712 typehash for the contract's domain\\n bytes32 constant EIP712_DOMAIN_TYPEHASH = keccak256(\\\"EIP712Domain(string name,string version,uint256 chainId)\\\");\\n\\n bytes32 constant EIP712_TRANSACTION_TYPE_HASH =\\n keccak256(\\n \\\"Transaction(uint256 txType,uint256 from,uint256 to,uint256 gasLimit,uint256 gasPerPubdataByteLimit,uint256 maxFeePerGas,uint256 maxPriorityFeePerGas,uint256 paymaster,uint256 nonce,uint256 value,bytes data,bytes32[] factoryDeps,bytes paymasterInput)\\\"\\n );\\n\\n /// @notice Whether the token is Ethereum.\\n /// @param _addr The address of the token\\n /// @return `true` or `false` based on whether the token is Ether.\\n /// @dev This method assumes that address is Ether either if the address is 0 (for convenience)\\n /// or if the address is the address of the L2BaseToken system contract.\\n function isEthToken(uint256 _addr) internal pure returns (bool) {\\n return _addr == uint256(uint160(address(BASE_TOKEN_SYSTEM_CONTRACT))) || _addr == 0;\\n }\\n\\n /// @notice Calculate the suggested signed hash of the transaction,\\n /// i.e. the hash that is signed by EOAs and is recommended to be signed by other accounts.\\n function encodeHash(Transaction calldata _transaction) internal view returns (bytes32 resultHash) {\\n if (_transaction.txType == LEGACY_TX_TYPE) {\\n resultHash = _encodeHashLegacyTransaction(_transaction);\\n } else if (_transaction.txType == EIP_712_TX_TYPE) {\\n resultHash = _encodeHashEIP712Transaction(_transaction);\\n } else if (_transaction.txType == EIP_1559_TX_TYPE) {\\n resultHash = _encodeHashEIP1559Transaction(_transaction);\\n } else if (_transaction.txType == EIP_2930_TX_TYPE) {\\n resultHash = _encodeHashEIP2930Transaction(_transaction);\\n } else {\\n // Currently no other transaction types are supported.\\n // Any new transaction types will be processed in a similar manner.\\n revert(\\\"Encoding unsupported tx\\\");\\n }\\n }\\n\\n /// @notice Encode hash of the zkSync native transaction type.\\n /// @return keccak256 hash of the EIP-712 encoded representation of transaction\\n function _encodeHashEIP712Transaction(Transaction calldata _transaction) private view returns (bytes32) {\\n bytes32 structHash = keccak256(\\n // solhint-disable-next-line func-named-parameters\\n abi.encode(\\n EIP712_TRANSACTION_TYPE_HASH,\\n _transaction.txType,\\n _transaction.from,\\n _transaction.to,\\n _transaction.gasLimit,\\n _transaction.gasPerPubdataByteLimit,\\n _transaction.maxFeePerGas,\\n _transaction.maxPriorityFeePerGas,\\n _transaction.paymaster,\\n _transaction.nonce,\\n _transaction.value,\\n EfficientCall.keccak(_transaction.data),\\n keccak256(abi.encodePacked(_transaction.factoryDeps)),\\n EfficientCall.keccak(_transaction.paymasterInput)\\n )\\n );\\n\\n bytes32 domainSeparator = keccak256(\\n abi.encode(EIP712_DOMAIN_TYPEHASH, keccak256(\\\"zkSync\\\"), keccak256(\\\"2\\\"), block.chainid)\\n );\\n\\n return keccak256(abi.encodePacked(\\\"\\\\x19\\\\x01\\\", domainSeparator, structHash));\\n }\\n\\n /// @notice Encode hash of the legacy transaction type.\\n /// @return keccak256 of the serialized RLP encoded representation of transaction\\n function _encodeHashLegacyTransaction(Transaction calldata _transaction) private view returns (bytes32) {\\n // Hash of legacy transactions are encoded as one of the:\\n // - RLP(nonce, gasPrice, gasLimit, to, value, data, chainId, 0, 0)\\n // - RLP(nonce, gasPrice, gasLimit, to, value, data)\\n //\\n // In this RLP encoding, only the first one above list appears, so we encode each element\\n // inside list and then concatenate the length of all elements with them.\\n\\n bytes memory encodedNonce = RLPEncoder.encodeUint256(_transaction.nonce);\\n // Encode `gasPrice` and `gasLimit` together to prevent \\\"stack too deep error\\\".\\n bytes memory encodedGasParam;\\n {\\n bytes memory encodedGasPrice = RLPEncoder.encodeUint256(_transaction.maxFeePerGas);\\n bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit);\\n encodedGasParam = bytes.concat(encodedGasPrice, encodedGasLimit);\\n }\\n\\n bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to)));\\n bytes memory encodedValue = RLPEncoder.encodeUint256(_transaction.value);\\n // Encode only the length of the transaction data, and not the data itself,\\n // so as not to copy to memory a potentially huge transaction data twice.\\n bytes memory encodedDataLength;\\n {\\n // Safe cast, because the length of the transaction data can't be so large.\\n uint64 txDataLen = uint64(_transaction.data.length);\\n if (txDataLen != 1) {\\n // If the length is not equal to one, then only using the length can it be encoded definitely.\\n encodedDataLength = RLPEncoder.encodeNonSingleBytesLen(txDataLen);\\n } else if (_transaction.data[0] \u003E= 0x80) {\\n // If input is a byte in [0x80, 0xff] range, RLP encoding will concatenates 0x81 with the byte.\\n encodedDataLength = hex\\\"81\\\";\\n }\\n // Otherwise the length is not encoded at all.\\n }\\n\\n // Encode `chainId` according to EIP-155, but only if the `chainId` is specified in the transaction.\\n bytes memory encodedChainId;\\n if (_transaction.reserved[0] != 0) {\\n encodedChainId = bytes.concat(RLPEncoder.encodeUint256(block.chainid), hex\\\"80_80\\\");\\n }\\n\\n bytes memory encodedListLength;\\n unchecked {\\n uint256 listLength = encodedNonce.length +\\n encodedGasParam.length +\\n encodedTo.length +\\n encodedValue.length +\\n encodedDataLength.length +\\n _transaction.data.length +\\n encodedChainId.length;\\n\\n // Safe cast, because the length of the list can't be so large.\\n encodedListLength = RLPEncoder.encodeListLen(uint64(listLength));\\n }\\n\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n bytes.concat(\\n encodedListLength,\\n encodedNonce,\\n encodedGasParam,\\n encodedTo,\\n encodedValue,\\n encodedDataLength,\\n _transaction.data,\\n encodedChainId\\n )\\n );\\n }\\n\\n /// @notice Encode hash of the EIP2930 transaction type.\\n /// @return keccak256 of the serialized RLP encoded representation of transaction\\n function _encodeHashEIP2930Transaction(Transaction calldata _transaction) private view returns (bytes32) {\\n // Hash of EIP2930 transactions is encoded the following way:\\n // H(0x01 || RLP(chain_id, nonce, gas_price, gas_limit, destination, amount, data, access_list))\\n //\\n // Note, that on zkSync access lists are not supported and should always be empty.\\n\\n // Encode all fixed-length params to avoid \\\"stack too deep error\\\"\\n bytes memory encodedFixedLengthParams;\\n {\\n bytes memory encodedChainId = RLPEncoder.encodeUint256(block.chainid);\\n bytes memory encodedNonce = RLPEncoder.encodeUint256(_transaction.nonce);\\n bytes memory encodedGasPrice = RLPEncoder.encodeUint256(_transaction.maxFeePerGas);\\n bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit);\\n bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to)));\\n bytes memory encodedValue = RLPEncoder.encodeUint256(_transaction.value);\\n // solhint-disable-next-line func-named-parameters\\n encodedFixedLengthParams = bytes.concat(\\n encodedChainId,\\n encodedNonce,\\n encodedGasPrice,\\n encodedGasLimit,\\n encodedTo,\\n encodedValue\\n );\\n }\\n\\n // Encode only the length of the transaction data, and not the data itself,\\n // so as not to copy to memory a potentially huge transaction data twice.\\n bytes memory encodedDataLength;\\n {\\n // Safe cast, because the length of the transaction data can't be so large.\\n uint64 txDataLen = uint64(_transaction.data.length);\\n if (txDataLen != 1) {\\n // If the length is not equal to one, then only using the length can it be encoded definitely.\\n encodedDataLength = RLPEncoder.encodeNonSingleBytesLen(txDataLen);\\n } else if (_transaction.data[0] \u003E= 0x80) {\\n // If input is a byte in [0x80, 0xff] range, RLP encoding will concatenates 0x81 with the byte.\\n encodedDataLength = hex\\\"81\\\";\\n }\\n // Otherwise the length is not encoded at all.\\n }\\n\\n // On zkSync, access lists are always zero length (at least for now).\\n bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0);\\n\\n bytes memory encodedListLength;\\n unchecked {\\n uint256 listLength = encodedFixedLengthParams.length +\\n encodedDataLength.length +\\n _transaction.data.length +\\n encodedAccessListLength.length;\\n\\n // Safe cast, because the length of the list can't be so large.\\n encodedListLength = RLPEncoder.encodeListLen(uint64(listLength));\\n }\\n\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n bytes.concat(\\n \\\"\\\\x01\\\",\\n encodedListLength,\\n encodedFixedLengthParams,\\n encodedDataLength,\\n _transaction.data,\\n encodedAccessListLength\\n )\\n );\\n }\\n\\n /// @notice Encode hash of the EIP1559 transaction type.\\n /// @return keccak256 of the serialized RLP encoded representation of transaction\\n function _encodeHashEIP1559Transaction(Transaction calldata _transaction) private view returns (bytes32) {\\n // Hash of EIP1559 transactions is encoded the following way:\\n // H(0x02 || RLP(chain_id, nonce, max_priority_fee_per_gas, max_fee_per_gas, gas_limit, destination, amount, data, access_list))\\n //\\n // Note, that on zkSync access lists are not supported and should always be empty.\\n\\n // Encode all fixed-length params to avoid \\\"stack too deep error\\\"\\n bytes memory encodedFixedLengthParams;\\n {\\n bytes memory encodedChainId = RLPEncoder.encodeUint256(block.chainid);\\n bytes memory encodedNonce = RLPEncoder.encodeUint256(_transaction.nonce);\\n bytes memory encodedMaxPriorityFeePerGas = RLPEncoder.encodeUint256(_transaction.maxPriorityFeePerGas);\\n bytes memory encodedMaxFeePerGas = RLPEncoder.encodeUint256(_transaction.maxFeePerGas);\\n bytes memory encodedGasLimit = RLPEncoder.encodeUint256(_transaction.gasLimit);\\n bytes memory encodedTo = RLPEncoder.encodeAddress(address(uint160(_transaction.to)));\\n bytes memory encodedValue = RLPEncoder.encodeUint256(_transaction.value);\\n // solhint-disable-next-line func-named-parameters\\n encodedFixedLengthParams = bytes.concat(\\n encodedChainId,\\n encodedNonce,\\n encodedMaxPriorityFeePerGas,\\n encodedMaxFeePerGas,\\n encodedGasLimit,\\n encodedTo,\\n encodedValue\\n );\\n }\\n\\n // Encode only the length of the transaction data, and not the data itself,\\n // so as not to copy to memory a potentially huge transaction data twice.\\n bytes memory encodedDataLength;\\n {\\n // Safe cast, because the length of the transaction data can't be so large.\\n uint64 txDataLen = uint64(_transaction.data.length);\\n if (txDataLen != 1) {\\n // If the length is not equal to one, then only using the length can it be encoded definitely.\\n encodedDataLength = RLPEncoder.encodeNonSingleBytesLen(txDataLen);\\n } else if (_transaction.data[0] \u003E= 0x80) {\\n // If input is a byte in [0x80, 0xff] range, RLP encoding will concatenates 0x81 with the byte.\\n encodedDataLength = hex\\\"81\\\";\\n }\\n // Otherwise the length is not encoded at all.\\n }\\n\\n // On zkSync, access lists are always zero length (at least for now).\\n bytes memory encodedAccessListLength = RLPEncoder.encodeListLen(0);\\n\\n bytes memory encodedListLength;\\n unchecked {\\n uint256 listLength = encodedFixedLengthParams.length +\\n encodedDataLength.length +\\n _transaction.data.length +\\n encodedAccessListLength.length;\\n\\n // Safe cast, because the length of the list can't be so large.\\n encodedListLength = RLPEncoder.encodeListLen(uint64(listLength));\\n }\\n\\n return\\n keccak256(\\n // solhint-disable-next-line func-named-parameters\\n bytes.concat(\\n \\\"\\\\x02\\\",\\n encodedListLength,\\n encodedFixedLengthParams,\\n encodedDataLength,\\n _transaction.data,\\n encodedAccessListLength\\n )\\n );\\n }\\n\\n /// @notice Processes the common paymaster flows, e.g. setting proper allowance\\n /// for tokens, etc. For more information on the expected behavior, check out\\n /// the \\\"Paymaster flows\\\" section in the documentation.\\n function processPaymasterInput(Transaction calldata _transaction) internal {\\n require(_transaction.paymasterInput.length \u003E= 4, \\\"The standard paymaster input must be at least 4 bytes long\\\");\\n\\n bytes4 paymasterInputSelector = bytes4(_transaction.paymasterInput[0:4]);\\n if (paymasterInputSelector == IPaymasterFlow.approvalBased.selector) {\\n require(\\n _transaction.paymasterInput.length \u003E= 68,\\n \\\"The approvalBased paymaster input must be at least 68 bytes long\\\"\\n );\\n\\n // While the actual data consists of address, uint256 and bytes data,\\n // the data is needed only for the paymaster, so we ignore it here for the sake of optimization\\n (address token, uint256 minAllowance) = abi.decode(_transaction.paymasterInput[4:68], (address, uint256));\\n address paymaster = address(uint160(_transaction.paymaster));\\n\\n uint256 currentAllowance = IERC20(token).allowance(address(this), paymaster);\\n if (currentAllowance \u003C minAllowance) {\\n // Some tokens, e.g. USDT require that the allowance is firsty set to zero\\n // and only then updated to the new value.\\n\\n IERC20(token).safeApprove(paymaster, 0);\\n IERC20(token).safeApprove(paymaster, minAllowance);\\n }\\n } else if (paymasterInputSelector == IPaymasterFlow.general.selector) {\\n // Do nothing. general(bytes) paymaster flow means that the paymaster must interpret these bytes on his own.\\n } else {\\n revert(\\\"Unsupported paymaster flow\\\");\\n }\\n }\\n\\n /// @notice Pays the required fee for the transaction to the bootloader.\\n /// @dev Currently it pays the maximum amount \\\"_transaction.maxFeePerGas * _transaction.gasLimit\\\",\\n /// it will change in the future.\\n function payToTheBootloader(Transaction calldata _transaction) internal returns (bool success) {\\n address bootloaderAddr = BOOTLOADER_FORMAL_ADDRESS;\\n uint256 amount = _transaction.maxFeePerGas * _transaction.gasLimit;\\n\\n assembly {\\n success := call(gas(), bootloaderAddr, amount, 0, 0, 0, 0)\\n }\\n }\\n\\n // Returns the balance required to process the transaction.\\n function totalRequiredBalance(Transaction calldata _transaction) internal pure returns (uint256 requiredBalance) {\\n if (address(uint160(_transaction.paymaster)) != address(0)) {\\n // Paymaster pays for the fee\\n requiredBalance = _transaction.value;\\n } else {\\n // The user should have enough balance for both the fee and the value of the transaction\\n requiredBalance = _transaction.maxFeePerGas * _transaction.gasLimit + _transaction.value;\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/libraries/EfficientCall.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\nimport {SystemContractHelper, ADDRESS_MASK} from \\\"./SystemContractHelper.sol\\\";\\nimport {SystemContractsCaller, CalldataForwardingMode, RAW_FAR_CALL_BY_REF_CALL_ADDRESS, SYSTEM_CALL_BY_REF_CALL_ADDRESS, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, MIMIC_CALL_BY_REF_CALL_ADDRESS} from \\\"./SystemContractsCaller.sol\\\";\\nimport {Utils} from \\\"./Utils.sol\\\";\\nimport {SHA256_SYSTEM_CONTRACT, KECCAK256_SYSTEM_CONTRACT, MSG_VALUE_SYSTEM_CONTRACT} from \\\"../Constants.sol\\\";\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice This library is used to perform ultra-efficient calls using zkEVM-specific features.\\n * @dev EVM calls always accept a memory slice as input and return a memory slice as output.\\n * Therefore, even if the user has a ready-made calldata slice, they still need to copy it to memory\\n * before calling. This is especially inefficient for large inputs (proxies, multi-calls, etc.).\\n * In turn, zkEVM operates over a fat pointer, which is a set of (memory page, offset, start, length) in the memory/calldata/returndata.\\n * This allows forwarding the calldata slice as is, without copying it to memory.\\n * @dev Fat pointer is not just an integer, it is an extended data type supported on the VM level.\\n * zkEVM creates the wellformed fat pointers for all the calldata/returndata regions, later\\n * the contract may manipulate the already created fat pointers to forward a slice of the data, but not\\n * to create new fat pointers!\\n * @dev The allowed operation on fat pointers are:\\n * 1. `ptr.add` - Transforms `ptr.offset` into `ptr.offset + u32(_value)`. If overflow happens then it panics.\\n * 2. `ptr.sub` - Transforms `ptr.offset` into `ptr.offset - u32(_value)`. If underflow happens then it panics.\\n * 3. `ptr.pack` - Do the concatenation between the lowest 128 bits of the pointer itself and the highest 128 bits of `_value`. It is typically used to prepare the ABI for external calls.\\n * 4. `ptr.shrink` - Transforms `ptr.length` into `ptr.length - u32(_shrink)`. If underflow happens then it panics.\\n * @dev The call opcodes accept the fat pointer and change it to its canonical form before passing it to the child call\\n * 1. `ptr.start` is transformed into `ptr.offset + ptr.start`\\n * 2. `ptr.length` is transformed into `ptr.length - ptr.offset`\\n * 3. `ptr.offset` is transformed into `0`\\n */\\nlibrary EfficientCall {\\n /// @notice Call the `keccak256` without copying calldata to memory.\\n /// @param _data The preimage data.\\n /// @return The `keccak256` hash.\\n function keccak(bytes calldata _data) internal view returns (bytes32) {\\n bytes memory returnData = staticCall(gasleft(), KECCAK256_SYSTEM_CONTRACT, _data);\\n require(returnData.length == 32, \\\"keccak256 returned invalid data\\\");\\n return bytes32(returnData);\\n }\\n\\n /// @notice Call the `sha256` precompile without copying calldata to memory.\\n /// @param _data The preimage data.\\n /// @return The `sha256` hash.\\n function sha(bytes calldata _data) internal view returns (bytes32) {\\n bytes memory returnData = staticCall(gasleft(), SHA256_SYSTEM_CONTRACT, _data);\\n require(returnData.length == 32, \\\"sha returned invalid data\\\");\\n return bytes32(returnData);\\n }\\n\\n /// @notice Perform a `call` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _value The `msg.value` to send.\\n /// @param _data The calldata to use for the call.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return returnData The copied to memory return data.\\n function call(\\n uint256 _gas,\\n address _address,\\n uint256 _value,\\n bytes calldata _data,\\n bool _isSystem\\n ) internal returns (bytes memory returnData) {\\n bool success = rawCall({_gas: _gas, _address: _address, _value: _value, _data: _data, _isSystem: _isSystem});\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `staticCall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return returnData The copied to memory return data.\\n function staticCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data\\n ) internal view returns (bytes memory returnData) {\\n bool success = rawStaticCall(_gas, _address, _data);\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `delegateCall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return returnData The copied to memory return data.\\n function delegateCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data\\n ) internal returns (bytes memory returnData) {\\n bool success = rawDelegateCall(_gas, _address, _data);\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `mimicCall` (a call with custom msg.sender) without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @param _whoToMimic The `msg.sender` for the next call.\\n /// @param _isConstructor Whether the call should contain the `isConstructor` flag.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return returnData The copied to memory return data.\\n function mimicCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data,\\n address _whoToMimic,\\n bool _isConstructor,\\n bool _isSystem\\n ) internal returns (bytes memory returnData) {\\n bool success = rawMimicCall({\\n _gas: _gas,\\n _address: _address,\\n _data: _data,\\n _whoToMimic: _whoToMimic,\\n _isConstructor: _isConstructor,\\n _isSystem: _isSystem\\n });\\n\\n returnData = _verifyCallResult(success);\\n }\\n\\n /// @notice Perform a `call` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _value The `msg.value` to send.\\n /// @param _data The calldata to use for the call.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return success whether the call was successful.\\n function rawCall(\\n uint256 _gas,\\n address _address,\\n uint256 _value,\\n bytes calldata _data,\\n bool _isSystem\\n ) internal returns (bool success) {\\n if (_value == 0) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, _isSystem);\\n\\n address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS;\\n assembly {\\n success := call(_address, callAddr, 0, 0, 0xFFFF, 0, 0)\\n }\\n } else {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, true);\\n\\n // If there is provided `msg.value` call the `MsgValueSimulator` to forward ether.\\n address msgValueSimulator = MSG_VALUE_SYSTEM_CONTRACT;\\n address callAddr = SYSTEM_CALL_BY_REF_CALL_ADDRESS;\\n // We need to supply the mask to the MsgValueSimulator to denote\\n // that the call should be a system one.\\n uint256 forwardMask = _isSystem ? MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT : 0;\\n\\n assembly {\\n success := call(msgValueSimulator, callAddr, _value, _address, 0xFFFF, forwardMask, 0)\\n }\\n }\\n }\\n\\n /// @notice Perform a `staticCall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return success whether the call was successful.\\n function rawStaticCall(uint256 _gas, address _address, bytes calldata _data) internal view returns (bool success) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, false);\\n\\n address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS;\\n assembly {\\n success := staticcall(_address, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Perform a `delegatecall` without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @return success whether the call was successful.\\n function rawDelegateCall(uint256 _gas, address _address, bytes calldata _data) internal returns (bool success) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, false, false);\\n\\n address callAddr = RAW_FAR_CALL_BY_REF_CALL_ADDRESS;\\n assembly {\\n success := delegatecall(_address, callAddr, 0, 0xFFFF, 0, 0)\\n }\\n }\\n\\n /// @notice Perform a `mimicCall` (call with custom msg.sender) without copying calldata to memory.\\n /// @param _gas The gas to use for the call.\\n /// @param _address The address to call.\\n /// @param _data The calldata to use for the call.\\n /// @param _whoToMimic The `msg.sender` for the next call.\\n /// @param _isConstructor Whether the call should contain the `isConstructor` flag.\\n /// @param _isSystem Whether the call should contain the `isSystem` flag.\\n /// @return success whether the call was successful.\\n /// @dev If called not in kernel mode, it will result in a revert (enforced by the VM)\\n function rawMimicCall(\\n uint256 _gas,\\n address _address,\\n bytes calldata _data,\\n address _whoToMimic,\\n bool _isConstructor,\\n bool _isSystem\\n ) internal returns (bool success) {\\n _loadFarCallABIIntoActivePtr(_gas, _data, _isConstructor, _isSystem);\\n\\n address callAddr = MIMIC_CALL_BY_REF_CALL_ADDRESS;\\n uint256 cleanupMask = ADDRESS_MASK;\\n assembly {\\n // Clearing values before usage in assembly, since Solidity\\n // doesn't do it by default\\n _whoToMimic := and(_whoToMimic, cleanupMask)\\n\\n success := call(_address, callAddr, 0, 0, _whoToMimic, 0, 0)\\n }\\n }\\n\\n /// @dev Verify that a low-level call was successful, and revert if it wasn't, by bubbling the revert reason.\\n /// @param _success Whether the call was successful.\\n /// @return returnData The copied to memory return data.\\n function _verifyCallResult(bool _success) private pure returns (bytes memory returnData) {\\n if (_success) {\\n uint256 size;\\n assembly {\\n size := returndatasize()\\n }\\n\\n returnData = new bytes(size);\\n assembly {\\n returndatacopy(add(returnData, 0x20), 0, size)\\n }\\n } else {\\n propagateRevert();\\n }\\n }\\n\\n /// @dev Propagate the revert reason from the current call to the caller.\\n function propagateRevert() internal pure {\\n assembly {\\n let size := returndatasize()\\n returndatacopy(0, 0, size)\\n revert(0, size)\\n }\\n }\\n\\n /// @dev Load the far call ABI into active ptr, that will be used for the next call by reference.\\n /// @param _gas The gas to be passed to the call.\\n /// @param _data The calldata to be passed to the call.\\n /// @param _isConstructor Whether the call is a constructor call.\\n /// @param _isSystem Whether the call is a system call.\\n function _loadFarCallABIIntoActivePtr(\\n uint256 _gas,\\n bytes calldata _data,\\n bool _isConstructor,\\n bool _isSystem\\n ) private view {\\n SystemContractHelper.loadCalldataIntoActivePtr();\\n\\n uint256 dataOffset;\\n assembly {\\n dataOffset := _data.offset\\n }\\n\\n // Safe to cast, offset is never bigger than `type(uint32).max`\\n SystemContractHelper.ptrAddIntoActive(uint32(dataOffset));\\n // Safe to cast, `data.length` is never bigger than `type(uint32).max`\\n uint32 shrinkTo = uint32(msg.data.length - (_data.length + dataOffset));\\n SystemContractHelper.ptrShrinkIntoActive(shrinkTo);\\n\\n uint32 gas = Utils.safeCastToU32(_gas);\\n uint256 farCallAbi = SystemContractsCaller.getFarCallABIWithEmptyFatPointer({\\n gasPassed: gas,\\n // Only rollup is supported for now\\n shardId: 0,\\n forwardingMode: CalldataForwardingMode.ForwardFatPointer,\\n isConstructorCall: _isConstructor,\\n isSystemCall: _isSystem\\n });\\n SystemContractHelper.ptrPackIntoActivePtr(farCallAbi);\\n }\\n}\\n\"},\"contracts-preprocessed/openzeppelin/token/ERC20/IERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 standard as defined in the EIP.\\n */\\ninterface IERC20 {\\n /**\\n * @dev Emitted when `value` tokens are moved from one account (`from`) to\\n * another (`to`).\\n *\\n * Note that `value` may be zero.\\n */\\n event Transfer(address indexed from, address indexed to, uint256 value);\\n\\n /**\\n * @dev Emitted when the allowance of a `spender` for an `owner` is set by\\n * a call to {approve}. `value` is the new allowance.\\n */\\n event Approval(address indexed owner, address indexed spender, uint256 value);\\n\\n /**\\n * @dev Returns the amount of tokens in existence.\\n */\\n function totalSupply() external view returns (uint256);\\n\\n /**\\n * @dev Returns the amount of tokens owned by `account`.\\n */\\n function balanceOf(address account) external view returns (uint256);\\n\\n /**\\n * @dev Moves `amount` tokens from the caller's account to `to`.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transfer(address to, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Returns the remaining number of tokens that `spender` will be\\n * allowed to spend on behalf of `owner` through {transferFrom}. This is\\n * zero by default.\\n *\\n * This value changes when {approve} or {transferFrom} are called.\\n */\\n function allowance(address owner, address spender) external view returns (uint256);\\n\\n /**\\n * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * IMPORTANT: Beware that changing an allowance with this method brings the risk\\n * that someone may use both the old and the new allowance by unfortunate\\n * transaction ordering. One possible solution to mitigate this race\\n * condition is to first reduce the spender's allowance to 0 and set the\\n * desired value afterwards:\\n * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729\\n *\\n * Emits an {Approval} event.\\n */\\n function approve(address spender, uint256 amount) external returns (bool);\\n\\n /**\\n * @dev Moves `amount` tokens from `from` to `to` using the\\n * allowance mechanism. `amount` is then deducted from the caller's\\n * allowance.\\n *\\n * Returns a boolean value indicating whether the operation succeeded.\\n *\\n * Emits a {Transfer} event.\\n */\\n function transferFrom(\\n address from,\\n address to,\\n uint256 amount\\n ) external returns (bool);\\n}\\n\"},\"contracts-preprocessed/openzeppelin/token/ERC20/utils/SafeERC20.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)\\n\\npragma solidity ^0.8.0;\\n\\nimport {IERC20} from \\\"../IERC20.sol\\\";\\nimport {IERC20Permit} from \\\"../extensions/IERC20Permit.sol\\\";\\nimport {Address} from \\\"../../../utils/Address.sol\\\";\\n\\n/**\\n * @title SafeERC20\\n * @dev Wrappers around ERC20 operations that throw on failure (when the token\\n * contract returns false). Tokens that return no value (and instead revert or\\n * throw on failure) are also supported, non-reverting calls are assumed to be\\n * successful.\\n * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,\\n * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.\\n */\\nlibrary SafeERC20 {\\n using Address for address;\\n\\n function safeTransfer(\\n IERC20 token,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(token.transfer.selector, to, value)\\n );\\n }\\n\\n function safeTransferFrom(\\n IERC20 token,\\n address from,\\n address to,\\n uint256 value\\n ) internal {\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(token.transferFrom.selector, from, to, value)\\n );\\n }\\n\\n /**\\n * @dev Deprecated. This function has issues similar to the ones found in\\n * {IERC20-approve}, and its usage is discouraged.\\n *\\n * Whenever possible, use {safeIncreaseAllowance} and\\n * {safeDecreaseAllowance} instead.\\n */\\n function safeApprove(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n // safeApprove should only be called when setting an initial allowance,\\n // or when resetting it to zero. To increase and decrease it, use\\n // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'\\n require(\\n (value == 0) || (token.allowance(address(this), spender) == 0),\\n \\\"SafeERC20: approve from non-zero to non-zero allowance\\\"\\n );\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(token.approve.selector, spender, value)\\n );\\n }\\n\\n function safeIncreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n uint256 newAllowance = token.allowance(address(this), spender) + value;\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(\\n token.approve.selector,\\n spender,\\n newAllowance\\n )\\n );\\n }\\n\\n function safeDecreaseAllowance(\\n IERC20 token,\\n address spender,\\n uint256 value\\n ) internal {\\n unchecked {\\n uint256 oldAllowance = token.allowance(address(this), spender);\\n require(\\n oldAllowance \u003E= value,\\n \\\"SafeERC20: decreased allowance below zero\\\"\\n );\\n uint256 newAllowance = oldAllowance - value;\\n _callOptionalReturn(\\n token,\\n abi.encodeWithSelector(\\n token.approve.selector,\\n spender,\\n newAllowance\\n )\\n );\\n }\\n }\\n\\n function safePermit(\\n IERC20Permit token,\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) internal {\\n uint256 nonceBefore = token.nonces(owner);\\n token.permit({owner: owner, spender: spender, value: value, deadline : deadline, v: v, r: r, s: s});\\n uint256 nonceAfter = token.nonces(owner);\\n require(\\n nonceAfter == nonceBefore + 1,\\n \\\"SafeERC20: permit did not succeed\\\"\\n );\\n }\\n\\n /**\\n * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement\\n * on the return value: the return value is optional (but if data is returned, it must not be false).\\n * @param token The token targeted by the call.\\n * @param data The call data (encoded using abi.encode or one of its variants).\\n */\\n function _callOptionalReturn(IERC20 token, bytes memory data) private {\\n // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since\\n // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that\\n // the target address contains contract code and also asserts for success in the low-level call.\\n\\n bytes memory returndata = address(token).functionCall(\\n data,\\n \\\"SafeERC20: low-level call failed\\\"\\n );\\n if (returndata.length \u003E 0) {\\n // Return data is optional\\n require(\\n abi.decode(returndata, (bool)),\\n \\\"SafeERC20: ERC20 operation did not succeed\\\"\\n );\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/interfaces/IPaymasterFlow.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @dev The interface that is used for encoding/decoding of\\n * different types of paymaster flows.\\n * @notice This is NOT an interface to be implemented\\n * by contracts. It is just used for encoding.\\n */\\ninterface IPaymasterFlow {\\n function general(bytes calldata input) external;\\n\\n function approvalBased(address _token, uint256 _minAllowance, bytes calldata _innerInput) external;\\n}\\n\"},\"contracts-preprocessed/libraries/RLPEncoder.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n\\npragma solidity 0.8.20;\\n\\n/**\\n * @author Matter Labs\\n * @custom:security-contact security@matterlabs.dev\\n * @notice This library provides RLP encoding functionality.\\n */\\nlibrary RLPEncoder {\\n function encodeAddress(address _val) internal pure returns (bytes memory encoded) {\\n // The size is equal to 20 bytes of the address itself + 1 for encoding bytes length in RLP.\\n encoded = new bytes(0x15);\\n\\n bytes20 shiftedVal = bytes20(_val);\\n assembly {\\n // In the first byte we write the encoded length as 0x80 + 0x14 == 0x94.\\n mstore(add(encoded, 0x20), 0x9400000000000000000000000000000000000000000000000000000000000000)\\n // Write address data without stripping zeros.\\n mstore(add(encoded, 0x21), shiftedVal)\\n }\\n }\\n\\n function encodeUint256(uint256 _val) internal pure returns (bytes memory encoded) {\\n unchecked {\\n if (_val \u003C 128) {\\n encoded = new bytes(1);\\n // Handle zero as a non-value, since stripping zeroes results in an empty byte array\\n encoded[0] = (_val == 0) ? bytes1(uint8(128)) : bytes1(uint8(_val));\\n } else {\\n uint256 hbs = _highestByteSet(_val);\\n\\n encoded = new bytes(hbs + 2);\\n encoded[0] = bytes1(uint8(hbs + 0x81));\\n\\n uint256 lbs = 31 - hbs;\\n uint256 shiftedVal = _val \u003C\u003C (lbs * 8);\\n\\n assembly {\\n mstore(add(encoded, 0x21), shiftedVal)\\n }\\n }\\n }\\n }\\n\\n /// @notice Encodes the size of bytes in RLP format.\\n /// @param _len The length of the bytes to encode. It has a `uint64` type since as larger values are not supported.\\n /// NOTE: panics if the length is 1 since the length encoding is ambiguous in this case.\\n function encodeNonSingleBytesLen(uint64 _len) internal pure returns (bytes memory) {\\n assert(_len != 1);\\n return _encodeLength(_len, 0x80);\\n }\\n\\n /// @notice Encodes the size of list items in RLP format.\\n /// @param _len The length of the bytes to encode. It has a `uint64` type since as larger values are not supported.\\n function encodeListLen(uint64 _len) internal pure returns (bytes memory) {\\n return _encodeLength(_len, 0xc0);\\n }\\n\\n function _encodeLength(uint64 _len, uint256 _offset) private pure returns (bytes memory encoded) {\\n unchecked {\\n if (_len \u003C 56) {\\n encoded = new bytes(1);\\n encoded[0] = bytes1(uint8(_len + _offset));\\n } else {\\n uint256 hbs = _highestByteSet(uint256(_len));\\n\\n encoded = new bytes(hbs + 2);\\n encoded[0] = bytes1(uint8(_offset + hbs + 56));\\n\\n uint256 lbs = 31 - hbs;\\n uint256 shiftedVal = uint256(_len) \u003C\u003C (lbs * 8);\\n\\n assembly {\\n mstore(add(encoded, 0x21), shiftedVal)\\n }\\n }\\n }\\n }\\n\\n /// @notice Computes the index of the highest byte set in number.\\n /// @notice Uses little endian ordering (The least significant byte has index `0`).\\n /// NOTE: returns `0` for `0`\\n function _highestByteSet(uint256 _number) private pure returns (uint256 hbs) {\\n unchecked {\\n if (_number \u003E type(uint128).max) {\\n _number \u003E\u003E= 128;\\n hbs += 16;\\n }\\n if (_number \u003E type(uint64).max) {\\n _number \u003E\u003E= 64;\\n hbs += 8;\\n }\\n if (_number \u003E type(uint32).max) {\\n _number \u003E\u003E= 32;\\n hbs += 4;\\n }\\n if (_number \u003E type(uint16).max) {\\n _number \u003E\u003E= 16;\\n hbs += 2;\\n }\\n if (_number \u003E type(uint8).max) {\\n hbs += 1;\\n }\\n }\\n }\\n}\\n\"},\"contracts-preprocessed/openzeppelin/token/ERC20/extensions/IERC20Permit.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Permit.sol)\\n\\npragma solidity ^0.8.0;\\n\\n/**\\n * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in\\n * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].\\n *\\n * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by\\n * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't\\n * need to send a transaction, and thus is not required to hold Ether at all.\\n */\\ninterface IERC20Permit {\\n /**\\n * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,\\n * given ``owner``'s signed approval.\\n *\\n * IMPORTANT: The same issues {IERC20-approve} has related to transaction\\n * ordering also apply here.\\n *\\n * Emits an {Approval} event.\\n *\\n * Requirements:\\n *\\n * - `spender` cannot be the zero address.\\n * - `deadline` must be a timestamp in the future.\\n * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`\\n * over the EIP712-formatted function arguments.\\n * - the signature must use ``owner``'s current nonce (see {nonces}).\\n *\\n * For more information on the signature format, see the\\n * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP\\n * section].\\n */\\n function permit(\\n address owner,\\n address spender,\\n uint256 value,\\n uint256 deadline,\\n uint8 v,\\n bytes32 r,\\n bytes32 s\\n ) external;\\n\\n /**\\n * @dev Returns the current nonce for `owner`. This value must be\\n * included whenever a signature is generated for {permit}.\\n *\\n * Every successful call to {permit} increases ``owner``'s nonce by one. This\\n * prevents a signature from being used multiple times.\\n */\\n function nonces(address owner) external view returns (uint256);\\n\\n /**\\n * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.\\n */\\n // solhint-disable-next-line func-name-mixedcase\\n function DOMAIN_SEPARATOR() external view returns (bytes32);\\n}\\n\"},\"contracts-preprocessed/openzeppelin/utils/Address.sol\":{\"content\":\"// SPDX-License-Identifier: MIT\\n// OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol)\\n\\npragma solidity ^0.8.1;\\n\\n/**\\n * @dev Collection of functions related to the address type\\n */\\nlibrary Address {\\n /**\\n * @dev Returns true if `account` is a contract.\\n *\\n * [IMPORTANT]\\n * ====\\n * It is unsafe to assume that an address for which this function returns\\n * false is an externally-owned account (EOA) and not a contract.\\n *\\n * Among others, `isContract` will return false for the following\\n * types of addresses:\\n *\\n * - an externally-owned account\\n * - a contract in construction\\n * - an address where a contract will be created\\n * - an address where a contract lived, but was destroyed\\n * ====\\n *\\n * [IMPORTANT]\\n * ====\\n * You shouldn't rely on `isContract` to protect against flash loan attacks!\\n *\\n * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets\\n * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract\\n * constructor.\\n * ====\\n */\\n function isContract(address account) internal view returns (bool) {\\n // This method relies on extcodesize/address.code.length, which returns 0\\n // for contracts in construction, since the code is only stored at the end\\n // of the constructor execution.\\n\\n return account.code.length \u003E 0;\\n }\\n\\n /**\\n * @dev Replacement for Solidity's `transfer`: sends `amount` wei to\\n * `recipient`, forwarding all available gas and reverting on errors.\\n *\\n * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost\\n * of certain opcodes, possibly making contracts go over the 2300 gas limit\\n * imposed by `transfer`, making them unable to receive funds via\\n * `transfer`. {sendValue} removes this limitation.\\n *\\n * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].\\n *\\n * IMPORTANT: because control is transferred to `recipient`, care must be\\n * taken to not create reentrancy vulnerabilities. Consider using\\n * {ReentrancyGuard} or the\\n * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].\\n */\\n function sendValue(address payable recipient, uint256 amount) internal {\\n require(\\n address(this).balance \u003E= amount,\\n \\\"Address: insufficient balance\\\"\\n );\\n\\n (bool success, ) = recipient.call{value: amount}(\\\"\\\");\\n require(\\n success,\\n \\\"Address: unable to send value, recipient may have reverted\\\"\\n );\\n }\\n\\n /**\\n * @dev Performs a Solidity function call using a low level `call`. A\\n * plain `call` is an unsafe replacement for a function call: use this\\n * function instead.\\n *\\n * If `target` reverts with a revert reason, it is bubbled up by this\\n * function (like regular Solidity function calls).\\n *\\n * Returns the raw returned data. To convert to the expected return value,\\n * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].\\n *\\n * Requirements:\\n *\\n * - `target` must be a contract.\\n * - calling `target` with `data` must not revert.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(address target, bytes memory data)\\n internal\\n returns (bytes memory)\\n {\\n return\\n functionCallWithValue(\\n target,\\n data,\\n 0,\\n \\\"Address: low-level call failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with\\n * `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n return functionCallWithValue(target, data, 0, errorMessage);\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but also transferring `value` wei to `target`.\\n *\\n * Requirements:\\n *\\n * - the calling contract must have an ETH balance of at least `value`.\\n * - the called Solidity function must be `payable`.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value\\n ) internal returns (bytes memory) {\\n return\\n functionCallWithValue(\\n target,\\n data,\\n value,\\n \\\"Address: low-level call with value failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but\\n * with `errorMessage` as a fallback revert reason when `target` reverts.\\n *\\n * _Available since v3.1._\\n */\\n function functionCallWithValue(\\n address target,\\n bytes memory data,\\n uint256 value,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n require(\\n address(this).balance \u003E= value,\\n \\\"Address: insufficient balance for call\\\"\\n );\\n (bool success, bytes memory returndata) = target.call{value: value}(\\n data\\n );\\n return\\n verifyCallResultFromTarget(\\n target,\\n success,\\n returndata,\\n errorMessage\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(address target, bytes memory data)\\n internal\\n view\\n returns (bytes memory)\\n {\\n return\\n functionStaticCall(\\n target,\\n data,\\n \\\"Address: low-level static call failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a static call.\\n *\\n * _Available since v3.3._\\n */\\n function functionStaticCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.staticcall(data);\\n return\\n verifyCallResultFromTarget(\\n target,\\n success,\\n returndata,\\n errorMessage\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(address target, bytes memory data)\\n internal\\n returns (bytes memory)\\n {\\n return\\n functionDelegateCall(\\n target,\\n data,\\n \\\"Address: low-level delegate call failed\\\"\\n );\\n }\\n\\n /**\\n * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],\\n * but performing a delegate call.\\n *\\n * _Available since v3.4._\\n */\\n function functionDelegateCall(\\n address target,\\n bytes memory data,\\n string memory errorMessage\\n ) internal returns (bytes memory) {\\n (bool success, bytes memory returndata) = target.delegatecall(data);\\n return\\n verifyCallResultFromTarget(\\n target,\\n success,\\n returndata,\\n errorMessage\\n );\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling\\n * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.\\n *\\n * _Available since v4.8._\\n */\\n function verifyCallResultFromTarget(\\n address target,\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal view returns (bytes memory) {\\n if (success) {\\n if (returndata.length == 0) {\\n // only check isContract if the call was successful and the return data is empty\\n // otherwise we already know that it was a contract\\n require(isContract(target), \\\"Address: call to non-contract\\\");\\n }\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n /**\\n * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the\\n * revert reason or using the provided one.\\n *\\n * _Available since v4.3._\\n */\\n function verifyCallResult(\\n bool success,\\n bytes memory returndata,\\n string memory errorMessage\\n ) internal pure returns (bytes memory) {\\n if (success) {\\n return returndata;\\n } else {\\n _revert(returndata, errorMessage);\\n }\\n }\\n\\n function _revert(bytes memory returndata, string memory errorMessage)\\n private\\n pure\\n {\\n // Look for revert reason and bubble it up if present\\n if (returndata.length \u003E 0) {\\n // The easiest way to bubble the revert reason is using memory via assembly\\n /// @solidity memory-safe-assembly\\n assembly {\\n let returndata_size := mload(returndata)\\n revert(add(32, returndata), returndata_size)\\n }\\n } else {\\n revert(errorMessage);\\n }\\n }\\n}\\n\"}},\"settings\":{\"optimizer\":{\"enabled\":true,\"mode\":\"3\"},\"outputSelection\":{\"*\":{\"*\":[\"storageLayout\",\"abi\",\"evm.methodIdentifiers\",\"metadata\"],\"\":[\"ast\"]}},\"evmVersion\":\"paris\",\"libraries\":{}}}}",
"ABI": "[{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_txHash\",\"type\":\"bytes32\"}],\"name\":\"appendTransactionToCurrentL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"baseFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockGasLimit\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_blockNumber\",\"type\":\"uint256\"}],\"name\":\"blockHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"chainId\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"coinbase\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"currentBlockInfo\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockInfo\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"difficulty\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPerPubdataByte\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasPrice\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_batchNumber\",\"type\":\"uint256\"}],\"name\":\"getBatchHash\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBatchNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"batchNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"batchTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_block\",\"type\":\"uint256\"}],\"name\":\"getBlockHashEVM\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"hash\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumber\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"blockNumber\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"blockTimestamp\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getBlockTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataCost\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getCurrentPubdataSpent\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getL2BlockNumberAndTimestamp\",\"outputs\":[{\"internalType\":\"uint128\",\"name\":\"blockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"blockTimestamp\",\"type\":\"uint128\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"incrementTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"origin\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"publishTimestampDataToL1\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"resetTxNumberInBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newChainId\",\"type\":\"uint256\"}],\"name\":\"setChainId\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPrice\",\"type\":\"uint256\"}],\"name\":\"setGasPrice\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint128\",\"name\":\"_l2BlockNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_l2BlockTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"bytes32\",\"name\":\"_expectedPrevL2BlockHash\",\"type\":\"bytes32\"},{\"internalType\":\"bool\",\"name\":\"_isFirstInBatch\",\"type\":\"bool\"},{\"internalType\":\"uint128\",\"name\":\"_maxVirtualBlocksToCreate\",\"type\":\"uint128\"}],\"name\":\"setL2Block\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"_prevBatchHash\",\"type\":\"bytes32\"},{\"internalType\":\"uint128\",\"name\":\"_newTimestamp\",\"type\":\"uint128\"},{\"internalType\":\"uint128\",\"name\":\"_expectedNewNumber\",\"type\":\"uint128\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"setNewBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_gasPerPubdataByte\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_basePubdataSpent\",\"type\":\"uint256\"}],\"name\":\"setPubdataInfo\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"_newOrigin\",\"type\":\"address\"}],\"name\":\"setTxOrigin\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"txNumberInBlock\",\"outputs\":[{\"internalType\":\"uint16\",\"name\":\"\",\"type\":\"uint16\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"_newTimestamp\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_number\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"_baseFee\",\"type\":\"uint256\"}],\"name\":\"unsafeOverrideBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"}]",
"ContractName": "SystemContext",
"CompilerVersion": "v0.8.20+commit.a1b79de6",
"OptimizationUsed": "1",
"Runs": "200",
"ConstructorArguments": "",
"EVMVersion": "Default",
"Library": "",
"LicenseType": "MIT",
"Proxy": "0",
"Implementation": "",
"SwarmSource": ""
}
]
}
Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.
https://api.abscan.org/api
?module=contract
&action=getcontractcreation
&contractaddresses=0x000000000000000000000000000000000000800B,0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45,0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad,0xdAC17F958D2ee523a2206206994597C13D831ec7,0xf5b969064b91869fBF676ecAbcCd1c5563F591d0
&apikey=YourApiKeyToken
Query Parameters
contractaddresses
the contract address
, up to 5 at a time
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"contractAddress": "0x000000000000000000000000000000000000800b",
"contractCreator": "GENESIS",
"txHash": "GENESIS_000000000000000000000000000000000000800b",
"blockNumber": "0",
"timestamp": "1729881083",
"contractFactory": "",
"creationBytecode": "0x0001000000000002000600000000000200000000000103550000008004000039000000400040043f000000000301001900000060033002700000013c033001970000000102200190000000210000c13d000000040230008c000003fc0000413d000000000201043b000000e002200270000001410520009c000000340000a13d000001420420009c000000680000213d0000014e0420009c000000a30000213d000001540420009c0000010c0000213d000001570420009c000000df0000613d000001580120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000010e01000039000000000101041a0000ffff0110018f000002700000013d0000000001000416000000000101004b000003fc0000c13d0000013d010000410000000302000039000000000012041b0000000401000039000000000201041a0000013e0220019700008001022001bf000000000021041b0000013f010000410000000502000039000000000012041b0000002001000039000001000010044300000120000004430000014001000041000004eb0001042e000001590520009c000000800000a13d0000015a0420009c000000b10000213d000001600120009c000001150000213d000001630120009c0000017b0000613d000001640120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000010f01000039000000000101041a0000014002000039000000400020043f00000000020004130000013c03200197000000800030043f00000040042002700000013c04400197000000a00040043f00000060042002700000013c04400197000000c00040043f000000e004200270000000ff0440018f000000e00040043f000000e804200270000000ff0440018f000001000040043f000000f002200270000000ff0220018f000001200020043f0000011002000039000000000202041a0000000002230049000000000332004b00000000030000190000000103002039000000000303004b000000000200c01900000000431200a9000000000401004b000000650000613d00000000411300d9000000000112004b0000024f0000c13d000001400030043f0000017a01000041000004eb0001042e000001430420009c000000d90000213d000001490420009c0000011e0000213d0000014c0420009c000001820000613d0000014d0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d000000040130008a000000200110008c000003fc0000413d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f00000004010000390000000001100367000000000101043b0000000202000039000002680000013d000001650520009c000000ee0000a13d000001660120009c000001270000213d000001690120009c000001970000613d0000016a0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d000000040130008a000000600110008c000003fc0000413d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f000000400100043d04ea049e0000040f00000000010003670000002402100370000000000202043b00000080022002100000000403100370000000000303043b0000016f03300197000000000223019f0000000703000039000000000023041b0000004401100370000000000101043b0000000602000039000002680000013d0000014f0120009c000001370000213d000001520120009c0000019c0000613d000001530120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d04ea04a90000040f0000016f022001970000008001100210000000000121019f0000023c0000013d0000015b0420009c000001420000213d0000015e0120009c000001a10000613d0000015f0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000000001000411000080010110008c000002810000c13d0000000701000039000000000301041a0000016f01300197000000800010043f0000008002300270000000a00020043f0000010002000039000000400020043f0000000902000039000000000402041a0000016f02400197000000c00020043f0000008004400270000000e00040043f0000016f0330009c0000028b0000213d0000017601000041000001000010043f0000002001000039000001040010043f0000002f01000039000001240010043f0000017701000041000001440010043f0000017801000041000001640010043f0000017901000041000004ec00010430000001440420009c000001720000213d000001470420009c000001220000613d000001480220009c000003fc0000c13d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000401100370000000000101043b00000000001004350000000801000039000000200010043f0000004002000039000000000100001904ea04cf0000040f0000026f0000013d0000016b0520009c000001a80000613d0000016c0520009c000001ea0000613d0000016d0220009c000003fc0000c13d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000002000411000080010220008c000002810000c13d0000000a02000039000600000002001d000000000202041a000000a00020043f0000000401100370000000000101043b000000c00010043f0000004002000039000000800020043f000000e001000039000000400010043f000000a00100003904ea04cf0000040f0000000602000029000002680000013d000001550120009c000002230000613d000001560120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d00000001010000390000013f0000013d000001610120009c000002330000613d000001620120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d00000003010000390000026f0000013d0000014a0120009c000002380000613d0000014b0120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d04ea04a90000040f000002270000013d000001670120009c000002440000613d000001680120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f0000010e01000039000000000201041a0000017b022001970000029c0000013d000001500120009c000002550000613d000001510120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d0000000401000039000000000101041a0000017201100197000002700000013d0000015c0420009c0000026b0000613d0000015d0220009c000003fc0000c13d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000401100370000000000101043b0000010c02000039000000000202041a000000c003000039000000400030043f00000080062002700000010d02000039000000000302041a0000016f05300197000000800050043f0000008002300270000000a00020043f000000000416004b0000000004000019000002af0000a13d0000000004160049000001010440008c0000000004000019000002af0000813d000000000451004b000002910000813d00000000001004350000000801000039000000200010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000175011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000000101043b000000000401041a000002af0000013d000001450420009c000002730000613d000001460120009c000003fc0000c13d0000000001000416000000000101004b000003fc0000c13d00000002010000390000026f0000013d0000000001000416000000000101004b000003fc0000c13d0000010c01000039000000000101041a0000008001100270000002700000013d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000401100370000000000101043b000600000001001d000001720110009c000003fc0000213d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f0000000101000039000000000201041a0000013e0220019700000006022001af0000029c0000013d0000000001000416000000000101004b000003fc0000c13d00000005010000390000026f0000013d0000000001000416000000000101004b000003fc0000c13d000000000100041a000002700000013d0000000001000416000000000101004b000003fc0000c13d0000010c01000039000000000101041a0000016f01100197000002700000013d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000800220008c000003fc0000413d0000000402100370000000000202043b000500000002001d0000002402100370000000000202043b000600000002001d0000016f0220009c000003fc0000213d0000004401100370000000000101043b000400000001001d0000016f0110009c000003fc0000213d0000000001000411000080010110008c000002810000c13d000000c001000039000000400010043f0000000704000039000000000104041a0000016f02100197000000800020043f0000008001100270000000a00010043f000000060220006b000002b70000a13d0000016f0210009c0000024f0000613d0000000102100039000000040220006c000002c00000c13d000300000004001d0000000902000039000000000202041a0000016f02200197000000060220006b000002cc0000a13d00000000001004350000000801000039000000200010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000175011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000000101043b0000000502000029000000000021041b000000400100043d0000018e0210009c000003780000a13d000001ab0100004100000000001004350000004101000039000002520000013d0000000002000416000000000202004b000003fc0000c13d000000040230008a000000a00220008c000003fc0000413d0000000402100370000000000202043b000600000002001d0000016f0220009c000003fc0000213d0000002402100370000000000202043b000500000002001d0000016f0220009c000003fc0000213d0000004402100370000000000202043b000400000002001d0000006402100370000000000202043b000000000302004b0000000003000019000000010300c039000000000332004b000003fc0000c13d0000008401100370000000000101043b000300000001001d0000016f0110009c000003fc0000213d0000000001000411000080010110008c000002810000c13d000000000102004b000002e80000613d0000000701000039000000000101041a0000016f01100197000000050110006b000002da0000813d0000017601000041000000800010043f0000002001000039000000840010043f0000006101000039000000a40010043f0000017f01000041000000c40010043f0000018001000041000000e40010043f0000018101000041000001040010043f0000018201000041000001240010043f0000018301000041000004ec000104300000000001000416000000000101004b000003fc0000c13d04ea04bc0000040f0000016f02200197000000400300043d000000200430003900000000002404350000016f0110019700000000001304350000013c010000410000013c0230009c0000000003018019000000400130021000000170011001c7000004eb0001042e0000000001000416000000000101004b000003fc0000c13d00000006010000390000026f0000013d0000000001000416000000000101004b000003fc0000c13d04ea04730000040f000000400200043d00000000001204350000013c010000410000013c0320009c0000000002018019000000400120021000000171011001c7000004eb0001042e0000000001000416000000000101004b000003fc0000c13d0000000001000411000080010110008c000002810000c13d0000010e01000039000000000201041a0000ffff0320018f0000ffff0430008c000002990000c13d000001ab0100004100000000001004350000001101000039000000040010043f000001ac01000041000004ec000104300000000001000416000000000101004b000003fc0000c13d000000040130008a000000400110008c000003fc0000413d0000000001000411000080010110008c0000000001000019000000010100603904ea045e0000040f00000000010003670000002402100370000000000202043b0000011003000039000000000023041b0000000401100370000000000101043b0000010f02000039000000000012041b0000000001000019000004eb0001042e0000000001000416000000000101004b000003fc0000c13d0000010f01000039000000000101041a000000800010043f0000016e01000041000004eb0001042e0000000002000416000000000202004b000003fc0000c13d000000040230008a000000200220008c000003fc0000413d0000000002000411000080070220008c000003fc0000c13d0000000401100370000000000101043b000000000010041b0000000001000019000004eb0001042e0000017601000041000000800010043f0000002001000039000000840010043f0000001f01000039000000a40010043f000001a201000041000000c40010043f000001a301000041000004ec000104300000008001100210000000000112019f0000000302000039000000000012041c0000000001000019000004eb0001042e000001730330009c0000029f0000413d000000000221004b0000029f0000413d000001012110011a0000000b01200039000000000401041a000002af0000013d0000017b022001970000000103300039000000000223019f000000000021041b0000000001000019000004eb0001042e000000e00010043f0000002001000039000000c00010043f0000010001000039000000400010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000174011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000000401043b000000400100043d00000000004104350000013c020000410000013c0310009c0000000001028019000000400110021000000171011001c7000004eb0001042e0000017601000041000000c00010043f0000002001000039000000c40010043f000000e40010043f000001a401000041000001040010043f0000018501000041000004ec000104300000017601000041000000c00010043f0000002001000039000000c40010043f0000002801000039000000e40010043f000001a501000041000001040010043f000001a601000041000001240010043f0000019101000041000004ec000104300000017601000041000000c00010043f0000002001000039000000c40010043f0000005301000039000000e40010043f000001a701000041000001040010043f000001a801000041000001240010043f000001a901000041000001440010043f000001aa01000041000004ec00010430000000030100006b000002e80000c13d0000017601000041000000800010043f0000002001000039000000840010043f0000003f01000039000000a40010043f0000017c01000041000000c40010043f0000017d01000041000000e40010043f0000017e01000041000004ec00010430000000c001000039000000400010043f0000000901000039000100000001001d000000000301041a0000016f01300197000200000001001d000000800010043f0000008001300270000000a00010043f0000016f0330009c000003020000213d000000020300006b000003070000c13d000000000102004b000003640000c13d0000017601000041000000c00010043f0000002001000039000000c40010043f0000002101000039000000e40010043f000001a001000041000001040010043f000001a101000041000002c90000013d000000060310006c000003090000613d0000016f0210009c0000024f0000613d000003240000013d000000060310006c000003240000c13d000000000102004b0000035a0000c13d0000000202000029000000050120006c0000038e0000c13d0000000601000029000000010110008a0000016f0210009c0000024f0000213d0000016f01100197000001012110011a0000000b01200039000000000101041a000000040110006b000003fe0000c13d000000030100006b000003ca0000613d0000017601000041000000c00010043f0000002001000039000000c40010043f0000003c01000039000000e40010043f0000019601000041000001040010043f0000019701000041000002c90000013d0000000102100039000000060220006c000003700000c13d000000010210008a0000016f0320009c0000024f0000213d0000000a03000039000000000303041a0000016f02200197000001015220011a0000000b02500039000000000202041a000000e00010043f0000000201000029000001000010043f000001200020043f000001400030043f000000c00040043f0000016001000039000000400010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000186011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000400200043d000000000101043b000000040110006b000004080000c13d0000000203000029000000050130006b0000042b0000a13d0000018e0120009c000001e60000213d0000004001200039000000400010043f000000200120003900000006040000290000000000410435000000050300002900000000003204350000008001400210000000000113019f0000000102000029000000000012041b000000010140008a0000016f0210009c0000024f0000213d000003c30000013d0000017601000041000000c00010043f0000002001000039000000c40010043f0000003501000039000000e40010043f0000018f01000041000001040010043f0000019001000041000002c90000013d000000060100006b000003980000c13d0000017601000041000000c00010043f0000002001000039000000c40010043f0000002c01000039000000e40010043f0000019e01000041000001040010043f0000019f01000041000002c90000013d0000017601000041000000c00010043f0000002001000039000000c40010043f0000001b01000039000000e40010043f0000018401000041000002bd0000013d0000004002100039000000400020043f0000002002100039000000040300002900000000003204350000000602000029000000000021043500000080013002100000016f02200197000000000112019f0000000302000029000000000012041b00000064010000390000000001100367000000000101043b0000000602000039000000000012041b00000004010000390000000502000029000000000021041c0000000001000019000004eb0001042e0000017601000041000000c00010043f0000002001000039000000c40010043f0000002f01000039000000e40010043f0000019201000041000001040010043f0000019301000041000002c90000013d00000006010000290000016f01100041000200000001001d000000e001100210000000e00010043f0000000401000039000000c00010043f0000010001000039000000400010043f0000013c0100004100000000020004140000013c0320009c0000000002018019000000c00120021000000198011001c7000080100200003904ea04e50000040f0000000102200190000003fc0000613d000000400200043d000000000101043b000000040110006c000004110000c13d00000002010000290000016f01100197000001013110011a0000000b013000390000000403000029000000000031041b0000018e0120009c000001e60000213d0000004001200039000000400010043f000000200120003900000006040000290000000000410435000000050300002900000000003204350000008001400210000000000113019f0000000102000029000000000012041b000000010140008a0000016f01100197000001012110011a0000000b012000390000000402000029000000000021041b0000000a01000039000000000001041b0000010d01000039000000000201041a000001730320009c000004250000813d000000400300043d0000018e0430009c000001e60000213d0000004004300039000000400040043f0000010c04000039000000000604041a0000016f046001970000000004430436000000800560027000000000005404350000016f0660009c000004420000213d00000000060304330000016f06600198000004420000c13d0000000705000039000000000505041a000000800550027000000000005404350000019b02200197000000000225019f000000000021041b000000030600006b000004450000c13d000000400100043d00000064021000390000019c03000041000000000032043500000044021000390000019d030000410000000000320435000000240210003900000028030000390000000000320435000001760200004100000000002104350000000402100039000000200300003900000000003204350000013c020000410000013c0310009c0000000001028019000000400110021000000189011001c7000004ec000104300000000001000019000004ec000104300000017601000041000000c00010043f0000002001000039000000c40010043f0000003301000039000000e40010043f0000019401000041000001040010043f0000019501000041000002c90000013d00000064012000390000018703000041000000000031043500000044012000390000018803000041000000000031043500000024012000390000002603000039000004190000013d00000064012000390000019903000041000000000031043500000044012000390000019a030000410000000000310435000000240120003900000027030000390000000000310435000001760100004100000000001204350000000401200039000000200300003900000000003104350000013c010000410000013c0320009c0000000002018019000000400120021000000189011001c7000004ec000104300000000101000029000000000101041a0000010c02000039000000000012041b0000000001000019000004eb0001042e00000084012000390000018a03000041000000000031043500000064012000390000018b03000041000000000031043500000044012000390000018c03000041000000000031043500000024012000390000005d030000390000000000310435000001760100004100000000001204350000000401200039000000200300003900000000003104350000013c010000410000013c0320009c000000000201801900000040012002100000018d011001c7000004ec00010430000000030600006b000004470000c13d000004290000013d0000000306000029000300010060009200000003055000290000016f0650009c0000024f0000213d00000000005404350000000505000029000000000053043500000000050404330000016f06500197000000060660006c000004530000813d00000080055002100000045a0000013d00000006060000290000008005600210000000000252019f000000000021041b00000000006404350000000001030433000500000001001d00000005010000290000016f01100197000000000151019f000004270000013d000000000101004b000004610000613d000000000001042d000000400100043d0000004402100039000001a203000041000000000032043500000024021000390000001f030000390000000000320435000001760200004100000000002104350000000402100039000000200300003900000000003204350000013c020000410000013c0310009c00000000010280190000004001100210000001ad011001c7000004ec00010430000000400100043d000001ae0210009c000004980000813d000000c002100039000000400020043f0000000002000413000000f003200270000000ff0330018f000000a0041000390000000000340435000000e803200270000000ff0330018f00000080041000390000000000340435000000e003200270000000ff0330018f0000006004100039000000000034043500000060032002700000013c033001970000004004100039000000000034043500000040032002700000013c03300197000000200410003900000000003404350000013c0220019700000000002104350000011001000039000000000101041a0000000001120049000000000221004b00000000020000190000000102002039000000000202004b000000000100c019000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec00010430000001af0210009c000004a30000813d0000004001100039000000400010043f000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec00010430000000400300043d000001af0130009c000004b60000813d0000004001300039000000400010043f0000000701000039000000000201041a0000002004300039000000800120027000000000001404350000016f022001970000000000230435000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec00010430000000400300043d000001af0130009c000004c90000813d0000004001300039000000400010043f0000000901000039000000000201041a0000002004300039000000800120027000000000001404350000016f022001970000000000230435000000000001042d000001ab0100004100000000001004350000004101000039000000040010043f000001ac01000041000004ec000104300000013c030000410000013c0410009c000000000103801900000040011002100000013c0420009c00000000020380190000006002200210000000000112019f00000000020004140000013c0420009c0000000002038019000000c002200210000000000112019f000001b0011001c7000080100200003904ea04e50000040f0000000102200190000004e30000613d000000000101043b000000000001042d0000000001000019000004ec00010430000004e8002104230000000102000039000000000001042d0000000002000019000000000001042d000004ea00000432000004eb0001042e000004ec0001043000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ffffffff0000000000000000000000000000000000000000000000000004000000000000ffffffffffffffffffffffff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000008e1bc9bf0400000000002000000000000000000000000000000400000010000000000000000000000000000000000000000000000000000000000000000000000000085df51fc00000000000000000000000000000000000000000000000000000000a851ae7700000000000000000000000000000000000000000000000000000000d4a4ca0c00000000000000000000000000000000000000000000000000000000ef0e2ff300000000000000000000000000000000000000000000000000000000ef0e2ff400000000000000000000000000000000000000000000000000000000fe173b9700000000000000000000000000000000000000000000000000000000d4a4ca0d00000000000000000000000000000000000000000000000000000000ddeaa8e600000000000000000000000000000000000000000000000000000000c0d5b94800000000000000000000000000000000000000000000000000000000c0d5b94900000000000000000000000000000000000000000000000000000000d0f2c66300000000000000000000000000000000000000000000000000000000a851ae7800000000000000000000000000000000000000000000000000000000bf1fe420000000000000000000000000000000000000000000000000000000009a8a059100000000000000000000000000000000000000000000000000000000a225efca00000000000000000000000000000000000000000000000000000000a225efcb00000000000000000000000000000000000000000000000000000000a6ae0aac000000000000000000000000000000000000000000000000000000009a8a059200000000000000000000000000000000000000000000000000000000a0803ef7000000000000000000000000000000000000000000000000000000008e8acf86000000000000000000000000000000000000000000000000000000008e8acf8700000000000000000000000000000000000000000000000000000000938b5f320000000000000000000000000000000000000000000000000000000085df51fd000000000000000000000000000000000000000000000000000000008ac84c0e0000000000000000000000000000000000000000000000000000000042cbb15b00000000000000000000000000000000000000000000000000000000796b89b8000000000000000000000000000000000000000000000000000000007cb9357d000000000000000000000000000000000000000000000000000000007cb9357e0000000000000000000000000000000000000000000000000000000080b4124600000000000000000000000000000000000000000000000000000000796b89b9000000000000000000000000000000000000000000000000000000007c9bd1f3000000000000000000000000000000000000000000000000000000006ef25c39000000000000000000000000000000000000000000000000000000006ef25c3a000000000000000000000000000000000000000000000000000000007877a7970000000000000000000000000000000000000000000000000000000042cbb15c000000000000000000000000000000000000000000000000000000004be99e1d0000000000000000000000000000000000000000000000000000000019cae4610000000000000000000000000000000000000000000000000000000030e5ccbc0000000000000000000000000000000000000000000000000000000030e5ccbd000000000000000000000000000000000000000000000000000000003635f3e60000000000000000000000000000000000000000000000000000000019cae4620000000000000000000000000000000000000000000000000000000029f172ad0000000000000000000000000000000000000000000000000000000002fa57790000000000000000000000000000000000000000000000000000000006bed0360000000000000000000000000000000000000000000000000000000006e7517b000000000000000000000000000000000000002000000080000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffff00000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000ffffffffffffffffffffffffffffffffffffffff00000000000000000000000000000001000000000000000000000000000000000200000000000000000000000000000000000020000000e00000000000000000020000000000000000000000000000000000004000000000000000000000000008c379a0000000000000000000000000000000000000000000000000000000005468652063757272656e74206261746368206e756d626572206d7573742062652067726561746572207468616e2030000000000000000000000000000000000000000000000000000000000000000000000000840000010000000000000000000000000000000000000000000000000000000020000001400000000000000000ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00005468657265206d7573742062652061207669727475616c20626c6f636b206372656174656420617420746865207374617274206f66207468652062617463680000000000000000000000000000000000000000840000008000000000000000005468652074696d657374616d70206f6620746865204c3220626c6f636b206d7573742062652067726561746572207468616e206f7220657175616c20746f207468652074696d657374616d70206f66207468652063757272656e742062617463680000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c4000000800000000000000000496e76616c6964206e6577204c3220626c6f636b206e756d62657200000000000000000000000000000000000000000000000064000000c000000000000000000200000000000000000000000000000000000080000000e000000000000000006f727265637400000000000000000000000000000000000000000000000000005468652063757272656e74204c3220626c6f636b206861736820697320696e63000000000000000000000000000000000000008400000000000000000000000074616d70206f66207468652070726576696f7573204c3220626c6f636b0000006b206d7573742062652067726561746572207468616e207468652074696d65735468652074696d657374616d70206f6620746865206e6577204c3220626c6f6300000000000000000000000000000000000000a4000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffffbf43616e206e6f74207265757365204c3220626c6f636b206e756d6265722066726f6d207468652070726576696f757320626174636800000000000000000000000000000000000000000000000000000000000084000000c000000000000000005468652074696d657374616d70206f66207468652073616d65204c3220626c6f636b206d7573742062652073616d6500000000000000000000000000000000005468652070726576696f75732068617368206f66207468652073616d65204c3220626c6f636b206d7573742062652073616d650000000000000000000000000043616e206e6f7420637265617465207669727475616c20626c6f636b7320696e20746865206d6964646c65206f6620746865206d696e69626c6f636b000000000200000000000000000000000000000000000004000000e00000000000000000636f7272656374000000000000000000000000000000000000000000000000005468652070726576696f7573204c3220626c6f636b206861736820697320696effffffffffffffffffffffffffffffff00000000000000000000000000000000616c20626c6f636b00000000000000000000000000000000000000000000000043616e277420696e697469616c697a65207468652066697273742076697274754c3220626c6f636b206e756d626572206973206e6576657220657870656374656420746f206265207a65726f000000000000000000000000000000000000000055706772616465207472616e73616374696f6e206d7573742062652066697273740000000000000000000000000000000000000000000000000000000000000043616c6c61626c65206f6e6c792062792074686520626f6f746c6f6164657200000000000000000000000000000000000000006400000080000000000000000054696d657374616d70732073686f756c6420626520696e6372656d656e74616c5468652070726f7669646564206261746368206e756d626572206973206e6f7420636f72726563740000000000000000000000000000000000000000000000005468652074696d657374616d70206f6620746865206261746368206d7573742062652067726561746572207468616e207468652074696d657374616d70206f66207468652070726576696f757320626c6f636b0000000000000000000000000000000000000000000000000000000000000000a4000000c000000000000000004e487b710000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000240000000000000000000000000000000000000000000000000000000000000064000000000000000000000000000000000000000000000000000000000000000000000000ffffffffffffff40000000000000000000000000000000000000000000000000ffffffffffffffc0020000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003056e37dc174c0b32f5f5cfbc8be779b031b1d10b06fbead692692d7f40ce69b"
}
]
}
Submits a contract source code to an Abscan-like explorer for verification.
https://api.abscan.org/api
?module=contract
&action=verifysourcecode
&apikey=YourApiKeyToken
Query Parameters
Requests must be sent using HTTP POST
chainId
codeformat
single file, use
solidity-single-file
JSON file ( recommended ), use solidity-standard-json-input
sourceCode
the Solidity source code
constructorArguements
optional, include if your contract uses constructor arguments
contractaddress
the address your contract is deployed at
contractname
the name of your contract, such as
contracts/Verified.sol:Verified
compilerversion
Sample Response
{
"status": "1",
"message": "OK",
"result": "a7lpxkm9kpcpicx7daftmjifrfhiuhf5vqqnawhkfhzfrcpnxj"
}
Submits a Vyper contract source code to Abscan for verification.
https://api.abscan.org/api
?module=contract
&action=verifysourcecode
&apikey=YourApiKeyToken
Query Parameters
Requests must be sent using HTTP POST
codeformat
use vyper-json
sourceCode
constructorArguments
optional, include if your contract uses constructor arguments
contractaddress
the address your contract is deployed at
contractname
the name of your contract, such as
contracts/Verified.vy:Verified
compilerversion
compiler version used, such as vyper:0.4.0
optimizationUsed
use 0
for no optimisation and 1
for optimisation used
Sample Response
{
"status": "1",
"message": "OK",
"result": "a7lpxkm9kpcpicx7daftmjifrfhiuhf5vqqnawhkfhzfrcpnxj"
}
Returns the success or error status of a contract verification request.
https://api.abscan.org/api
?module=contract
&action=checkverifystatus
&guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi
&apikey=YourApiKeyToken
Query Parameters
guid
the unique guid
received from the verification request
Sample Response
If your encounter an error, reference our error list
{
"status": "1",
"message": "OK",
"result": "Pass - Verified"
}
Submits a proxy contract source code to Abscan for verification.
Requires a valid Abscan API key, it will be rejected otherwise
Current daily limit of 100 submissions per day per user (subject to change)
Only supports HTTP post
Upon successful submission you will receive a GUID (50 characters) as a receipt
You may use this GUID to track the status of your submission
Verified proxy contracts will display the "Read/Write as Proxy" of the implementation contract under the contract address's contract tab
// example with only the mandatory contract address parameter
curl -d "address=0xcbdcd3815b5f975e1a2c944a9b2cd1c985a1cb7f" "https://api.abscan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// example using the expectedimplementation optional parameter
// the expectedimplementation enforces a check to ensure the returned implementation contract address == address picked up by the verifier
curl -d "address=0xbc46363a7669f6e12353fa95bb067aead3675c29&expectedimplementation=0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6" "https://api.abscan.org/api?module=contract&action=verifyproxycontract&apikey=YourApiKeyToken"
// OK
{"status":"1","message":"OK","result":"gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz"}
// NOTOK
{"status":"0","message":"NOTOK","result":"Invalid API Key"}
curl "https://api.abscan.org/api?module=contract&action=checkproxyverification&guid=gwgrrnfy56zf6vc1fljuejwg6pelnc5yns6fg6y2i6zfpgzquz&apikey=YourApiKeyToken"
// OK
{"status":"1","message":"OK","result":"The proxy's (0xbc46363a7669f6e12353fa95bb067aead3675c29) implementation contract is found at 0xe45a5176bc0f2c1198e2451c4e4501d4ed9b65a6 and is successfully updated."}
// NOTOK
{"status":"0","message":"NOTOK","result":"A corresponding implementation contract was unfortunately not detected for the proxy address."}
Try this endpoint in your browser
Tutorial : A full walk through of submitting multichain contract verification.
Note : This endpoint is limited to 100 verifications/day, regardless of API PRO tier.
the to submit verification, such as 1
for mainnet
used, such as v0.8.24+commit.e11b9ed9
Note : This endpoint is limited to 100 verifications/day, regardless of API PRO tier.
the Vyper source code, in
Try this endpoint in your browser