Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update solc version for system contracts #25

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gas-bound-caller/contracts/GasBoundCaller.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {EfficientCall} from "@matterlabs/zksync-contracts/l2/system-contracts/libraries/EfficientCall.sol";
import {ISystemContext} from "./ISystemContext.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {GasBoundCaller} from "../GasBoundCaller.sol";
import {SystemContractHelper} from "./SystemContractHelper.sol";
Expand Down
3 changes: 2 additions & 1 deletion l2-contracts/contracts/SystemContractsCaller.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: MIT
// solhint-disable one-contract-per-file

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {MSG_VALUE_SYSTEM_CONTRACT} from "./L2ContractHelper.sol";

Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/AccountCodeStorage.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IAccountCodeStorage} from "./interfaces/IAccountCodeStorage.sol";
import {Utils} from "./libraries/Utils.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/BootloaderUtilities.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IBootloaderUtilities} from "./interfaces/IBootloaderUtilities.sol";
import {Transaction, TransactionHelper, EIP_712_TX_TYPE, LEGACY_TX_TYPE, EIP_2930_TX_TYPE, EIP_1559_TX_TYPE} from "./libraries/TransactionHelper.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/ComplexUpgrader.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IComplexUpgrader} from "./interfaces/IComplexUpgrader.sol";
import {FORCE_DEPLOYER} from "./Constants.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/Compressor.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {ICompressor, OPERATION_BITMASK, LENGTH_BITS_OFFSET, MAX_ENUMERATION_INDEX_SIZE} from "./interfaces/ICompressor.sol";
import {ISystemContract} from "./interfaces/ISystemContract.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/Constants.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IAccountCodeStorage} from "./interfaces/IAccountCodeStorage.sol";
import {INonceHolder} from "./interfaces/INonceHolder.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/ContractDeployer.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {ImmutableData} from "./interfaces/IImmutableSimulator.sol";
import {IContractDeployer} from "./interfaces/IContractDeployer.sol";
Expand Down Expand Up @@ -189,7 +189,7 @@
function createEVM(bytes calldata _initCode) external payable override returns (address) {
// If the account is an EOA, use the min nonce. If it's a contract, use deployment nonce
// Subtract 1 for EOA since the nonce has already been incremented for this transaction
uint256 senderNonce = msg.sender == tx.origin

Check warning on line 192 in system-contracts/contracts/ContractDeployer.sol

View workflow job for this annotation

GitHub Actions / lint

Avoid to use tx.origin

Check warning on line 192 in system-contracts/contracts/ContractDeployer.sol

View workflow job for this annotation

GitHub Actions / lint

Avoid to use tx.origin

Check warning on line 192 in system-contracts/contracts/ContractDeployer.sol

View workflow job for this annotation

GitHub Actions / lint

Avoid to use tx.origin
? NONCE_HOLDER_SYSTEM_CONTRACT.getMinNonce(msg.sender) - 1
: NONCE_HOLDER_SYSTEM_CONTRACT.incrementDeploymentNonce(msg.sender) + 1;
address newAddress = Utils.getNewAddressCreateEVM(msg.sender, senderNonce);
Expand Down Expand Up @@ -386,7 +386,7 @@
}

function convertToConstructorEVMInput(bytes calldata _input) internal pure returns (bytes memory) {
// With how the contracts work, the calldata to the constuctor must be an ABI-encoded `bytes`.

Check warning on line 389 in system-contracts/contracts/ContractDeployer.sol

View workflow job for this annotation

GitHub Actions / typos

"constuctor" should be "constructor".
// This means that it should also contain offset as well as length
uint256 _fullLength = _input.length;
bytes memory extendedInput = new bytes(_input.length + 64);
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/Create2Factory.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {REAL_DEPLOYER_SYSTEM_CONTRACT} from "./Constants.sol";
import {EfficientCall} from "./libraries/EfficientCall.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/DefaultAccount.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IAccount, ACCOUNT_VALIDATION_SUCCESS_MAGIC} from "./interfaces/IAccount.sol";
import {TransactionHelper, Transaction} from "./libraries/TransactionHelper.sol";
Expand Down Expand Up @@ -139,7 +139,7 @@
bytes calldata data = _transaction.data;
uint32 gas = Utils.safeCastToU32(gasleft());

// TODO: if possible, maybe implment some way to avoid memory copying here.

Check warning on line 142 in system-contracts/contracts/DefaultAccount.sol

View workflow job for this annotation

GitHub Actions / typos

"implment" should be "implement".
if (_transaction.reserved[1] != 0) {
DEPLOYER_SYSTEM_CONTRACT.createEVM{value: value}(data);
return;
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/EmptyContract.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/ImmutableSimulator.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IImmutableSimulator, ImmutableData} from "./interfaces/IImmutableSimulator.sol";
import {DEPLOYER_SYSTEM_CONTRACT} from "./Constants.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/KnownCodesStorage.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IKnownCodesStorage} from "./interfaces/IKnownCodesStorage.sol";
import {ISystemContract} from "./interfaces/ISystemContract.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/L1Messenger.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IL1Messenger, L2ToL1Log, L2_L1_LOGS_TREE_DEFAULT_LEAF_HASH, L2_TO_L1_LOG_SERIALIZE_SIZE, STATE_DIFF_COMPRESSION_VERSION_NUMBER} from "./interfaces/IL1Messenger.sol";
import {ISystemContract} from "./interfaces/ISystemContract.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/L2BaseToken.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IBaseToken} from "./interfaces/IBaseToken.sol";
import {ISystemContract} from "./interfaces/ISystemContract.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/MsgValueSimulator.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {Utils} from "./libraries/Utils.sol";
import {EfficientCall} from "./libraries/EfficientCall.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/NonceHolder.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {INonceHolder} from "./interfaces/INonceHolder.sol";
import {IContractDeployer} from "./interfaces/IContractDeployer.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/PubdataChunkPublisher.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IPubdataChunkPublisher} from "./interfaces/IPubdataChunkPublisher.sol";
import {ISystemContract} from "./interfaces/ISystemContract.sol";
Expand Down
3 changes: 2 additions & 1 deletion system-contracts/contracts/SystemContext.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// SPDX-License-Identifier: MIT
// solhint-disable reason-string, gas-custom-errors

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {ISystemContext} from "./interfaces/ISystemContext.sol";
import {ISystemContract} from "./interfaces/ISystemContract.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/SystemContractErrors.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity ^0.8.20;

error Unauthorized(address);
error InvalidCodeHash(CodeHashReason);
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IAccount.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {Transaction} from "../libraries/TransactionHelper.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

interface IAccountCodeStorage {
function storeAccountConstructingCodeHash(address _address, bytes32 _hash) external;
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IBaseToken.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

interface IBaseToken {
function balanceOf(uint256) external view returns (uint256);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {Transaction} from "../libraries/TransactionHelper.sol";

Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IComplexUpgrader.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/ICompressor.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

// The bitmask by applying which to the compressed state diff metadata we retrieve its operation.
uint8 constant OPERATION_BITMASK = 7;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

interface IContractDeployer {
/// @notice Defines the version of the account abstraction protocol
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

struct ImmutableData {
uint256 index;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IL1Messenger.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/// @dev The log passed from L2
/// @param l2ShardId The shard identifier, 0 - rollup, 1 - porter. All other values are not used but are reserved for the future
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IL2StandardToken.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

interface IL2StandardToken {
event BridgeMint(address indexed _account, uint256 _amount);
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IMailbox.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

interface IMailbox {
function finalizeEthWithdrawal(
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/INonceHolder.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IPaymaster.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {Transaction} from "../libraries/TransactionHelper.sol";

Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/IPaymasterFlow.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/ISystemContext.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/interfaces/ISystemContract.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {SystemContractHelper} from "../libraries/SystemContractHelper.sol";
import {BOOTLOADER_FORMAL_ADDRESS, FORCE_DEPLOYER} from "../Constants.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/libraries/EfficientCall.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {SystemContractHelper, ADDRESS_MASK} from "./SystemContractHelper.sol";
import {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";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/libraries/RLPEncoder.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {MAX_SYSTEM_CONTRACT_ADDRESS} from "../Constants.sol";
import {Utils} from "./Utils.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {MSG_VALUE_SYSTEM_CONTRACT, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT} from "../Constants.sol";
import {Utils} from "./Utils.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/libraries/TransactionHelper.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {IERC20} from "../openzeppelin/token/ERC20/IERC20.sol";
import {SafeERC20} from "../openzeppelin/token/ERC20/utils/SafeERC20.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

/**
* @author Matter Labs
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/libraries/Utils.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {EfficientCall} from "./EfficientCall.sol";
import {RLPEncoder} from "./RLPEncoder.sol";
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/test-contracts/Deployable.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

contract Deployable {
event Deployed(uint256 value, bytes data);
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/test-contracts/MockContract.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

contract MockContract {
event Called(uint256 value, bytes data);
Expand Down
2 changes: 1 addition & 1 deletion system-contracts/contracts/test-contracts/SystemCaller.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity 0.8.20;
pragma solidity ^0.8.20;

import {SYSTEM_CALL_CALL_ADDRESS, MSG_VALUE_SIMULATOR_IS_SYSTEM_BIT, SystemContractsCaller, CalldataForwardingMode} from "../libraries/SystemContractsCaller.sol";
import {Utils} from "../libraries/Utils.sol";
Expand Down
Loading
Loading