Skip to content

Commit

Permalink
Merge pull request #198 from aave/fix/update-aave-contracts
Browse files Browse the repository at this point in the history
Update of Aave contracts (changes from core-v3.0.1)
  • Loading branch information
Steven Valeri authored Dec 14, 2022
2 parents 3d5c322 + 241d291 commit 9c24bae
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 34 deletions.
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
},
"dependencies": {
"@aave/aave-token": "^1.0.4",
"@aave/core-v3": "1.16.2-beta.2",
"@aave/core-v3": "1.16.2-beta.3",
"@aave/deploy-v3": "1.51.0",
"@aave/periphery-v3": "1.21.4",
"@aave/safety-module": "github:aave/aave-stake-v2#b9e40fb1c14df7e3874e4def53860d0f53c1d958",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,6 @@ contract GhoInterestRateStrategy is IReserveInterestRateStrategy {
_variableBorrowRate = variableBorrowRate;
}

/// @inheritdoc IReserveInterestRateStrategy
function getBaseVariableBorrowRate() external view override returns (uint256) {
return _variableBorrowRate;
}

/// @inheritdoc IReserveInterestRateStrategy
function getMaxVariableBorrowRate() external view override returns (uint256) {
return _variableBorrowRate;
}

/// @inheritdoc IReserveInterestRateStrategy
function calculateInterestRates(DataTypes.CalculateInterestRatesParams memory params)
public
Expand Down
12 changes: 6 additions & 6 deletions src/contracts/facilitators/aave/tokens/GhoAToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ contract GhoAToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base
}

/// @inheritdoc IAToken
function mintToTreasury(uint256 amount, uint256 index) external override onlyPool {
function mintToTreasury(uint256 amount, uint256 index) external virtual override onlyPool {
revert('OPERATION_NOT_PERMITTED');
}

Expand All @@ -121,7 +121,7 @@ contract GhoAToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base
address from,
address to,
uint256 value
) external override onlyPool {
) external virtual override onlyPool {
revert('OPERATION_NOT_PERMITTED');
}

Expand Down Expand Up @@ -166,14 +166,14 @@ contract GhoAToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base
/// @inheritdoc IAToken
function handleRepayment(
address user,
address onBehalf,
address onBehalfOf,
uint256 amount
) external virtual override onlyPool {
uint256 balanceFromInterest = _ghoVariableDebtToken.getBalanceFromInterest(onBehalf);
uint256 balanceFromInterest = _ghoVariableDebtToken.getBalanceFromInterest(onBehalfOf);
if (amount <= balanceFromInterest) {
_ghoVariableDebtToken.decreaseBalanceFromInterest(onBehalf, amount);
_ghoVariableDebtToken.decreaseBalanceFromInterest(onBehalfOf, amount);
} else {
_ghoVariableDebtToken.decreaseBalanceFromInterest(onBehalf, balanceFromInterest);
_ghoVariableDebtToken.decreaseBalanceFromInterest(onBehalfOf, balanceFromInterest);
IGhoToken(_underlyingAsset).burn(amount - balanceFromInterest);
}
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
// SPDX-License-Identifier: AGPL-3.0
pragma solidity ^0.8.0;

import {IVariableDebtToken} from '@aave/core-v3/contracts/interfaces/IVariableDebtToken.sol';

/**
Expand Down

0 comments on commit 9c24bae

Please sign in to comment.