Skip to content

Commit

Permalink
Merge branch 'solc-0.7' into release-v3.3-solc-0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
frangio committed Nov 27, 2020
2 parents a4fc50c + b8187aa commit 40a15c0
Show file tree
Hide file tree
Showing 140 changed files with 215 additions and 212 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@
* `TimelockController`: added a contract to augment access control schemes with a delay. ([#2354](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2354))
* `EnumerableSet`: added `Bytes32Set`, for sets of `bytes32`. ([#2395](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2395))

## 3.2.2-solc-0.7 (2020-10-28)
* Resolve warnings introduced by Solidity 0.7.4. ([#2396](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2396))

## 3.2.1-solc-0.7 (2020-09-15)
* `ERC777`: Remove a warning about function state visibility in Solidity 0.7. ([#2327](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2327))

## 3.2.0 (2020-09-10)

### New features
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ OpenZeppelin Contracts features a [stable API](https://docs.openzeppelin.com/con
Once installed, you can use the contracts in the library by importing them:

```solidity
pragma solidity ^0.6.0;
pragma solidity ^0.7.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract MyCollectible is ERC721 {
constructor() ERC721("MyCollectible", "MCO") public {
constructor() ERC721("MyCollectible", "MCO") {
}
}
```
Expand Down
2 changes: 1 addition & 1 deletion buidler.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ module.exports = {
},
},
solc: {
version: '0.6.12',
version: '0.7.4',
},
};
2 changes: 1 addition & 1 deletion contracts/GSN/Context.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/*
* @dev Provides information about the current execution context, including the
Expand Down
2 changes: 1 addition & 1 deletion contracts/GSN/GSNRecipient.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "./IRelayRecipient.sol";
import "./IRelayHub.sol";
Expand Down
6 changes: 3 additions & 3 deletions contracts/GSN/GSNRecipientERC20Fee.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "./GSNRecipient.sol";
import "../math/SafeMath.sol";
Expand Down Expand Up @@ -30,7 +30,7 @@ contract GSNRecipientERC20Fee is GSNRecipient {
/**
* @dev The arguments to the constructor are the details that the gas payment token will have: `name` and `symbol`. `decimals` is hard-coded to 18.
*/
constructor(string memory name, string memory symbol) public {
constructor(string memory name, string memory symbol) {
_token = new __unstable__ERC20Owned(name, symbol);
}

Expand Down Expand Up @@ -118,7 +118,7 @@ contract GSNRecipientERC20Fee is GSNRecipient {
contract __unstable__ERC20Owned is ERC20, Ownable {
uint256 private constant _UINT256_MAX = 2**256 - 1;

constructor(string memory name, string memory symbol) public ERC20(name, symbol) { }
constructor(string memory name, string memory symbol) ERC20(name, symbol) { }

// The owner (GSNRecipientERC20Fee) can mint tokens
function mint(address account, uint256 amount) public onlyOwner {
Expand Down
4 changes: 2 additions & 2 deletions contracts/GSN/GSNRecipientSignature.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "./GSNRecipient.sol";
import "../cryptography/ECDSA.sol";
Expand All @@ -23,7 +23,7 @@ contract GSNRecipientSignature is GSNRecipient {
/**
* @dev Sets the trusted signer that is going to be producing signatures to approve relayed calls.
*/
constructor(address trustedSigner) public {
constructor(address trustedSigner) {
require(trustedSigner != address(0), "GSNRecipientSignature: trusted signer is the zero address");
_trustedSigner = trustedSigner;
}
Expand Down
2 changes: 1 addition & 1 deletion contracts/GSN/IRelayHub.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Interface for `RelayHub`, the core contract of the GSN. Users should not need to interact with this contract
Expand Down
2 changes: 1 addition & 1 deletion contracts/GSN/IRelayRecipient.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Base interface for a contract that will be called via the GSN from {IRelayHub}.
Expand Down
2 changes: 1 addition & 1 deletion contracts/access/AccessControl.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/access/Ownable.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../GSN/Context.sol";
/**
Expand All @@ -23,7 +23,7 @@ abstract contract Ownable is Context {
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
Expand Down
4 changes: 2 additions & 2 deletions contracts/access/TimelockController.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.9 <0.8.0;
pragma solidity ^0.7.0;
pragma experimental ABIEncoderV2;

import "./../math/SafeMath.sol";
Expand Down Expand Up @@ -52,7 +52,7 @@ contract TimelockController is AccessControl {
/**
* @dev Initializes the contract with a given `minDelay`.
*/
constructor(uint256 minDelay, address[] memory proposers, address[] memory executors) public {
constructor(uint256 minDelay, address[] memory proposers, address[] memory executors) {
_setRoleAdmin(TIMELOCK_ADMIN_ROLE, TIMELOCK_ADMIN_ROLE);
_setRoleAdmin(PROPOSER_ROLE, TIMELOCK_ADMIN_ROLE);
_setRoleAdmin(EXECUTOR_ROLE, TIMELOCK_ADMIN_ROLE);
Expand Down
2 changes: 1 addition & 1 deletion contracts/cryptography/ECDSA.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
Expand Down
2 changes: 1 addition & 1 deletion contracts/cryptography/MerkleProof.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev These functions deal with verification of Merkle trees (hash trees),
Expand Down
4 changes: 2 additions & 2 deletions contracts/introspection/ERC165.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "./IERC165.sol";

Expand All @@ -21,7 +21,7 @@ abstract contract ERC165 is IERC165 {
*/
mapping(bytes4 => bool) private _supportedInterfaces;

constructor () internal {
constructor () {
// Derived contracts need only register support for their own interfaces,
// we register support for ERC165 itself here
_registerInterface(_INTERFACE_ID_ERC165);
Expand Down
2 changes: 1 addition & 1 deletion contracts/introspection/ERC165Checker.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.2 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Library used to query support of an interface declared via {IERC165}.
Expand Down
2 changes: 1 addition & 1 deletion contracts/introspection/ERC1820Implementer.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "./IERC1820Implementer.sol";

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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Interface of the ERC165 standard, as defined in the
Expand Down
2 changes: 1 addition & 1 deletion contracts/introspection/IERC1820Implementer.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Interface for an ERC1820 implementer, as defined in the
Expand Down
2 changes: 1 addition & 1 deletion contracts/introspection/IERC1820Registry.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Interface of the global ERC1820 Registry, as defined in the
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/Math.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Standard math utilities missing in the Solidity language.
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/SafeMath.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
Expand Down
2 changes: 1 addition & 1 deletion contracts/math/SignedSafeMath.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

/**
* @title SignedSafeMath
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/AccessControlMock.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../access/AccessControl.sol";

contract AccessControlMock is AccessControl {
constructor() public {
constructor() {
_setupRole(DEFAULT_ADMIN_ROLE, _msgSender());
}

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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../utils/Address.sol";

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ArraysImpl.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../utils/Arrays.sol";

Expand All @@ -9,7 +9,7 @@ contract ArraysImpl {

uint256[] private _array;

constructor (uint256[] memory array) public {
constructor (uint256[] memory array) {
_array = array;
}

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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

contract CallReceiverMock {
string public sharedAnswer;
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ClashingImplementation.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;


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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../payment/escrow/ConditionalEscrow.sol";

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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../GSN/Context.sol";

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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../utils/Counters.sol";

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

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../utils/Create2.sol";
import "../introspection/ERC1820Implementer.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/DummyImplementation.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

abstract contract Impl {
function version() public pure virtual returns (string memory);
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/ECDSAMock.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../cryptography/ECDSA.sol";

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC1155BurnableMock.sol
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../token/ERC1155/ERC1155Burnable.sol";

contract ERC1155BurnableMock is ERC1155Burnable {
constructor(string memory uri) public ERC1155(uri) { }
constructor(string memory uri) ERC1155(uri) { }

function mint(address to, uint256 id, uint256 value, bytes memory data) public {
_mint(to, id, value, data);
Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC1155Mock.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "../token/ERC1155/ERC1155.sol";

Expand All @@ -9,7 +9,7 @@ import "../token/ERC1155/ERC1155.sol";
* This mock just publicizes internal functions for testing purposes
*/
contract ERC1155Mock is ERC1155 {
constructor (string memory uri) public ERC1155(uri) {
constructor (string memory uri) ERC1155(uri) {
// solhint-disable-previous-line no-empty-blocks
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC1155PausableMock.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0 <0.8.0;
pragma solidity ^0.7.0;

import "./ERC1155Mock.sol";
import "../token/ERC1155/ERC1155Pausable.sol";

contract ERC1155PausableMock is ERC1155Mock, ERC1155Pausable {
constructor(string memory uri) public ERC1155Mock(uri) { }
constructor(string memory uri) ERC1155Mock(uri) { }

function pause() external {
_pause();
Expand Down
Loading

0 comments on commit 40a15c0

Please sign in to comment.