Commit 40a7dfe2 authored by Alina's avatar Alina Committed by GitHub

update solidity version to ^0.7.0 (#122)

* update solc version to ^0.7.0

* interfaces back to solidity >0.6.0 <0.8.0

* update solc to 0.7.6

* back to 0.7.4

* upgrade to 0.7.6, fix EXTCODESIZE check

* versions >0.5.0 <0.8.0 for xdomain msgers
parent fab8c869
...@@ -22,7 +22,7 @@ const config: BuidlerConfig = { ...@@ -22,7 +22,7 @@ const config: BuidlerConfig = {
timeout: 50000, timeout: 50000,
}, },
solc: { solc: {
version: '0.7.4', version: '0.7.6',
optimizer: { enabled: true, runs: 200 }, optimizer: { enabled: true, runs: 200 },
}, },
typechain: { typechain: {
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/* Interface Imports */ /* Interface Imports */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/* Library Imports */ /* Library Imports */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/* Library Imports */ /* Library Imports */
...@@ -23,7 +23,7 @@ contract OVM_L2CrossDomainMessenger is iOVM_L2CrossDomainMessenger, OVM_BaseCros ...@@ -23,7 +23,7 @@ contract OVM_L2CrossDomainMessenger is iOVM_L2CrossDomainMessenger, OVM_BaseCros
/*************** /***************
* Constructor * * Constructor *
***************/ ***************/
/** /**
* @param _libAddressManager Address of the Address Manager. * @param _libAddressManager Address of the Address Manager.
*/ */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/* Interface Imports */ /* Interface Imports */
import { iOVM_ERC20 } from "../../iOVM/precompiles/iOVM_ERC20.sol"; import { iOVM_ERC20 } from "../../iOVM/precompiles/iOVM_ERC20.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/* Interface Imports */ /* Interface Imports */
import { iOVM_L2ToL1MessagePasser } from "../../iOVM/precompiles/iOVM_L2ToL1MessagePasser.sol"; import { iOVM_L2ToL1MessagePasser } from "../../iOVM/precompiles/iOVM_L2ToL1MessagePasser.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/** /**
......
...@@ -16,7 +16,7 @@ interface iOVM_L1CrossDomainMessenger is iOVM_BaseCrossDomainMessenger { ...@@ -16,7 +16,7 @@ interface iOVM_L1CrossDomainMessenger is iOVM_BaseCrossDomainMessenger {
/******************* /*******************
* Data Structures * * Data Structures *
*******************/ *******************/
struct L2MessageInclusionProof { struct L2MessageInclusionProof {
bytes32 stateRoot; bytes32 stateRoot;
Lib_OVMCodec.ChainBatchHeader stateRootBatchHeader; Lib_OVMCodec.ChainBatchHeader stateRootBatchHeader;
...@@ -27,9 +27,9 @@ interface iOVM_L1CrossDomainMessenger is iOVM_BaseCrossDomainMessenger { ...@@ -27,9 +27,9 @@ interface iOVM_L1CrossDomainMessenger is iOVM_BaseCrossDomainMessenger {
/******************** /********************
* Public Functions * * Public Functions *
********************/ ********************/
/** /**
* Relays a cross domain message to a contract. * Relays a cross domain message to a contract.
* @param _target Target contract address. * @param _target Target contract address.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/* Interface Imports */ /* Interface Imports */
...@@ -12,7 +12,7 @@ import { iOVM_BaseCrossDomainMessenger } from "./iOVM_BaseCrossDomainMessenger.s ...@@ -12,7 +12,7 @@ import { iOVM_BaseCrossDomainMessenger } from "./iOVM_BaseCrossDomainMessenger.s
interface iOVM_L2CrossDomainMessenger is iOVM_BaseCrossDomainMessenger { interface iOVM_L2CrossDomainMessenger is iOVM_BaseCrossDomainMessenger {
/******************** /********************
* Public Functions * * Public Functions *
********************/ ********************/
/** /**
......
...@@ -119,7 +119,7 @@ interface iOVM_StateCommitmentChain { ...@@ -119,7 +119,7 @@ interface iOVM_StateCommitmentChain {
returns ( returns (
bool _inside bool _inside
); );
/** /**
* Sets the last batch index that can be deleted. * Sets the last batch index that can be deleted.
* @param _stateBatchHeader Proposed batch header that can be deleted. * @param _stateBatchHeader Proposed batch header that can be deleted.
......
...@@ -31,8 +31,8 @@ interface iOVM_StateManager { ...@@ -31,8 +31,8 @@ interface iOVM_StateManager {
* Public Functions: Setup * * Public Functions: Setup *
***************************/ ***************************/
function owner() external view returns (address _owner); function owner() external view returns (address _owner);
function ovmExecutionManager() external view returns (address _ovmExecutionManager); function ovmExecutionManager() external view returns (address _ovmExecutionManager);
function setExecutionManager(address _ovmExecutionManager) external; function setExecutionManager(address _ovmExecutionManager) external;
...@@ -59,7 +59,7 @@ interface iOVM_StateManager { ...@@ -59,7 +59,7 @@ interface iOVM_StateManager {
function wasAccountChanged(address _address) external view returns (bool); function wasAccountChanged(address _address) external view returns (bool);
function wasAccountCommitted(address _address) external view returns (bool); function wasAccountCommitted(address _address) external view returns (bool);
/************************************ /************************************
* Public Functions: Storage Access * * Public Functions: Storage Access *
************************************/ ************************************/
......
...@@ -5,11 +5,11 @@ pragma solidity >0.5.0 <0.8.0; ...@@ -5,11 +5,11 @@ pragma solidity >0.5.0 <0.8.0;
* @title iOVM_DeployerWhitelist * @title iOVM_DeployerWhitelist
*/ */
interface iOVM_DeployerWhitelist { interface iOVM_DeployerWhitelist {
/******************** /********************
* Public Functions * * Public Functions *
********************/ ********************/
function initialize(address _owner, bool _allowArbitraryDeployment) external; function initialize(address _owner, bool _allowArbitraryDeployment) external;
function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) external; function setWhitelistedDeployer(address _deployer, bool _isWhitelisted) external;
function setOwner(address _newOwner) external; function setOwner(address _newOwner) external;
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/** /**
* @title iOVM_ERC20 * @title iOVM_ERC20
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/** /**
* @title iOVM_L1MessageSender * @title iOVM_L1MessageSender
*/ */
interface iOVM_L1MessageSender { interface iOVM_L1MessageSender {
/******************** /********************
* Public Functions * * Public Functions *
********************/ ********************/
function getL1MessageSender() external returns (address _l1MessageSender); function getL1MessageSender() external returns (address _l1MessageSender);
} }
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/** /**
* @title iOVM_L2ToL1MessagePasser * @title iOVM_L2ToL1MessagePasser
......
...@@ -64,7 +64,7 @@ interface iOVM_BondManager { ...@@ -64,7 +64,7 @@ interface iOVM_BondManager {
bool canClaim; bool canClaim;
// Total number of `recordGasSpent` calls made // Total number of `recordGasSpent` calls made
uint256 total; uint256 total;
// The gas spent by each user to provide witness data. The sum of all // The gas spent by each user to provide witness data. The sum of all
// values inside this map MUST be equal to the value of `total` // values inside this map MUST be equal to the value of `total`
mapping(address => uint256) gasSpent; mapping(address => uint256) gasSpent;
} }
...@@ -73,7 +73,7 @@ interface iOVM_BondManager { ...@@ -73,7 +73,7 @@ interface iOVM_BondManager {
/******************** /********************
* Public Functions * * Public Functions *
********************/ ********************/
function recordGasSpent( function recordGasSpent(
bytes32 _preStateRoot, bytes32 _preStateRoot,
bytes32 _txHash, bytes32 _txHash,
......
...@@ -13,7 +13,7 @@ interface iOVM_StateTransitioner { ...@@ -13,7 +13,7 @@ interface iOVM_StateTransitioner {
/********** /**********
* Events * * Events *
**********/ **********/
event AccountCommitted( event AccountCommitted(
address _address address _address
); );
...@@ -32,7 +32,7 @@ interface iOVM_StateTransitioner { ...@@ -32,7 +32,7 @@ interface iOVM_StateTransitioner {
function getPostStateRoot() external view returns (bytes32 _postStateRoot); function getPostStateRoot() external view returns (bytes32 _postStateRoot);
function isComplete() external view returns (bool _complete); function isComplete() external view returns (bool _complete);
/*********************************** /***********************************
* Public Functions: Pre-Execution * * Public Functions: Pre-Execution *
***********************************/ ***********************************/
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/* Library Imports */ /* Library Imports */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/* Contract Imports */ /* Contract Imports */
import { Ownable } from "./Lib_Ownable.sol"; import { Ownable } from "./Lib_Ownable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/* Library Imports */ /* Library Imports */
import { Lib_AddressManager } from "./Lib_AddressManager.sol"; import { Lib_AddressManager } from "./Lib_AddressManager.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/** /**
* @title Ownable * @title Ownable
...@@ -55,7 +55,7 @@ abstract contract Ownable { ...@@ -55,7 +55,7 @@ abstract contract Ownable {
function renounceOwnership() function renounceOwnership()
public public
virtual virtual
onlyOwner onlyOwner
{ {
emit OwnershipTransferred(owner, address(0)); emit OwnershipTransferred(owner, address(0));
owner = address(0); owner = address(0);
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.7.0; pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
/* Library Imports */ /* Library Imports */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// +build ovm // +build ovm
pragma solidity >0.6.0 <0.8.0; pragma solidity >0.5.0 <0.8.0;
/** /**
* @dev Contract module that helps prevent reentrant calls to a function. * @dev Contract module that helps prevent reentrant calls to a function.
......
...@@ -69,7 +69,7 @@ const test_ovmCREATEEOA: TestDefinition = { ...@@ -69,7 +69,7 @@ const test_ovmCREATEEOA: TestDefinition = {
address: '0x17ec8597ff92C3F44523bDc65BF0f1bE632917ff', address: '0x17ec8597ff92C3F44523bDc65BF0f1bE632917ff',
}, },
expectedReturnStatus: true, expectedReturnStatus: true,
expectedReturnValue: 1682, expectedReturnValue: 1678,
}, },
], ],
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment