Skip to content
This repository has been archived by the owner on Apr 12, 2021. It is now read-only.

Commit

Permalink
Move everything over to hardhat (#208)
Browse files Browse the repository at this point in the history
* Got hardhat to work

* Fix build structure

* Fix build process, hopefully
  • Loading branch information
smartcontracts authored and maurelian committed Feb 2, 2021
1 parent a30b120 commit 007e106
Show file tree
Hide file tree
Showing 113 changed files with 1,721 additions and 1,004 deletions.
2 changes: 0 additions & 2 deletions buidler-env.d.ts

This file was deleted.

34 changes: 0 additions & 34 deletions buidler.config.ts

This file was deleted.

@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Interface Imports */
Expand Down
7 changes: 5 additions & 2 deletions contracts/optimistic-ethereum/OVM/accounts/OVM_ProxyEOA.sol
@@ -1,4 +1,5 @@
pragma solidity ^0.7.0;
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_BytesUtils } from "../../libraries/utils/Lib_BytesUtils.sol";
Expand All @@ -19,7 +20,9 @@ contract OVM_ProxyEOA {

constructor(
address _implementation
) {
)
public
{
_setImplementation(_implementation);
}

Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

Expand Down
Expand Up @@ -31,6 +31,7 @@ contract OVM_L1CrossDomainMessenger is iOVM_L1CrossDomainMessenger, OVM_BaseCros
* Pass a default zero address to the address resolver. This will be updated when initialized.
*/
constructor()
public
Lib_AddressResolver(address(0))
{}

Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

Expand Down
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
// @unsupported: ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Library Imports */
Expand Down Expand Up @@ -57,6 +58,7 @@ contract OVM_CanonicalTransactionChain is iOVM_CanonicalTransactionChain, Lib_Ad
uint256 _forceInclusionPeriodBlocks,
uint256 _maxTransactionGasLimit
)
public
Lib_AddressResolver(_libAddressManager)
{
forceInclusionPeriodSeconds = _forceInclusionPeriodSeconds;
Expand Down
@@ -1,4 +1,5 @@
pragma solidity ^0.7.0;
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_RingBuffer } from "../../libraries/utils/Lib_RingBuffer.sol";
Expand Down Expand Up @@ -39,6 +40,7 @@ contract OVM_ChainStorageContainer is iOVM_ChainStorageContainer, Lib_AddressRes
address _libAddressManager,
string memory _owner
)
public
Lib_AddressResolver(_libAddressManager)
{
owner = _owner;
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Library Imports */
Expand Down Expand Up @@ -42,6 +42,7 @@ contract OVM_StateCommitmentChain is iOVM_StateCommitmentChain, Lib_AddressResol
uint256 _fraudProofWindow,
uint256 _sequencerPublishWindow
)
public
Lib_AddressResolver(_libAddressManager)
{
FRAUD_PROOF_WINDOW = _fraudProofWindow;
Expand Down
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
// @unsupported: ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Library Imports */
Expand Down Expand Up @@ -66,6 +67,7 @@ contract OVM_ExecutionManager is iOVM_ExecutionManager, Lib_AddressResolver {
GasMeterConfig memory _gasMeterConfig,
GlobalContext memory _globalContext
)
public
Lib_AddressResolver(_libAddressManager)
{
ovmSafetyChecker = iOVM_SafetyChecker(resolve("OVM_SafetyChecker"));
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/* Interface Imports */
import { iOVM_SafetyChecker } from "../../iOVM/execution/iOVM_SafetyChecker.sol";
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Library Imports */
Expand Down Expand Up @@ -51,7 +51,9 @@ contract OVM_StateManager is iOVM_StateManager {
*/
constructor(
address _owner
) {
)
public
{
owner = _owner;
}

Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/* Interface Imports */
import { iOVM_StateManager } from "../../iOVM/execution/iOVM_StateManager.sol";
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_Bytes32Utils } from "../../libraries/utils/Lib_Bytes32Utils.sol";
Expand Down
1 change: 0 additions & 1 deletion contracts/optimistic-ethereum/OVM/precompiles/OVM_ETH.sol
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/* Interface Imports */
import { iOVM_L1MessageSender } from "../../iOVM/precompiles/iOVM_L1MessageSender.sol";
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/* Interface Imports */
Expand Down
@@ -1,4 +1,5 @@
pragma solidity ^0.7.0;
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_SafeExecutionManagerWrapper } from "../../libraries/wrappers/Lib_SafeExecutionManagerWrapper.sol";
Expand Down
@@ -1,4 +1,5 @@
pragma solidity ^0.7.0;
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_BytesUtils } from "../../libraries/utils/Lib_BytesUtils.sol";
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol";
Expand Down Expand Up @@ -53,7 +53,11 @@ contract OVM_BondManager is iOVM_BondManager, Lib_AddressResolver {

/// Initializes with a ERC20 token to be used for the fidelity bonds
/// and with the Address Manager
constructor(ERC20 _token, address _libAddressManager)
constructor(
ERC20 _token,
address _libAddressManager
)
public
Lib_AddressResolver(_libAddressManager)
{
token = _token;
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

import { iOVM_BondManager } from "../../iOVM/verification/iOVM_BondManager.sol";
import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol";
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Library Imports */
Expand Down Expand Up @@ -36,6 +36,7 @@ contract OVM_FraudVerifier is Lib_AddressResolver, OVM_FraudContributor, iOVM_Fr
constructor(
address _libAddressManager
)
public
Lib_AddressResolver(_libAddressManager)
{}

Expand Down
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
// @unsupported: ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

/* Library Imports */
Expand Down Expand Up @@ -80,6 +81,7 @@ contract OVM_StateTransitioner is Lib_AddressResolver, OVM_FraudContributor, iOV
bytes32 _preStateRoot,
bytes32 _transactionHash
)
public
Lib_AddressResolver(_libAddressManager)
{
stateTransitionIndex = _stateTransitionIndex;
Expand Down
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
// @unsupported: ovm
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_AddressResolver } from "../../libraries/resolver/Lib_AddressResolver.sol";
Expand All @@ -17,8 +18,12 @@ import { OVM_StateTransitioner } from "./OVM_StateTransitioner.sol";
*/
contract OVM_StateTransitionerFactory is iOVM_StateTransitionerFactory, Lib_AddressResolver {

constructor( address _libAddressManager)
Lib_AddressResolver(_libAddressManager){}
constructor(
address _libAddressManager
)
public
Lib_AddressResolver(_libAddressManager)
{}

/***************************************
* Public Functions: Contract Creation *
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;
pragma experimental ABIEncoderV2;

Expand Down
@@ -1,4 +1,5 @@
pragma solidity ^0.7.0;
// SPDX-License-Identifier: MIT
pragma solidity >0.5.0 <0.8.0;

/**
* @title iOVM_ChainStorageContainer
Expand Down
Expand Up @@ -10,5 +10,5 @@ interface iOVM_SafetyChecker {
* Public Functions *
********************/

function isBytecodeSafe(bytes calldata _bytecode) external view returns (bool);
function isBytecodeSafe(bytes calldata _bytecode) external pure returns (bool);
}
Expand Up @@ -66,7 +66,7 @@ interface iOVM_StateManager {

function putContractStorage(address _contract, bytes32 _key, bytes32 _value) external;
function getContractStorage(address _contract, bytes32 _key) external view returns (bytes32 _value);
function hasContractStorage(address _contract, bytes32 _key) external returns (bool _exists);
function hasContractStorage(address _contract, bytes32 _key) external view returns (bool _exists);
function testAndSetContractStorageLoaded(address _contract, bytes32 _key) external returns (bool _wasContractStorageAlreadyLoaded);
function testAndSetContractStorageChanged(address _contract, bytes32 _key) external returns (bool _wasContractStorageAlreadyChanged);
function commitContractStorage(address _contract, bytes32 _key) external returns (bool _wasContractStorageCommitted);
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/**
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/**
Expand All @@ -11,5 +10,5 @@ interface iOVM_L1MessageSender {
* Public Functions *
********************/

function getL1MessageSender() external returns (address _l1MessageSender);
function getL1MessageSender() external view returns (address _l1MessageSender);
}
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/**
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/* Contract Imports */
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
Expand Down
@@ -1,5 +1,4 @@
// SPDX-License-Identifier: MIT
// +build ovm
pragma solidity >0.5.0 <0.8.0;

/**
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/* Library Imports */
import { Lib_AddressManager } from "./Lib_AddressManager.sol";
Expand Down Expand Up @@ -38,6 +38,7 @@ contract Lib_ResolvedDelegateProxy {
address _libAddressManager,
string memory _implementationName
)
public
{
addressManager[address(this)] = Lib_AddressManager(_libAddressManager);
implementationName[address(this)] = _implementationName;
Expand Down
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: MIT
pragma solidity ^0.7.0;
pragma solidity >0.5.0 <0.8.0;

/**
* @title Lib_RLPReader
Expand Down

0 comments on commit 007e106

Please sign in to comment.