Commit 289e15ab by github-actions

Merge upstream openzeppelin-contracts into upstream-patched

parents da645a20 877f4403
......@@ -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 }]
}
}
......@@ -22,7 +22,7 @@
* `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))
* `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)
......
// 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";
......
// 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.
*
......
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