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:
@ -1,6 +1,6 @@
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
pragma solidity ^0.6.0;
|
||||
pragma solidity ^0.7.0;
|
||||
|
||||
import "./ERC20.sol";
|
||||
|
||||
@ -8,13 +8,15 @@ 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 {
|
||||
constructor (uint256 cap) {
|
||||
require(cap > 0, "ERC20Capped: cap is 0");
|
||||
_cap = cap;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user