Skip to content

Commit

Permalink
update to solidity 0.7.1
Browse files Browse the repository at this point in the history
  • Loading branch information
vittominacori committed Sep 13, 2020
1 parent 4cd0625 commit 07de2ff
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 28 deletions.
6 changes: 4 additions & 2 deletions .solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@
"func-order": "off",
"mark-callable-contracts": "off",
"no-empty-blocks": "off",
"compiler-version": ["error", "0.6.0"],
"private-vars-leading-underscore": "error"
"compiler-version": ["error", "^0.7.0"],
"private-vars-leading-underscore": "error",
"reason-string": "off",
"func-visibility": ["error", { "ignoreConstructors": true }]
}
}
Binary file modified analysis/control-flow/SampleContract.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions analysis/description-table/SampleContract.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

| File Name | SHA-1 Hash |
|-------------|--------------|
| dist/SampleContract.dist.sol | 907102b9fa208938bfc023e0837a7bb5208371c8 |
| dist/SampleContract.dist.sol | 89f607904d5418dd2f23ac2e2602329e928602cf |


### Contracts Description Table
Expand All @@ -28,7 +28,7 @@
|| _msgData | Internal 🔒 | | |
||||||
| **Ownable** | Implementation | Context |||
|| <Constructor> | Internal 🔒 | 🛑 | |
|| <Constructor> | Public ❗️ | 🛑 |NO❗️ |
|| owner | Public ❗️ | |NO❗️ |
|| renounceOwnership | Public ❗️ | 🛑 | onlyOwner |
|| transferOwnership | Public ❗️ | 🛑 | onlyOwner |
Expand Down
2 changes: 1 addition & 1 deletion buidler.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ module.exports = {
},
},
solc: {
version: '0.6.12',
version: '0.7.1',
optimizer: {
enabled: true,
runs: 200,
Expand Down
4 changes: 2 additions & 2 deletions contracts/SampleContract.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;

import "eth-token-recover/contracts/TokenRecover.sol";

Expand All @@ -14,7 +14,7 @@ contract SampleContract is TokenRecover {
_;
}

constructor() public {
constructor() {
_creator = owner();
}

Expand Down
4 changes: 2 additions & 2 deletions contracts/mocks/ERC20Mock.sol
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;

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

Expand All @@ -12,7 +12,7 @@ contract ERC20Mock is ERC20 {
string memory symbol,
address initialAccount,
uint256 initialBalance
) public payable ERC20(name, symbol) {
) ERC20(name, symbol) {
_mint(initialAccount, initialBalance);
}
}
14 changes: 7 additions & 7 deletions dist/SampleContract.dist.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;

/**
* @dev Interface of the ERC20 standard as defined in the EIP.
Expand Down Expand Up @@ -83,7 +83,7 @@ interface IERC20 {

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;

/*
* @dev Provides information about the current execution context, including the
Expand All @@ -110,7 +110,7 @@ abstract contract Context {

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;

/**
* @dev Contract module which provides a basic access control mechanism, where
Expand All @@ -132,7 +132,7 @@ contract Ownable is Context {
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
constructor () {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
Expand Down Expand Up @@ -180,7 +180,7 @@ contract Ownable is Context {

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;



Expand All @@ -205,7 +205,7 @@ contract TokenRecover is Ownable {

// SPDX-License-Identifier: MIT

pragma solidity ^0.6.0;
pragma solidity ^0.7.0;


contract SampleContract is TokenRecover {
Expand All @@ -218,7 +218,7 @@ contract SampleContract is TokenRecover {
_;
}

constructor() public {
constructor() {
_creator = owner();
}

Expand Down
22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,37 @@
],
"license": "MIT",
"devDependencies": {
"@nomiclabs/buidler": "^1.4.4",
"@nomiclabs/buidler": "^1.4.5",
"@nomiclabs/buidler-ganache": "^1.3.3",
"@nomiclabs/buidler-truffle5": "^1.3.4",
"@nomiclabs/buidler-web3": "^1.3.4",
"@openzeppelin/test-helpers": "^0.5.6",
"@vuepress/plugin-google-analytics": "^1.5.3",
"chai": "^4.2.0",
"coveralls": "^3.1.0",
"eslint": "^7.7.0",
"eslint": "^7.8.1",
"eslint-config-standard": "^14.1.1",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-mocha-no-only": "^1.1.1",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-standard": "^4.0.1",
"ethereumjs-util": "^7.0.4",
"ethereumjs-util": "^7.0.5",
"ethjs-abi": "^0.2.1",
"ganache-cli": "^6.10.1",
"ganache-cli": "^6.10.2",
"lite-server": "^2.5.4",
"pify": "^5.0.0",
"sol2uml": "^1.1.17",
"sol2uml": "^1.1.18",
"solhint": "^3.2.0",
"solidity-coverage": "^0.7.9",
"surya": "^0.4.0",
"truffle": "^5.1.41",
"truffle-flattener": "^1.4.4",
"solidity-coverage": "^0.7.10",
"surya": "github:vittominacori/surya#feature/update-solidity-parser",
"truffle": "^5.1.44",
"truffle-flattener": "github:vittominacori/truffle-flattener#feature/allow-constructor-without-visibility",
"vuepress": "^1.5.3",
"web3": "^1.2.11"
},
"dependencies": {
"@openzeppelin/contracts": "3.1.0",
"eth-token-recover": "3.1.0"
"@openzeppelin/contracts": "3.2.0-solc-0.7",
"eth-token-recover": "3.2.0"
}
}
2 changes: 1 addition & 1 deletion truffle-config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
require('chai/register-should');

const solcStable = {
version: '0.6.12',
version: '0.7.1',
settings: {
optimizer: {
enabled: true,
Expand Down

0 comments on commit 07de2ff

Please sign in to comment.