use solidity 0.8.18 for hardhat compatibility

This commit is contained in:
Ricardo Guilherme Schmidt 2023-06-28 17:51:53 -03:00
parent 7af15318a1
commit 9ba151266d
No known key found for this signature in database
GPG Key ID: 3F95A3AD0B607030
13 changed files with 20 additions and 20 deletions

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity 0.8.18;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity 0.8.18;
import "./StakeManager.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

View File

@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
pragma solidity 0.8.18;
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
/// @dev `Owned` is a base level contract that assigns an `owner` that can be
/// later changed
contract Owned {

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
import "./SNTPlaceHolder.sol";

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
import "./token/TokenController.sol";
import "./token/MiniMeToken.sol";
import "./SafeMath.sol";
@ -31,7 +31,7 @@ import "./Owned.sol";
/// asks it to do so.
contract SNTPlaceHolder is TokenController, Owned {
using SafeMath for uint256;
MiniMeToken public immutable snt;
MiniMeToken public snt;
constructor(address _owner, address payable _snt) {
owner = _owner;

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
/**
* Math operations with safety checks

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
abstract contract ApproveAndCallFallBack {
function receiveApproval(address from, uint256 _amount, address _token, bytes memory _data) virtual public;
}

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
contract Controlled {
string internal constant ERR_BAD_PARAMETER = "Bad parameter";

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
/*
Copyright 2016, Jordi Baylina
@ -39,9 +39,9 @@ import "./MiniMeTokenFactory.sol";
contract MiniMeToken is Controlled {
string public name; //The Token's name: e.g. DigixDAO Tokens
uint8 public immutable decimals; //Number of decimals of the smallest unit
uint8 public decimals; //Number of decimals of the smallest unit
string public symbol; //An identifier: e.g. REP
string public constant version = "MMT_0.1"; //An arbitrary versioning scheme
string public version = "MMT_0.1"; //An arbitrary versioning scheme
/**
* @dev `Checkpoint` is the structure that attaches a block number to a
@ -59,14 +59,14 @@ contract MiniMeToken is Controlled {
// `parentToken` is the Token address that was cloned to produce this token;
// it will be 0x0 for a token that was not cloned
MiniMeToken public immutable parentToken;
MiniMeToken public parentToken;
// `parentSnapShotBlock` is the block number from the Parent Token that was
// used to determine the initial distribution of the Clone Token
uint public immutable parentSnapShotBlock;
uint public parentSnapShotBlock;
// `creationBlock` is the block number that the Clone Token was created
uint public immutable creationBlock;
uint public creationBlock;
// `balances` is the map that tracks the balance of each address, in this
// contract when the balance changes the block number that the change
@ -83,7 +83,7 @@ contract MiniMeToken is Controlled {
bool public transfersEnabled;
// The factory used to create new clone tokens
MiniMeTokenFactory public immutable tokenFactory;
MiniMeTokenFactory public tokenFactory;
////////////////
// Constructor

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
import "./MiniMeToken.sol";
////////////////

View File

@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.4.20;
pragma solidity 0.8.18;
/**
* @dev The token controller contract must implement these functions
*/

View File

@ -2,7 +2,7 @@ require("@nomicfoundation/hardhat-toolbox");
/** @type import('hardhat/config').HardhatUserConfig */
module.exports = {
solidity: "0.8.20",
solidity: "0.8.18",
mocha: {
timeout: 100000000,
}