Commit 289e15ab by github-actions

Merge upstream openzeppelin-contracts into upstream-patched

parents da645a20 877f4403
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
"func-order": "off", "func-order": "off",
"mark-callable-contracts": "off", "mark-callable-contracts": "off",
"no-empty-blocks": "off", "no-empty-blocks": "off",
"compiler-version": ["error", "^0.6.0"], "compiler-version": "off",
"private-vars-leading-underscore": "error", "private-vars-leading-underscore": "error",
"reason-string": "off" "reason-string": "off",
"func-visibility": ["error", { "ignoreConstructors": true }]
} }
} }
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
* `Address`: added `functionStaticCall` and `functionDelegateCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333)) * `Address`: added `functionStaticCall` and `functionDelegateCall`, similar to the existing `functionCall`. ([#2333](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2333))
* `TimelockController`: added a contract to augment access control schemes with a delay. ([#2364](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2364)) * `TimelockController`: added a contract to augment access control schemes with a delay. ([#2364](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2364))
* `EnumerableSet`: added `BytesSet`, for sets of `bytes32`. ([#2395](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2395)) * `EnumerableSet`: added `Bytes32Set`, for sets of `bytes32`. ([#2395](https://github.com/OpenZeppelin/openzeppelin-contracts/pull/2395))
## 3.2.0 (2020-09-10) ## 3.2.0 (2020-09-10)
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/* /*
* @dev Provides information about the current execution context, including the * @dev Provides information about the current execution context, including the
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IRelayRecipient.sol"; import "./IRelayRecipient.sol";
import "./IRelayHub.sol"; import "./IRelayHub.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./GSNRecipient.sol"; import "./GSNRecipient.sol";
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
...@@ -86,6 +86,8 @@ contract GSNRecipientERC20Fee is GSNRecipient { ...@@ -86,6 +86,8 @@ contract GSNRecipientERC20Fee is GSNRecipient {
// The maximum token charge is pre-charged from the user // The maximum token charge is pre-charged from the user
_token.safeTransferFrom(from, address(this), maxPossibleCharge); _token.safeTransferFrom(from, address(this), maxPossibleCharge);
return 0;
} }
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./GSNRecipient.sol"; import "./GSNRecipient.sol";
import "../cryptography/ECDSA.sol"; import "../cryptography/ECDSA.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface for `RelayHub`, the core contract of the GSN. Users should not need to interact with this contract * @dev Interface for `RelayHub`, the core contract of the GSN. Users should not need to interact with this contract
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Base interface for a contract that will be called via the GSN from {IRelayHub}. * @dev Base interface for a contract that will be called via the GSN from {IRelayHub}.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol"; import "../utils/EnumerableSet.sol";
import "../utils/Address.sol"; import "../utils/Address.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
/** /**
...@@ -15,7 +15,7 @@ import "../GSN/Context.sol"; ...@@ -15,7 +15,7 @@ import "../GSN/Context.sol";
* `onlyOwner`, which can be applied to your functions to restrict their use to * `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner. * the owner.
*/ */
contract Ownable is Context { abstract contract Ownable is Context {
address private _owner; address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.9 <0.8.0;
pragma experimental ABIEncoderV2; pragma experimental ABIEncoderV2;
import "./../math/SafeMath.sol"; import "./../math/SafeMath.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev These functions deal with verification of Merkle trees (hash trees), * @dev These functions deal with verification of Merkle trees (hash trees),
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IERC165.sol"; import "./IERC165.sol";
...@@ -10,7 +10,7 @@ import "./IERC165.sol"; ...@@ -10,7 +10,7 @@ import "./IERC165.sol";
* Contracts may inherit from this and call {_registerInterface} to declare * Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface. * their support of an interface.
*/ */
contract ERC165 is IERC165 { abstract contract ERC165 is IERC165 {
/* /*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/ */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
/** /**
* @dev Library used to query support of an interface declared via {IERC165}. * @dev Library used to query support of an interface declared via {IERC165}.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IERC1820Implementer.sol"; import "./IERC1820Implementer.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface of the ERC165 standard, as defined in the * @dev Interface of the ERC165 standard, as defined in the
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface for an ERC1820 implementer, as defined in the * @dev Interface for an ERC1820 implementer, as defined in the
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface of the global ERC1820 Registry, as defined in the * @dev Interface of the global ERC1820 Registry, as defined in the
...@@ -59,7 +59,7 @@ interface IERC1820Registry { ...@@ -59,7 +59,7 @@ interface IERC1820Registry {
* queried for support, unless `implementer` is the caller. See * queried for support, unless `implementer` is the caller. See
* {IERC1820Implementer-canImplementInterfaceForAddress}. * {IERC1820Implementer-canImplementInterfaceForAddress}.
*/ */
function setInterfaceImplementer(address account, bytes32 interfaceHash, address implementer) external; function setInterfaceImplementer(address account, bytes32 _interfaceHash, address implementer) external;
/** /**
* @dev Returns the implementer of `interfaceHash` for `account`. If no such * @dev Returns the implementer of `interfaceHash` for `account`. If no such
...@@ -70,7 +70,7 @@ interface IERC1820Registry { ...@@ -70,7 +70,7 @@ interface IERC1820Registry {
* *
* `account` being the zero address is an alias for the caller's address. * `account` being the zero address is an alias for the caller's address.
*/ */
function getInterfaceImplementer(address account, bytes32 interfaceHash) external view returns (address); function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);
/** /**
* @dev Returns the interface hash for an `interfaceName`, as defined in the * @dev Returns the interface hash for an `interfaceName`, as defined in the
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Standard math utilities missing in the Solidity language. * @dev Standard math utilities missing in the Solidity language.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Wrappers over Solidity's arithmetic operations with added overflow * @dev Wrappers over Solidity's arithmetic operations with added overflow
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @title SignedSafeMath * @title SignedSafeMath
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol"; import "../access/AccessControl.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/Address.sol"; import "../utils/Address.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/Arrays.sol"; import "../utils/Arrays.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
contract CallReceiverMock { contract CallReceiverMock {
string public sharedAnswer; string public sharedAnswer;
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../payment/escrow/ConditionalEscrow.sol"; import "../payment/escrow/ConditionalEscrow.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/Counters.sol"; import "../utils/Counters.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/Create2.sol"; import "../utils/Create2.sol";
import "../introspection/ERC1820Implementer.sol"; import "../introspection/ERC1820Implementer.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
abstract contract Impl { abstract contract Impl {
function version() public pure virtual returns (string memory); function version() public pure virtual returns (string memory);
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../cryptography/ECDSA.sol"; import "../cryptography/ECDSA.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC1155/ERC1155Burnable.sol"; import "../token/ERC1155/ERC1155Burnable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC1155/ERC1155.sol"; import "../token/ERC1155/ERC1155.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155Mock.sol"; import "./ERC1155Mock.sol";
import "../token/ERC1155/ERC1155Pausable.sol"; import "../token/ERC1155/ERC1155Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC1155/IERC1155Receiver.sol"; import "../token/ERC1155/IERC1155Receiver.sol";
import "./ERC165Mock.sol"; import "./ERC165Mock.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../introspection/IERC165.sol"; import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
contract ERC165NotSupported { } contract ERC165NotSupported { }
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../introspection/ERC165Checker.sol"; import "../introspection/ERC165Checker.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../introspection/ERC165.sol"; import "../introspection/ERC165.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../introspection/ERC1820Implementer.sol"; import "../introspection/ERC1820Implementer.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Burnable.sol"; import "../token/ERC20/ERC20Burnable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Capped.sol"; import "../token/ERC20/ERC20Capped.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20.sol"; import "../token/ERC20/ERC20.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Pausable.sol"; import "../token/ERC20/ERC20Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Snapshot.sol"; import "../token/ERC20/ERC20Snapshot.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721Burnable.sol"; import "../token/ERC721/ERC721Burnable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721.sol"; import "../token/ERC721/ERC721.sol";
import "../GSN/GSNRecipient.sol"; import "../GSN/GSNRecipient.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721.sol"; import "../token/ERC721/ERC721.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721Pausable.sol"; import "../token/ERC721/ERC721Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/IERC721Receiver.sol"; import "../token/ERC721/IERC721Receiver.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../token/ERC777/ERC777.sol"; import "../token/ERC777/ERC777.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../token/ERC777/IERC777.sol"; import "../token/ERC777/IERC777.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableMap.sol"; import "../utils/EnumerableMap.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol"; import "../utils/EnumerableSet.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
contract EtherReceiverMock { contract EtherReceiverMock {
bool private _acceptEther; bool private _acceptEther;
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/GSNRecipient.sol"; import "../GSN/GSNRecipient.sol";
import "../GSN/GSNRecipientERC20Fee.sol"; import "../GSN/GSNRecipientERC20Fee.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ContextMock.sol"; import "./ContextMock.sol";
import "../GSN/GSNRecipient.sol"; import "../GSN/GSNRecipient.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/GSNRecipient.sol"; import "../GSN/GSNRecipient.sol";
import "../GSN/GSNRecipientSignature.sol"; import "../GSN/GSNRecipientSignature.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol"; import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../math/Math.sol"; import "../math/Math.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import { MerkleProof } from "../cryptography/MerkleProof.sol"; import { MerkleProof } from "../cryptography/MerkleProof.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol"; import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../access/Ownable.sol"; import "../access/Ownable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/Pausable.sol"; import "../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../payment/PullPayment.sol"; import "../payment/PullPayment.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
contract ReentrancyAttack is Context { contract ReentrancyAttack is Context {
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/ReentrancyGuard.sol"; import "../utils/ReentrancyGuard.sol";
import "./ReentrancyAttack.sol"; import "./ReentrancyAttack.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol"; import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/SafeCast.sol"; import "../utils/SafeCast.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../token/ERC20/IERC20.sol"; import "../token/ERC20/IERC20.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../math/SignedSafeMath.sol"; import "../math/SignedSafeMath.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol"; import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../utils/Strings.sol"; import "../utils/Strings.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
...@@ -39,13 +39,13 @@ contract PaymentSplitter is Context { ...@@ -39,13 +39,13 @@ contract PaymentSplitter is Context {
* All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
* duplicates in `payees`. * duplicates in `payees`.
*/ */
constructor (address[] memory payees, uint256[] memory shares) public payable { constructor (address[] memory payees, uint256[] memory shares_) public payable {
// solhint-disable-next-line max-line-length // solhint-disable-next-line max-line-length
require(payees.length == shares.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
require(payees.length > 0, "PaymentSplitter: no payees"); require(payees.length > 0, "PaymentSplitter: no payees");
for (uint256 i = 0; i < payees.length; i++) { for (uint256 i = 0; i < payees.length; i++) {
_addPayee(payees[i], shares[i]); _addPayee(payees[i], shares_[i]);
} }
} }
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
import "./escrow/Escrow.sol"; import "./escrow/Escrow.sol";
...@@ -22,7 +22,7 @@ import "./escrow/Escrow.sol"; ...@@ -22,7 +22,7 @@ import "./escrow/Escrow.sol";
* instead of Solidity's `transfer` function. Payees can query their due * instead of Solidity's `transfer` function. Payees can query their due
* payments with {payments}, and retrieve them with {withdrawPayments}. * payments with {payments}, and retrieve them with {withdrawPayments}.
*/ */
contract PullPayment { abstract contract PullPayment {
Escrow private _escrow; Escrow private _escrow;
constructor () internal { constructor () internal {
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./Escrow.sol"; import "./Escrow.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../../access/Ownable.sol"; import "../../access/Ownable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ConditionalEscrow.sol"; import "./ConditionalEscrow.sol";
...@@ -25,11 +25,11 @@ contract RefundEscrow is ConditionalEscrow { ...@@ -25,11 +25,11 @@ contract RefundEscrow is ConditionalEscrow {
/** /**
* @dev Constructor. * @dev Constructor.
* @param beneficiary The beneficiary of the deposits. * @param beneficiary_ The beneficiary of the deposits.
*/ */
constructor (address payable beneficiary) public { constructor (address payable beneficiary_) public {
require(beneficiary != address(0), "RefundEscrow: beneficiary is the zero address"); require(beneficiary_ != address(0), "RefundEscrow: beneficiary is the zero address");
_beneficiary = beneficiary; _beneficiary = beneficiary_;
_state = State.Active; _state = State.Active;
} }
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol"; import "../access/AccessControl.sol";
import "../GSN/Context.sol"; import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol"; import "../access/AccessControl.sol";
import "../GSN/Context.sol"; import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol"; import "../access/AccessControl.sol";
import "../GSN/Context.sol"; import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
// solhint-disable-next-line compiler-version // solhint-disable-next-line compiler-version
pragma solidity >=0.4.24 <0.7.0; pragma solidity >=0.4.24 <0.8.0;
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM * @dev This abstract contract provides a fallback function that delegates all calls to another contract using the EVM
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../access/Ownable.sol"; import "../access/Ownable.sol";
import "./TransparentUpgradeableProxy.sol"; import "./TransparentUpgradeableProxy.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./UpgradeableProxy.sol"; import "./UpgradeableProxy.sol";
...@@ -30,9 +30,9 @@ contract TransparentUpgradeableProxy is UpgradeableProxy { ...@@ -30,9 +30,9 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and * @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
* optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}. * optionally initialized with `_data` as explained in {UpgradeableProxy-constructor}.
*/ */
constructor(address _logic, address _admin, bytes memory _data) public payable UpgradeableProxy(_logic, _data) { constructor(address _logic, address admin_, bytes memory _data) public payable UpgradeableProxy(_logic, _data) {
assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1)); assert(_ADMIN_SLOT == bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1));
_setAdmin(_admin); _setAdmin(admin_);
} }
/** /**
...@@ -67,8 +67,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy { ...@@ -67,8 +67,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103` * `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/ */
function admin() external ifAdmin returns (address) { function admin() external ifAdmin returns (address admin_) {
return _admin(); admin_ = _admin();
} }
/** /**
...@@ -80,8 +80,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy { ...@@ -80,8 +80,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call. * https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc` * `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
*/ */
function implementation() external ifAdmin returns (address) { function implementation() external ifAdmin returns (address implementation_) {
return _implementation(); implementation_ = _implementation();
} }
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./Proxy.sol"; import "./Proxy.sol";
import "../utils/Address.sol"; import "../utils/Address.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IERC1155.sol"; import "./IERC1155.sol";
import "./IERC1155MetadataURI.sol"; import "./IERC1155MetadataURI.sol";
...@@ -52,8 +52,8 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { ...@@ -52,8 +52,8 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
/** /**
* @dev See {_setURI}. * @dev See {_setURI}.
*/ */
constructor (string memory uri) public { constructor (string memory uri_) public {
_setURI(uri); _setURI(uri_);
// register the supported interfaces to conform to ERC1155 via ERC165 // register the supported interfaces to conform to ERC1155 via ERC165
_registerInterface(_INTERFACE_ID_ERC1155); _registerInterface(_INTERFACE_ID_ERC1155);
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155.sol"; import "./ERC1155.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155Receiver.sol"; import "./ERC1155Receiver.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155.sol"; import "./ERC1155.sol";
import "../../utils/Pausable.sol"; import "../../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IERC1155Receiver.sol"; import "./IERC1155Receiver.sol";
import "../../introspection/ERC165.sol"; import "../../introspection/ERC165.sol";
...@@ -9,7 +9,7 @@ import "../../introspection/ERC165.sol"; ...@@ -9,7 +9,7 @@ import "../../introspection/ERC165.sol";
* @dev _Available since v3.1._ * @dev _Available since v3.1._
*/ */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
constructor() public { constructor() internal {
_registerInterface( _registerInterface(
ERC1155Receiver(0).onERC1155Received.selector ^ ERC1155Receiver(0).onERC1155Received.selector ^
ERC1155Receiver(0).onERC1155BatchReceived.selector ERC1155Receiver(0).onERC1155BatchReceived.selector
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
import "../../introspection/IERC165.sol"; import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
import "./IERC1155.sol"; import "./IERC1155.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../introspection/IERC165.sol"; import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol"; import "../../GSN/Context.sol";
import "./IERC20.sol"; import "./IERC20.sol";
...@@ -52,9 +52,9 @@ contract ERC20 is Context, IERC20 { ...@@ -52,9 +52,9 @@ contract ERC20 is Context, IERC20 {
* All three of these values are immutable: they can only be set once during * All three of these values are immutable: they can only be set once during
* construction. * construction.
*/ */
constructor (string memory name, string memory symbol) public { constructor (string memory name_, string memory symbol_) public {
_name = name; _name = name_;
_symbol = symbol; _symbol = symbol_;
_decimals = 18; _decimals = 18;
} }
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol"; import "../../GSN/Context.sol";
import "./ERC20.sol"; import "./ERC20.sol";
...@@ -11,6 +11,8 @@ import "./ERC20.sol"; ...@@ -11,6 +11,8 @@ import "./ERC20.sol";
* recognized off-chain (via event analysis). * recognized off-chain (via event analysis).
*/ */
abstract contract ERC20Burnable is Context, ERC20 { abstract contract ERC20Burnable is Context, ERC20 {
using SafeMath for uint256;
/** /**
* @dev Destroys `amount` tokens from the caller. * @dev Destroys `amount` tokens from the caller.
* *
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC20.sol"; import "./ERC20.sol";
...@@ -8,15 +8,17 @@ import "./ERC20.sol"; ...@@ -8,15 +8,17 @@ import "./ERC20.sol";
* @dev Extension of {ERC20} that adds a cap to the supply of tokens. * @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/ */
abstract contract ERC20Capped is ERC20 { abstract contract ERC20Capped is ERC20 {
using SafeMath for uint256;
uint256 private _cap; uint256 private _cap;
/** /**
* @dev Sets the value of the `cap`. This value is immutable, it can only be * @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction. * set once during construction.
*/ */
constructor (uint256 cap) public { constructor (uint256 cap_) internal {
require(cap > 0, "ERC20Capped: cap is 0"); require(cap_ > 0, "ERC20Capped: cap is 0");
_cap = cap; _cap = cap_;
} }
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC20.sol"; import "./ERC20.sol";
import "../../utils/Pausable.sol"; import "../../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
import "../../utils/Arrays.sol"; import "../../utils/Arrays.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface of the ERC20 standard as defined in the EIP. * @dev Interface of the ERC20 standard as defined in the EIP.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IERC20.sol"; import "./IERC20.sol";
import "../../math/SafeMath.sol"; import "../../math/SafeMath.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./SafeERC20.sol"; import "./SafeERC20.sol";
...@@ -23,12 +23,12 @@ contract TokenTimelock { ...@@ -23,12 +23,12 @@ contract TokenTimelock {
// timestamp when token release is enabled // timestamp when token release is enabled
uint256 private _releaseTime; uint256 private _releaseTime;
constructor (IERC20 token, address beneficiary, uint256 releaseTime) public { constructor (IERC20 token_, address beneficiary_, uint256 releaseTime_) public {
// solhint-disable-next-line not-rely-on-time // solhint-disable-next-line not-rely-on-time
require(releaseTime > block.timestamp, "TokenTimelock: release time is before current time"); require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time");
_token = token; _token = token_;
_beneficiary = beneficiary; _beneficiary = beneficiary_;
_releaseTime = releaseTime; _releaseTime = releaseTime_;
} }
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol"; import "../../GSN/Context.sol";
import "./IERC721.sol"; import "./IERC721.sol";
...@@ -90,9 +90,9 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable ...@@ -90,9 +90,9 @@ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable
/** /**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/ */
constructor (string memory name, string memory symbol) public { constructor (string memory name_, string memory symbol_) public {
_name = name; _name = name_;
_symbol = symbol; _symbol = symbol_;
// register the supported interfaces to conform to ERC721 via ERC165 // register the supported interfaces to conform to ERC721 via ERC165
_registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721);
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol"; import "../../GSN/Context.sol";
import "./ERC721.sol"; import "./ERC721.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./IERC721Receiver.sol"; import "./IERC721Receiver.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "./ERC721.sol"; import "./ERC721.sol";
import "../../utils/Pausable.sol"; import "../../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
import "../../introspection/IERC165.sol"; import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
import "./IERC721.sol"; import "./IERC721.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
import "./IERC721.sol"; import "./IERC721.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @title ERC721 token receiver interface * @title ERC721 token receiver interface
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol"; import "../../GSN/Context.sol";
import "./IERC777.sol"; import "./IERC777.sol";
...@@ -67,14 +67,14 @@ contract ERC777 is Context, IERC777, IERC20 { ...@@ -67,14 +67,14 @@ contract ERC777 is Context, IERC777, IERC20 {
* @dev `defaultOperators` may be an empty array. * @dev `defaultOperators` may be an empty array.
*/ */
constructor( constructor(
string memory name, string memory name_,
string memory symbol, string memory symbol_,
address[] memory defaultOperators address[] memory defaultOperators_
) public { ) public {
_name = name; _name = name_;
_symbol = symbol; _symbol = symbol_;
_defaultOperatorsArray = defaultOperators; _defaultOperatorsArray = defaultOperators_;
for (uint256 i = 0; i < _defaultOperatorsArray.length; i++) { for (uint256 i = 0; i < _defaultOperatorsArray.length; i++) {
_defaultOperators[_defaultOperatorsArray[i]] = true; _defaultOperators[_defaultOperatorsArray[i]] = true;
} }
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface of the ERC777Token standard as defined in the EIP. * @dev Interface of the ERC777Token standard as defined in the EIP.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface of the ERC777TokensRecipient standard as defined in the EIP. * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Interface of the ERC777TokensSender standard as defined in the EIP. * @dev Interface of the ERC777TokensSender standard as defined in the EIP.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.2; pragma solidity >=0.6.2 <0.8.0;
/** /**
* @dev Collection of functions related to the address type * @dev Collection of functions related to the address type
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../math/Math.sol"; import "../math/Math.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../math/SafeMath.sol"; import "../math/SafeMath.sol";
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer. * @dev Helper to make usage of the `CREATE2` EVM opcode easier and safer.
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Library for managing an enumerable variant of Solidity's * @dev Library for managing an enumerable variant of Solidity's
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev Library for managing * @dev Library for managing
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol"; import "../GSN/Context.sol";
...@@ -13,7 +13,7 @@ import "../GSN/Context.sol"; ...@@ -13,7 +13,7 @@ import "../GSN/Context.sol";
* the functions of your contract. Note that they will not be pausable by * the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place. * simply including this module, only once the modifiers are put in place.
*/ */
contract Pausable is Context { abstract contract Pausable is Context {
/** /**
* @dev Emitted when the pause is triggered by `account`. * @dev Emitted when the pause is triggered by `account`.
*/ */
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.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.
...@@ -18,7 +18,7 @@ pragma solidity ^0.6.0; ...@@ -18,7 +18,7 @@ pragma solidity ^0.6.0;
* to protect against it, check out our blog post * to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/ */
contract ReentrancyGuard { abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full // Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the // word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write // slot's contents, replace the bits taken up by the boolean, and then write
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
......
// SPDX-License-Identifier: MIT // SPDX-License-Identifier: MIT
pragma solidity ^0.6.0; pragma solidity >=0.6.0 <0.8.0;
/** /**
* @dev String operations. * @dev String operations.
......
...@@ -17,7 +17,7 @@ current_version() { ...@@ -17,7 +17,7 @@ current_version() {
current_release_branch() { current_release_branch() {
v="$(current_version)" v="$(current_version)"
echo "release-${v%%-"$PRERELEASE_SUFFIX".*}" echo "release-${v%.*-"$PRERELEASE_SUFFIX".*}"
} }
assert_current_branch() { assert_current_branch() {
......
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
const fs = require('fs'); const fs = require('fs');
const cp = require('child_process'); const cp = require('child_process');
const suffix = process.env.PRERELEASE_SUFFIX || 'rc';
const changelog = fs.readFileSync('CHANGELOG.md', 'utf8'); const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
// The changelog entry to be updated looks like this: // The changelog entry to be updated looks like this:
...@@ -13,18 +15,20 @@ const changelog = fs.readFileSync('CHANGELOG.md', 'utf8'); ...@@ -13,18 +15,20 @@ const changelog = fs.readFileSync('CHANGELOG.md', 'utf8');
// We need to add the version and release date in a YYYY-MM-DD format, so that it looks like this: // We need to add the version and release date in a YYYY-MM-DD format, so that it looks like this:
// ## 2.5.3 (2019-04-25) // ## 2.5.3 (2019-04-25)
const unreleased = /^## Unreleased$/im; const pkg = require('../../package.json');
const version = pkg.version.replace(new RegExp('-' + suffix + '\\..*'), '');
const header = new RegExp(`^## (Unreleased|${version})$`, 'm');
if (!unreleased.test(changelog)) { if (!header.test(changelog)) {
console.error('Missing changelog entry'); console.error('Missing changelog entry');
process.exit(1); process.exit(1);
} }
const { version } = require('../../package.json'); const newHeader = pkg.version.indexOf(suffix) === -1
? `## ${version} (${new Date().toISOString().split('T')[0]})`
: `## ${version}`;
fs.writeFileSync('CHANGELOG.md', changelog.replace( fs.writeFileSync('CHANGELOG.md', changelog.replace(header, newHeader));
unreleased,
`## ${version} (${new Date().toISOString().split('T')[0]})`),
);
cp.execSync('git add CHANGELOG.md', { stdio: 'inherit' }); cp.execSync('git add CHANGELOG.md', { stdio: 'inherit' });
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