Skip to content

Commit

Permalink
Upgrade to 0.8 version
Browse files Browse the repository at this point in the history
  • Loading branch information
zZoMROT committed Oct 20, 2021
1 parent 29e0c6e commit aa2c0ac
Show file tree
Hide file tree
Showing 12 changed files with 41 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"rules": {
"compiler-version": [
"error",
"^0.7.6"
"^0.8.0"
],
"private-vars-leading-underscore": "error",
"func-visibility": ["error", { "ignoreConstructors": true }]
Expand Down
2 changes: 1 addition & 1 deletion contracts/EthReceiver.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;

abstract contract EthReceiver {
receive() external payable {
Expand Down
4 changes: 2 additions & 2 deletions contracts/Permitable.sol
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/drafts/IERC20Permit.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/draft-IERC20Permit.sol";
import "./libraries/RevertReasonParser.sol";
import "./interfaces/IDaiLikePermit.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IDaiLikePermit.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;


interface IDaiLikePermit {
Expand Down
2 changes: 1 addition & 1 deletion contracts/interfaces/IWETH.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/ECDSA.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;

/**
* @dev Simplified copy of OpenZeppelin ECDSA library downgraded to 0.7.6
Expand Down
2 changes: 1 addition & 1 deletion contracts/libraries/RevertReasonParser.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;


library RevertReasonParser {
Expand Down
8 changes: 4 additions & 4 deletions contracts/libraries/UniERC20.sol
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "./RevertReasonParser.sol";

library UniERC20 {
using SafeMath for uint256;
using SafeERC20 for IERC20;

IERC20 private constant _ETH_ADDRESS = IERC20(0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE);
IERC20 private constant _ZERO_ADDRESS = IERC20(0);
IERC20 private constant _ZERO_ADDRESS = IERC20(address(0));

function isETH(IERC20 token) internal pure returns (bool) {
return (token == _ZERO_ADDRESS || token == _ETH_ADDRESS);
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/TokenMock.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.7.6;
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Expand Down
2 changes: 1 addition & 1 deletion hardhat.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module.exports = {
apiKey: process.env.ETHERSCAN_KEY,
},
solidity: {
version: '0.7.6',
version: '0.8.9',
settings: {
optimizer: {
enabled: true,
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
},
"license": "MIT",
"dependencies": {
"@openzeppelin/contracts": "3.4.2-solc-0.7"
"@openzeppelin/contracts": "^4.3.2"
},
"devDependencies": {
"@nomiclabs/hardhat-etherscan": "^2.1.6",
Expand All @@ -23,11 +23,11 @@
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^5.1.0",
"eslint-plugin-standard": "^5.0.0",
"hardhat": "^2.6.2",
"hardhat-deploy": "^0.9.1",
"hardhat": "^2.6.4",
"hardhat-deploy": "^0.9.2",
"hardhat-gas-reporter": "^1.0.4",
"rimraf": "^3.0.2",
"solc": "^0.7.6",
"solc": "^0.8.9",
"solhint": "^3.3.6",
"solidity-coverage": "^0.7.17"
},
Expand Down
40 changes: 23 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,10 @@
find-up "^4.1.0"
fs-extra "^8.1.0"

"@openzeppelin/contracts@3.4.2-solc-0.7":
version "3.4.2-solc-0.7"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-3.4.2-solc-0.7.tgz#38f4dbab672631034076ccdf2f3201fab1726635"
integrity sha512-W6QmqgkADuFcTLzHL8vVoNBtkwjvQRpYIAom7KiUNoLKghyx3FgH0GBjt8NRvigV1ZmMOBllvE1By1C+bi8WpA==
"@openzeppelin/contracts@^4.3.2":
version "4.3.2"
resolved "https://registry.yarnpkg.com/@openzeppelin/contracts/-/contracts-4.3.2.tgz#ff80affd6d352dbe1bbc5b4e1833c41afd6283b6"
integrity sha512-AybF1cesONZStg5kWf6ao9OlqTZuPqddvprc0ky7lrUVOjXeKpmQ2Y9FK+6ygxasb+4aic4O5pneFBfwVsRRRg==

"@openzeppelin/test-helpers@^0.5.13":
version "0.5.13"
Expand Down Expand Up @@ -2201,6 +2201,11 @@ commander@^2.15.0:
resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33"
integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==

commander@^8.1.0:
version "8.2.0"
resolved "https://registry.yarnpkg.com/commander/-/commander-8.2.0.tgz#37fe2bde301d87d47a53adeff8b5915db1381ca8"
integrity sha512-LLKxDvHeL91/8MIyTAD5BFMNtoIwztGPMiM/7Bl8rIPmHCZXRxmSWr91h57dpOpnQ6jIUqEWdXE/uBYMfiVZDA==

component-emitter@^1.2.1:
version "1.3.0"
resolved "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.0.tgz#16e4070fba8ae29b679f2215853ee181ab2eabc0"
Expand Down Expand Up @@ -4255,16 +4260,17 @@ har-validator@~5.1.3:
ajv "^6.12.3"
har-schema "^2.0.0"

hardhat-deploy@^0.9.1:
version "0.9.2"
resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.9.2.tgz#5c26707a5ea65e0dac877d99cce81a14f44434ac"
integrity sha512-JV7ilajpkVsW2ZQSILvQ6QQpOxsOhl15sJ+Yk0Lg1nvOG8FRlsnsnVVcx0QPpiMviea+r0nKUwo6d6U9ISFTAQ==
hardhat-deploy@^0.9.2:
version "0.9.4"
resolved "https://registry.yarnpkg.com/hardhat-deploy/-/hardhat-deploy-0.9.4.tgz#8039b6283e8adc8bc908a3af8079f0d4c9850387"
integrity sha512-0Zr8R5SAq6oK/gi170yCDqPTvKNPHdlm6wQe3ZQg/uiIDZxofpRM2frQVPUFlgdI2yUXtVcGBiPcC2r2fEockw==
dependencies:
"@ethersproject/abi" "^5.4.0"
"@ethersproject/abstract-signer" "^5.4.1"
"@ethersproject/address" "^5.4.0"
"@ethersproject/bignumber" "^5.4.1"
"@ethersproject/bytes" "^5.4.0"
"@ethersproject/constants" "^5.4.0"
"@ethersproject/contracts" "^5.4.1"
"@ethersproject/providers" "^5.4.4"
"@ethersproject/solidity" "^5.4.0"
Expand All @@ -4290,10 +4296,10 @@ hardhat-gas-reporter@^1.0.4:
eth-gas-reporter "^0.2.20"
sha1 "^1.1.1"

hardhat@^2.6.2:
version "2.6.4"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.6.4.tgz#9ff3f139f697bfc4e14836a3fef3ca4c62357d65"
integrity sha512-6QNfu1FptjtyGJ+jBR7LMX7AMY9gWWw9kAUD7v0YZNZH1ZBgsZdMHqXKiSzO5pLQXo+fy9zZovKAUNYbjQ/1fw==
hardhat@^2.6.4:
version "2.6.6"
resolved "https://registry.yarnpkg.com/hardhat/-/hardhat-2.6.6.tgz#11d2dc4c1659fcbb8632de9399b1b4999f8b3628"
integrity sha512-GneZAwvNxf3cNobYTmMSp2qGX/yJyUmHD/xjW+8zF2AgWkLS33CHmGn4aRFKqfjsk7BS7FU6jqMmmZhHHO3gUw==
dependencies:
"@ethereumjs/block" "^3.4.0"
"@ethereumjs/blockchain" "^5.4.0"
Expand Down Expand Up @@ -7541,13 +7547,13 @@ solc@^0.4.20:
semver "^5.3.0"
yargs "^4.7.1"

solc@^0.7.6:
version "0.7.6"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.7.6.tgz#21fc5dc11b85fcc518c181578b454f3271c27252"
integrity sha512-WsR/W7CXwh2VnmZapB4JrsDeLlshoKBz5Pz/zYNulB6LBsOEHI2Zj/GeKLMFcvv57OHiXHvxq5ZOQB+EdqxlxQ==
solc@^0.8.9:
version "0.8.9"
resolved "https://registry.yarnpkg.com/solc/-/solc-0.8.9.tgz#e57eb1c65c1eea273cc9b2b0d6cca051b878cbf8"
integrity sha512-dD8tQgGCrdWQPpbDTbQF048S3JAcpytOax2r5qPgQluKJPCRFT6c/fec0ZkbrRwRSeYT/qiKz0OKBDOinnGeWw==
dependencies:
command-exists "^1.2.8"
commander "3.0.2"
commander "^8.1.0"
follow-redirects "^1.12.1"
fs-extra "^0.30.0"
js-sha3 "0.8.0"
Expand Down

0 comments on commit aa2c0ac

Please sign in to comment.