Migrate contracts to Solidity 0.7 (#2319)
* Update contract pragmas to solidity 0.7 * Remove internal declaration on constructors * Reference SafeMath explicitely * Remove public constructor declaration from abstract contracts * Remove public constructor declaration from non-abstract contracts
This commit is contained in:
@ -20,7 +20,7 @@ For example, imagine you want to change xref:api:access.adoc#AccessControl[`Acce
|
||||
```solidity
|
||||
// contracts/ModifiedAccessControl.sol
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "@openzeppelin/contracts/access/AccessControl.sol";
|
||||
|
||||
@ -48,7 +48,7 @@ Here is a modified version of xref:api:access.adoc#AccessControl[`AccessControl`
|
||||
```solidity
|
||||
// contracts/ModifiedAccessControl.sol
|
||||
// SPDX-License-Identifier: MIT
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "@openzeppelin/contracts/access/AccessControl.sol";
|
||||
|
||||
@ -80,7 +80,7 @@ Hooks are simply functions that are called before or after some action takes pla
|
||||
Here's how you would implement the `IERC721Receiver` pattern in `ERC20`, using the xref:api:token/ERC20.adoc#ERC20-_beforeTokenTransfer-address-address-uint256-[`_beforeTokenTransfer`] hook:
|
||||
|
||||
```solidity
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user