Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation errors, upgrade Solidity #210

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- run:
|
sudo wget https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O /usr/local/bin/solc
sudo wget https://github.com/ethereum/solidity/releases/download/v0.8.15/solc-static-linux -O /usr/local/bin/solc
sudo chmod +x /usr/local/bin/solc
- checkout
- restore_cache:
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
steps:
- run:
|
sudo wget https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O /usr/local/bin/solc
sudo wget https://github.com/ethereum/solidity/releases/download/v0.8.15/solc-static-linux -O /usr/local/bin/solc
sudo chmod +x /usr/local/bin/solc
- checkout
- restore_cache:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM mhart/alpine-node:13.8.0

RUN apk update && apk add --no-cache --virtual build-dependencies git python g++ make
RUN wget https://github.com/ethereum/solidity/releases/download/v0.8.10/solc-static-linux -O /bin/solc && chmod +x /bin/solc
RUN wget https://github.com/ethereum/solidity/releases/download/v0.8.15/solc-static-linux -O /bin/solc && chmod +x /bin/solc

RUN mkdir -p /compound-protocol
WORKDIR /compound-protocol
Expand Down
2 changes: 1 addition & 1 deletion contracts/BaseJumpRateModelV2.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./InterestRateModel.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CDaiDelegate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CErc20Delegate.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CErc20.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CErc20Delegate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CErc20.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CErc20Delegator.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CTokenInterfaces.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CErc20Immutable.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CErc20.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CEther.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CToken.sol";

Expand Down
2 changes: 1 addition & 1 deletion contracts/CToken.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./ComptrollerInterface.sol";
import "./CTokenInterfaces.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/CTokenInterfaces.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./ComptrollerInterface.sol";
import "./InterestRateModel.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/Comptroller.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CToken.sol";
import "./ErrorReporter.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/ComptrollerG7.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CToken.sol";
import "./ErrorReporter.sol";
Expand Down
2 changes: 1 addition & 1 deletion contracts/ComptrollerInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

abstract contract ComptrollerInterface {
/// @notice Indicator that this is a Comptroller contract (for inspection)
Expand Down
2 changes: 1 addition & 1 deletion contracts/ComptrollerStorage.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./CToken.sol";
import "./PriceOracle.sol";
Expand Down
4 changes: 2 additions & 2 deletions contracts/DAIInterestRateModelV3.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./JumpRateModelV2.sol";

Expand Down Expand Up @@ -66,7 +66,7 @@ contract DAIInterestRateModelV3 is JumpRateModelV2 {
* @param reserveFactorMantissa The current reserve factor the market has
* @return The supply rate per block (as a percentage, and scaled by BASE)
*/
function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) override public view returns (uint) {
function getSupplyRate(uint cash, uint borrows, uint reserves, uint reserveFactorMantissa) override(InterestRateModel, BaseJumpRateModelV2) public view returns (uint) {
uint protocolRate = super.getSupplyRate(cash, borrows, reserves, reserveFactorMantissa);

uint underlying = cash + borrows - reserves;
Expand Down
2 changes: 1 addition & 1 deletion contracts/EIP20Interface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

/**
* @title ERC 20 Token Standard Interface
Expand Down
2 changes: 1 addition & 1 deletion contracts/EIP20NonStandardInterface.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

/**
* @title EIP20NonStandardInterface
Expand Down
2 changes: 1 addition & 1 deletion contracts/ErrorReporter.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

contract ComptrollerErrorReporter {
enum Error {
Expand Down
2 changes: 1 addition & 1 deletion contracts/ExponentialNoError.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

/**
* @title Exponential module for storing fixed-precision decimals
Expand Down
2 changes: 1 addition & 1 deletion contracts/Governance/Comp.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

contract Comp {
/// @notice EIP-20 token name for this token
Expand Down
2 changes: 1 addition & 1 deletion contracts/Governance/GovernorAlpha.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

contract GovernorAlpha {
/// @notice The name of this contract
Expand Down
2 changes: 1 addition & 1 deletion contracts/Governance/GovernorBravoDelegate.sol
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SPDX-License-Identifier: BSD-3-Clause
pragma solidity ^0.8.10;
pragma solidity ^0.8.15;

import "./GovernorBravoInterfaces.sol";

Expand Down
Loading