Unverified Commit 90ed1af9 by Francisco Giordano Committed by GitHub

Support compiling with solc 0.7 (#2408)

parent 21344b91
...@@ -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 }]
} }
} }
// 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";
......
{ {
"name": "@openzeppelin/contracts", "name": "@openzeppelin/contracts",
"description": "Secure Smart Contract library for Solidity", "description": "Secure Smart Contract library for Solidity",
"version": "3.2.0", "version": "3.2.2-solc-0.7",
"files": [ "files": [
"**/*.sol", "**/*.sol",
"/build/contracts/*.json", "/build/contracts/*.json",
......
// 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.
* *
......
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