Unverified Commit 90ed1af9 by Francisco Giordano Committed by GitHub

Support compiling with solc 0.7 (#2408)

parent 21344b91
......@@ -4,8 +4,9 @@
"func-order": "off",
"mark-callable-contracts": "off",
"no-empty-blocks": "off",
"compiler-version": ["error", "^0.6.0"],
"compiler-version": "off",
"private-vars-leading-underscore": "error",
"reason-string": "off"
"reason-string": "off",
"func-visibility": ["error", { "ignoreConstructors": true }]
}
}
// 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
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IRelayRecipient.sol";
import "./IRelayHub.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./GSNRecipient.sol";
import "../math/SafeMath.sol";
......@@ -86,6 +86,8 @@ contract GSNRecipientERC20Fee is GSNRecipient {
// The maximum token charge is pre-charged from the user
_token.safeTransferFrom(from, address(this), maxPossibleCharge);
return 0;
}
/**
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./GSNRecipient.sol";
import "../cryptography/ECDSA.sol";
......
// 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
......
// 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}.
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol";
import "../utils/Address.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
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
* the owner.
*/
contract Ownable is Context {
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.9 <0.8.0;
pragma experimental ABIEncoderV2;
import "./../math/SafeMath.sol";
......
// 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.
......
// 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),
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IERC165.sol";
......@@ -10,7 +10,7 @@ import "./IERC165.sol";
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/
contract ERC165 is IERC165 {
abstract contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
......
// 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}.
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IERC1820Implementer.sol";
......
// 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
......
// 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
......
// 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
......@@ -59,7 +59,7 @@ interface IERC1820Registry {
* queried for support, unless `implementer` is the caller. See
* {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
......@@ -70,7 +70,7 @@ interface IERC1820Registry {
*
* `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
......
// 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.
......
// 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
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
/**
* @title SignedSafeMath
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Address.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Arrays.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
contract CallReceiverMock {
string public sharedAnswer;
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
/**
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../payment/escrow/ConditionalEscrow.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Counters.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Create2.sol";
import "../introspection/ERC1820Implementer.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
abstract contract Impl {
function version() public pure virtual returns (string memory);
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../cryptography/ECDSA.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC1155/ERC1155Burnable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC1155/ERC1155.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155Mock.sol";
import "../token/ERC1155/ERC1155Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC1155/IERC1155Receiver.sol";
import "./ERC165Mock.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
contract ERC165NotSupported { }
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../introspection/ERC165Checker.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../introspection/ERC165.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../introspection/ERC1820Implementer.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Burnable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Capped.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC20/ERC20Snapshot.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721Burnable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721.sol";
import "../GSN/GSNRecipient.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/ERC721Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../token/ERC721/IERC721Receiver.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
import "../token/ERC777/ERC777.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
import "../token/ERC777/IERC777.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableMap.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/EnumerableSet.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
contract EtherReceiverMock {
bool private _acceptEther;
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/GSNRecipient.sol";
import "../GSN/GSNRecipientERC20Fee.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ContextMock.sol";
import "../GSN/GSNRecipient.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/GSNRecipient.sol";
import "../GSN/GSNRecipientSignature.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../math/Math.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import { MerkleProof } from "../cryptography/MerkleProof.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../access/Ownable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../payment/PullPayment.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
contract ReentrancyAttack is Context {
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/ReentrancyGuard.sol";
import "./ReentrancyAttack.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/SafeCast.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
import "../token/ERC20/IERC20.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../math/SafeMath.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../math/SignedSafeMath.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../proxy/Initializable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Strings.sol";
......
{
"name": "@openzeppelin/contracts",
"description": "Secure Smart Contract library for Solidity",
"version": "3.2.0",
"version": "3.2.2-solc-0.7",
"files": [
"**/*.sol",
"/build/contracts/*.json",
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../GSN/Context.sol";
import "../math/SafeMath.sol";
......@@ -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
* 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
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");
for (uint256 i = 0; i < payees.length; i++) {
_addPayee(payees[i], shares[i]);
_addPayee(payees[i], shares_[i]);
}
}
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
pragma solidity >=0.6.2 <0.8.0;
import "./escrow/Escrow.sol";
......@@ -22,7 +22,7 @@ import "./escrow/Escrow.sol";
* instead of Solidity's `transfer` function. Payees can query their due
* payments with {payments}, and retrieve them with {withdrawPayments}.
*/
contract PullPayment {
abstract contract PullPayment {
Escrow private _escrow;
constructor () internal {
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./Escrow.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../math/SafeMath.sol";
import "../../access/Ownable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ConditionalEscrow.sol";
......@@ -25,11 +25,11 @@ contract RefundEscrow is ConditionalEscrow {
/**
* @dev Constructor.
* @param beneficiary The beneficiary of the deposits.
* @param beneficiary_ The beneficiary of the deposits.
*/
constructor (address payable beneficiary) public {
require(beneficiary != address(0), "RefundEscrow: beneficiary is the zero address");
_beneficiary = beneficiary;
constructor (address payable beneficiary_) public {
require(beneficiary_ != address(0), "RefundEscrow: beneficiary is the zero address");
_beneficiary = beneficiary_;
_state = State.Active;
}
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol";
import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol";
import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../access/AccessControl.sol";
import "../GSN/Context.sol";
......
// SPDX-License-Identifier: MIT
// 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
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
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../access/Ownable.sol";
import "./TransparentUpgradeableProxy.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./UpgradeableProxy.sol";
......@@ -30,9 +30,9 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* @dev Initializes an upgradeable proxy managed by `_admin`, backed by the implementation at `_logic`, and
* 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));
_setAdmin(_admin);
_setAdmin(admin_);
}
/**
......@@ -67,8 +67,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0xb53127684a568b3173ae13b9f8a6016e243e63b6e8ee1178d6a717850b5d6103`
*/
function admin() external ifAdmin returns (address) {
return _admin();
function admin() external ifAdmin returns (address admin_) {
admin_ = _admin();
}
/**
......@@ -80,8 +80,8 @@ contract TransparentUpgradeableProxy is UpgradeableProxy {
* https://eth.wiki/json-rpc/API#eth_getstorageat[`eth_getStorageAt`] RPC call.
* `0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc`
*/
function implementation() external ifAdmin returns (address) {
return _implementation();
function implementation() external ifAdmin returns (address implementation_) {
implementation_ = _implementation();
}
/**
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./Proxy.sol";
import "../utils/Address.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IERC1155.sol";
import "./IERC1155MetadataURI.sol";
......@@ -52,8 +52,8 @@ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
/**
* @dev See {_setURI}.
*/
constructor (string memory uri) public {
_setURI(uri);
constructor (string memory uri_) public {
_setURI(uri_);
// register the supported interfaces to conform to ERC1155 via ERC165
_registerInterface(_INTERFACE_ID_ERC1155);
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155Receiver.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC1155.sol";
import "../../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IERC1155Receiver.sol";
import "../../introspection/ERC165.sol";
......@@ -9,7 +9,7 @@ import "../../introspection/ERC165.sol";
* @dev _Available since v3.1._
*/
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
constructor() public {
constructor() internal {
_registerInterface(
ERC1155Receiver(0).onERC1155Received.selector ^
ERC1155Receiver(0).onERC1155BatchReceived.selector
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
pragma solidity >=0.6.2 <0.8.0;
import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
pragma solidity >=0.6.2 <0.8.0;
import "./IERC1155.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol";
import "./IERC20.sol";
......@@ -52,9 +52,9 @@ contract ERC20 is Context, IERC20 {
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol";
import "./ERC20.sol";
......@@ -11,6 +11,8 @@ import "./ERC20.sol";
* recognized off-chain (via event analysis).
*/
abstract contract ERC20Burnable is Context, ERC20 {
using SafeMath for uint256;
/**
* @dev Destroys `amount` tokens from the caller.
*
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC20.sol";
......@@ -8,15 +8,17 @@ import "./ERC20.sol";
* @dev Extension of {ERC20} that adds a cap to the supply of tokens.
*/
abstract contract ERC20Capped is ERC20 {
using SafeMath for uint256;
uint256 private _cap;
/**
* @dev Sets the value of the `cap`. This value is immutable, it can only be
* set once during construction.
*/
constructor (uint256 cap) public {
require(cap > 0, "ERC20Capped: cap is 0");
_cap = cap;
constructor (uint256 cap_) internal {
require(cap_ > 0, "ERC20Capped: cap is 0");
_cap = cap_;
}
/**
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC20.sol";
import "../../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../math/SafeMath.sol";
import "../../utils/Arrays.sol";
......
// 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.
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IERC20.sol";
import "../../math/SafeMath.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./SafeERC20.sol";
......@@ -23,12 +23,12 @@ contract TokenTimelock {
// timestamp when token release is enabled
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
require(releaseTime > block.timestamp, "TokenTimelock: release time is before current time");
_token = token;
_beneficiary = beneficiary;
_releaseTime = releaseTime;
require(releaseTime_ > block.timestamp, "TokenTimelock: release time is before current time");
_token = token_;
_beneficiary = beneficiary_;
_releaseTime = releaseTime_;
}
/**
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol";
import "./IERC721.sol";
......@@ -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.
*/
constructor (string memory name, string memory symbol) public {
_name = name;
_symbol = symbol;
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
// register the supported interfaces to conform to ERC721 via ERC165
_registerInterface(_INTERFACE_ID_ERC721);
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol";
import "./ERC721.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./IERC721Receiver.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "./ERC721.sol";
import "../../utils/Pausable.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
pragma solidity >=0.6.2 <0.8.0;
import "../../introspection/IERC165.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
pragma solidity >=0.6.2 <0.8.0;
import "./IERC721.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.2;
pragma solidity >=0.6.2 <0.8.0;
import "./IERC721.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
/**
* @title ERC721 token receiver interface
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../../GSN/Context.sol";
import "./IERC777.sol";
......@@ -67,14 +67,14 @@ contract ERC777 is Context, IERC777, IERC20 {
* @dev `defaultOperators` may be an empty array.
*/
constructor(
string memory name,
string memory symbol,
address[] memory defaultOperators
string memory name_,
string memory symbol_,
address[] memory defaultOperators_
) public {
_name = name;
_symbol = symbol;
_name = name_;
_symbol = symbol_;
_defaultOperatorsArray = defaultOperators;
_defaultOperatorsArray = defaultOperators_;
for (uint256 i = 0; i < _defaultOperatorsArray.length; i++) {
_defaultOperators[_defaultOperatorsArray[i]] = true;
}
......
// 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.
......
// 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.
......
// 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.
......
// 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
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../math/Math.sol";
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
import "../math/SafeMath.sol";
......
// 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.
......
// 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
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Library for managing
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
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
* 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`.
*/
......
// 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.
......@@ -18,7 +18,7 @@ pragma solidity ^0.6.0;
* to protect against it, check out our blog post
* 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
// 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
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
/**
......
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev String operations.
......
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