Skip to content

Commit

Permalink
refactor: update to solidity 0.6.12 (#277)
Browse files Browse the repository at this point in the history
* refactor: update to solidity 0.6.12

* chore: update solhint version

* docs: update contribution guidelines with new version

* refactor: remove extra slash on comment
  • Loading branch information
SeanJCasey authored Dec 17, 2020
1 parent 7d5ca5e commit 2b08150
Show file tree
Hide file tree
Showing 142 changed files with 145 additions and 145 deletions.
2 changes: 1 addition & 1 deletion .solhint.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"extends": "solhint:recommended",
"rules": {
"compiler-version": ["error", "0.6.8"],
"compiler-version": ["error", "0.6.12"],
"no-empty-blocks": "off",
"not-rely-on-time": "off",
"avoid-low-level-calls": "off",
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ We use [prettier](https://prettier.io/) for formatting both Solidity and TypeScr

### Solidity

Please adhere to the recommended [official Solidity style guide for v0.6.8](https://solidity.readthedocs.io/en/v0.6.8/style-guide.html), in addition to the following styling choices:
Please adhere to the recommended [official Solidity style guide for v0.6.12](https://solidity.readthedocs.io/en/v0.6.12/style-guide.html), in addition to the following styling choices:

#### State variables

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/MockVaultLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../persistent/vault/VaultLibBaseCore.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/WETH.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

contract WETH {
string public name = "Wrapped Ether";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/adapters/MockGenericAdapter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "../../release/extensions/integration-manager/integrations/utils/AdapterBase.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockCTokenIntegratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
import "../prices/CentralizedRateProvider.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockChaiIntegratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../tokens/MockToken.sol";
import "../prices/CentralizedRateProvider.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockGenericIntegratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../utils/SwapperBase.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockKyberIntegratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockParaSwapIntegratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockSynthetixIntegratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/access/Ownable.sol";
import "./../../release/interfaces/ISynthetixExchangeRates.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockUniswapV2Integratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/MockZeroExV2Integratee.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

contract MockZeroExV2Integratee {
bytes public ZRX_ASSET_DATA;
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/integratees/utils/MockIntegrateeBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../utils/NormalizedRateProviderBase.sol";
import "../../utils/SwapperBase.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "./MockIntegrateeBase.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/interfaces/ISynthetixDelegateApprovals.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title ISynthetixDelegateApprovals Interface
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/CentralizedRateProvider.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockChaiPriceSource.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockChainlinkPriceSource.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

contract MockChainlinkPriceSource {
event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 timestamp);
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockDerivativePriceFeed.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../release/infrastructure/price-feeds/derivatives/IDerivativePriceFeed.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockKyberPriceSource.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../utils/NormalizedRateProviderBase.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockPrimitivePriceFeed.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
import "../../release/infrastructure/price-feeds/primitives/IPrimitivePriceFeed.sol";

contract MockPrimitivePriceFeed is IPrimitivePriceFeed {
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockSynthetixPriceSource.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import "@openzeppelin/contracts/access/Ownable.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/prices/MockUniswapV2PriceSource.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/tokens/MockReentrancyToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../release/core/fund/comptroller/ComptrollerLib.sol";
import "./MockToken.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/tokens/MockSynthetixToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/tokens/MockToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/utils/EthConstantMixin.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

abstract contract EthConstantMixin {
address public constant ETH_ADDRESS = 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/utils/NormalizedRateProviderBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "./RateProviderBase.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/utils/RateProviderBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./EthConstantMixin.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/mocks/utils/SwapperBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "./EthConstantMixin.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/dispatcher/Dispatcher.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../utils/IMigrationHookHandler.sol";
import "../utils/IMigratableVault.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/dispatcher/IDispatcher.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title IDispatcher Interface
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/utils/IMigratableVault.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title IMigratableVault Interface
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/utils/IMigrationHookHandler.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title IMigrationHookHandler Interface
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/vault/VaultLibBase1.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "./VaultLibBaseCore.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/vault/VaultLibBaseCore.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../utils/IMigratableVault.sol";
import "./utils/ProxiableVaultLib.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/persistent/vault/VaultProxy.sol
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "./utils/ProxiableVaultLib.sol";

/// @title VaultProxy Contract
/// @author Melon Council DAO <[email protected]>
/// @notice A proxy contract for all VaultProxy instances, slightly modified from EIP-1822
/// @dev Adapted from the recommended implementation of a Proxy in EIP-1822, updated for solc 0.6.8,
/// @dev Adapted from the recommended implementation of a Proxy in EIP-1822, updated for solc 0.6.12,
/// and using the EIP-1967 storage slot for the proxiable implementation.
/// i.e., `bytes32(uint256(keccak256('eip1967.proxy.implementation')) - 1)`, which is
/// "0x360894a13ba1a3210667c828492db98dca3e2076cc3735a920a3ca505d382bbc"
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/vault/utils/ProxiableVaultLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title ProxiableVaultLib Contract
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/vault/utils/SharesTokenBase.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "./VaultLibSafeMath.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/persistent/vault/utils/VaultLibSafeMath.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title VaultLibSafeMath library
/// @notice A narrowed, verbatim implementation of OpenZeppelin 3.2.0 SafeMath
Expand Down
4 changes: 2 additions & 2 deletions contracts/release/core/fund-deployer/FundDeployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;
pragma experimental ABIEncoderV2;

import "../../../persistent/dispatcher/IDispatcher.sol";
Expand Down Expand Up @@ -420,7 +420,7 @@ contract FundDeployer is IFundDeployer, IMigrationHookHandler {
"postMigrateOriginHook: Only Dispatcher can call this function"
);

/// Must use PreMigrate hook to get the ComptrollerProxy from the VaultProxy
// Must use PreMigrate hook to get the ComptrollerProxy from the VaultProxy
address comptrollerProxy = IVault(_vaultProxy).getAccessor();

// Wind down fund and destroy its config
Expand Down
2 changes: 1 addition & 1 deletion contracts/release/core/fund-deployer/IFundDeployer.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title IFundDeployer Interface
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/release/core/fund/comptroller/ComptrollerLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../../utils/Proxy.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/release/core/fund/comptroller/IComptroller.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "./libs/IPermissionedVaultActionLib.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "../../../../extensions/IExtension.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../vault/IVault.sol";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title IPermissionedVaultActionLib Interface
/// @author Melon Council DAO <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../../fund-deployer/IFundDeployer.sol";
import "../../vault/IVault.sol";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title ComptrollerEvents Contract
/// @author Melon Council DAO <[email protected]>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

/// @title ComptrollerStorage Contract
/// @author Melon Council DAO <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion contracts/release/core/fund/vault/IVault.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "../../../../persistent/utils/IMigratableVault.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/release/core/fund/vault/VaultLib.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.6.8;
pragma solidity 0.6.12;

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
Expand Down
Loading

0 comments on commit 2b08150

Please sign in to comment.