mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'feat/pei-integration' into 'master'
Integration of pei See merge request aave-tech/protocol-v2!49
This commit is contained in:
commit
b182731074
|
@ -2,6 +2,7 @@ import {usePlugin} from '@nomiclabs/buidler/config';
|
|||
// @ts-ignore
|
||||
import {accounts} from './test-wallets.js';
|
||||
import {eEthereumNetwork} from './helpers/types';
|
||||
import {BUIDLEREVM_CHAINID, COVERAGE_CHAINID} from './helpers/buidler-constants';
|
||||
|
||||
usePlugin('@nomiclabs/buidler-ethers');
|
||||
usePlugin('buidler-typechain');
|
||||
|
@ -9,8 +10,6 @@ usePlugin('solidity-coverage');
|
|||
usePlugin('@nomiclabs/buidler-waffle');
|
||||
usePlugin('@nomiclabs/buidler-etherscan');
|
||||
//usePlugin('buidler-gas-reporter');
|
||||
const BUIDLEREVM_CHAINID = 31337;
|
||||
const COVERAGE_CHAINID = 1337;
|
||||
const DEFAULT_BLOCK_GAS_LIMIT = 10000000;
|
||||
const DEFAULT_GAS_PRICE = 10;
|
||||
const HARDFORK = 'istanbul';
|
||||
|
|
11
contracts/interfaces/IAaveIncentivesController.sol
Normal file
11
contracts/interfaces/IAaveIncentivesController.sol
Normal file
|
@ -0,0 +1,11 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity 0.6.8;
|
||||
pragma experimental ABIEncoderV2;
|
||||
|
||||
interface IAaveIncentivesController {
|
||||
function handleAction(
|
||||
address user,
|
||||
uint256 userBalance,
|
||||
uint256 totalSupply
|
||||
) external;
|
||||
}
|
|
@ -9,8 +9,9 @@ contract MockAToken is AToken {
|
|||
LendingPool _pool,
|
||||
address _underlyingAssetAddress,
|
||||
string memory _tokenName,
|
||||
string memory _tokenSymbol
|
||||
) public AToken(_pool, _underlyingAssetAddress, _tokenName, _tokenSymbol) {}
|
||||
string memory _tokenSymbol,
|
||||
address incentivesController
|
||||
) public AToken(_pool, _underlyingAssetAddress, _tokenName, _tokenSymbol, incentivesController) {}
|
||||
|
||||
function getRevision() internal override pure returns (uint256) {
|
||||
return 0x2;
|
||||
|
|
|
@ -9,8 +9,12 @@ contract MockStableDebtToken is StableDebtToken {
|
|||
address _pool,
|
||||
address _underlyingAssetAddress,
|
||||
string memory _tokenName,
|
||||
string memory _tokenSymbol
|
||||
) public StableDebtToken(_pool, _underlyingAssetAddress, _tokenName, _tokenSymbol) {}
|
||||
string memory _tokenSymbol,
|
||||
address incentivesController
|
||||
)
|
||||
public
|
||||
StableDebtToken(_pool, _underlyingAssetAddress, _tokenName, _tokenSymbol, incentivesController)
|
||||
{}
|
||||
|
||||
function getRevision() internal override pure returns (uint256) {
|
||||
return 0x2;
|
||||
|
|
|
@ -9,8 +9,18 @@ contract MockVariableDebtToken is VariableDebtToken {
|
|||
address _pool,
|
||||
address _underlyingAssetAddress,
|
||||
string memory _tokenName,
|
||||
string memory _tokenSymbol
|
||||
) public VariableDebtToken(_pool, _underlyingAssetAddress, _tokenName, _tokenSymbol) {}
|
||||
string memory _tokenSymbol,
|
||||
address incentivesController
|
||||
)
|
||||
public
|
||||
VariableDebtToken(
|
||||
_pool,
|
||||
_underlyingAssetAddress,
|
||||
_tokenName,
|
||||
_tokenSymbol,
|
||||
incentivesController
|
||||
)
|
||||
{}
|
||||
|
||||
function getRevision() internal override pure returns (uint256) {
|
||||
return 0x2;
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity ^0.6.8;
|
||||
|
||||
import {ERC20} from './ERC20.sol';
|
||||
import {IncentivizedERC20} from './IncentivizedERC20.sol';
|
||||
import {LendingPool} from '../lendingpool/LendingPool.sol';
|
||||
import {WadRayMath} from '../libraries/math/WadRayMath.sol';
|
||||
import {Errors} from '../libraries/helpers/Errors.sol';
|
||||
|
@ -18,9 +18,9 @@ import {SafeERC20} from '../misc/SafeERC20.sol';
|
|||
* @dev Implementation of the interest bearing token for the DLP protocol.
|
||||
* @author Aave
|
||||
*/
|
||||
contract AToken is VersionedInitializable, ERC20, IAToken {
|
||||
contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
|
||||
using WadRayMath for uint256;
|
||||
using SafeERC20 for ERC20;
|
||||
using SafeERC20 for IncentivizedERC20;
|
||||
|
||||
uint256 public constant UINT_MAX_VALUE = uint256(-1);
|
||||
address public immutable UNDERLYING_ASSET_ADDRESS;
|
||||
|
@ -49,8 +49,9 @@ contract AToken is VersionedInitializable, ERC20, IAToken {
|
|||
LendingPool pool,
|
||||
address underlyingAssetAddress,
|
||||
string memory tokenName,
|
||||
string memory tokenSymbol
|
||||
) public ERC20(tokenName, tokenSymbol, 18) {
|
||||
string memory tokenSymbol,
|
||||
address incentivesController
|
||||
) public IncentivizedERC20(tokenName, tokenSymbol, 18, incentivesController) {
|
||||
POOL = pool;
|
||||
UNDERLYING_ASSET_ADDRESS = underlyingAssetAddress;
|
||||
}
|
||||
|
@ -106,7 +107,7 @@ contract AToken is VersionedInitializable, ERC20, IAToken {
|
|||
_burn(user, scaledAmount);
|
||||
|
||||
//transfers the underlying to the target
|
||||
ERC20(UNDERLYING_ASSET_ADDRESS).safeTransfer(receiverOfUnderlying, amount);
|
||||
IncentivizedERC20(UNDERLYING_ASSET_ADDRESS).safeTransfer(receiverOfUnderlying, amount);
|
||||
|
||||
//transfer event to track balances
|
||||
emit Transfer(user, address(0), amount);
|
||||
|
@ -158,7 +159,12 @@ contract AToken is VersionedInitializable, ERC20, IAToken {
|
|||
* @param user the user for which the balance is being calculated
|
||||
* @return the total balance of the user
|
||||
**/
|
||||
function balanceOf(address user) public override(ERC20, IERC20) view returns (uint256) {
|
||||
function balanceOf(address user)
|
||||
public
|
||||
override(IncentivizedERC20, IERC20)
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
return super.balanceOf(user).rayMul(POOL.getReserveNormalizedIncome(UNDERLYING_ASSET_ADDRESS));
|
||||
}
|
||||
|
||||
|
@ -172,13 +178,28 @@ contract AToken is VersionedInitializable, ERC20, IAToken {
|
|||
return super.balanceOf(user);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the principal balance of the user and principal total supply.
|
||||
* @param user the address of the user
|
||||
* @return the principal balance of the user
|
||||
* @return the principal total supply
|
||||
**/
|
||||
function getScaledUserBalanceAndSupply(address user)
|
||||
external
|
||||
override
|
||||
view
|
||||
returns (uint256, uint256)
|
||||
{
|
||||
return (super.balanceOf(user), super.totalSupply());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev calculates the total supply of the specific aToken
|
||||
* since the balance of every single user increases over time, the total supply
|
||||
* does that too.
|
||||
* @return the current total supply
|
||||
**/
|
||||
function totalSupply() public override(ERC20, IERC20) view returns (uint256) {
|
||||
function totalSupply() public override(IncentivizedERC20, IERC20) view returns (uint256) {
|
||||
uint256 currentSupplyScaled = super.totalSupply();
|
||||
|
||||
if (currentSupplyScaled == 0) {
|
||||
|
@ -211,7 +232,7 @@ contract AToken is VersionedInitializable, ERC20, IAToken {
|
|||
onlyLendingPool
|
||||
returns (uint256)
|
||||
{
|
||||
ERC20(UNDERLYING_ASSET_ADDRESS).safeTransfer(target, amount);
|
||||
IncentivizedERC20(UNDERLYING_ASSET_ADDRESS).safeTransfer(target, amount);
|
||||
return amount;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,16 +5,20 @@ import {Context} from '../misc/Context.sol';
|
|||
import {IERC20} from '../interfaces/IERC20.sol';
|
||||
import {IERC20Detailed} from '../interfaces/IERC20Detailed.sol';
|
||||
import {SafeMath} from '../libraries/math/SafeMath.sol';
|
||||
import {IAaveIncentivesController} from '../interfaces/IAaveIncentivesController.sol';
|
||||
|
||||
/**
|
||||
* @title ERC20
|
||||
* @notice Basic ERC20 implementation
|
||||
* @author Aave, inspired by the Openzeppelin ERC20 implementation
|
||||
**/
|
||||
contract ERC20 is Context, IERC20, IERC20Detailed {
|
||||
contract IncentivizedERC20 is Context, IERC20, IERC20Detailed {
|
||||
using SafeMath for uint256;
|
||||
|
||||
IAaveIncentivesController internal immutable _incentivesController;
|
||||
|
||||
mapping(address => uint256) internal _balances;
|
||||
|
||||
mapping(address => mapping(address => uint256)) private _allowances;
|
||||
uint256 internal _totalSupply;
|
||||
string private _name;
|
||||
|
@ -24,11 +28,13 @@ contract ERC20 is Context, IERC20, IERC20Detailed {
|
|||
constructor(
|
||||
string memory name,
|
||||
string memory symbol,
|
||||
uint8 decimals
|
||||
uint8 decimals,
|
||||
address incentivesController
|
||||
) public {
|
||||
_name = name;
|
||||
_symbol = symbol;
|
||||
_decimals = decimals;
|
||||
_incentivesController = IAaveIncentivesController(incentivesController);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -169,8 +175,18 @@ contract ERC20 is Context, IERC20, IERC20Detailed {
|
|||
|
||||
_beforeTokenTransfer(sender, recipient, amount);
|
||||
|
||||
_balances[sender] = _balances[sender].sub(amount, 'ERC20: transfer amount exceeds balance');
|
||||
uint256 oldSenderBalance = _balances[sender];
|
||||
_balances[sender] = oldSenderBalance.sub(amount, 'ERC20: transfer amount exceeds balance');
|
||||
uint256 oldRecipientBalance = _balances[recipient];
|
||||
_balances[recipient] = _balances[recipient].add(amount);
|
||||
|
||||
if (address(_incentivesController) != address(0)) {
|
||||
uint256 totalSupply = _totalSupply;
|
||||
_incentivesController.handleAction(sender, totalSupply, oldSenderBalance);
|
||||
if (sender != recipient) {
|
||||
_incentivesController.handleAction(recipient, totalSupply, oldRecipientBalance);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function _mint(address account, uint256 amount) internal virtual {
|
||||
|
@ -178,8 +194,15 @@ contract ERC20 is Context, IERC20, IERC20Detailed {
|
|||
|
||||
_beforeTokenTransfer(address(0), account, amount);
|
||||
|
||||
_totalSupply = _totalSupply.add(amount);
|
||||
_balances[account] = _balances[account].add(amount);
|
||||
uint256 oldTotalSupply = _totalSupply;
|
||||
_totalSupply = oldTotalSupply.add(amount);
|
||||
|
||||
uint256 oldAccountBalance = _balances[account];
|
||||
_balances[account] = oldAccountBalance.add(amount);
|
||||
|
||||
if (address(_incentivesController) != address(0)) {
|
||||
_incentivesController.handleAction(account, oldTotalSupply, oldAccountBalance);
|
||||
}
|
||||
}
|
||||
|
||||
function _burn(address account, uint256 amount) internal virtual {
|
||||
|
@ -187,8 +210,15 @@ contract ERC20 is Context, IERC20, IERC20Detailed {
|
|||
|
||||
_beforeTokenTransfer(account, address(0), amount);
|
||||
|
||||
_balances[account] = _balances[account].sub(amount, 'ERC20: burn amount exceeds balance');
|
||||
_totalSupply = _totalSupply.sub(amount);
|
||||
uint256 oldTotalSupply = _totalSupply;
|
||||
_totalSupply = oldTotalSupply.sub(amount);
|
||||
|
||||
uint256 oldAccountBalance = _balances[account];
|
||||
_balances[account] = oldAccountBalance.sub(amount, 'ERC20: burn amount exceeds balance');
|
||||
|
||||
if (address(_incentivesController) != address(0)) {
|
||||
_incentivesController.handleAction(account, oldTotalSupply, oldAccountBalance);
|
||||
}
|
||||
}
|
||||
|
||||
function _approve(
|
|
@ -26,8 +26,9 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
|
|||
address pool,
|
||||
address underlyingAsset,
|
||||
string memory name,
|
||||
string memory symbol
|
||||
) public DebtTokenBase(pool, underlyingAsset, name, symbol) {}
|
||||
string memory symbol,
|
||||
address incentivesController
|
||||
) public DebtTokenBase(pool, underlyingAsset, name, symbol, incentivesController) {}
|
||||
|
||||
/**
|
||||
* @dev gets the revision of the stable debt token implementation
|
||||
|
|
|
@ -22,8 +22,9 @@ contract VariableDebtToken is DebtTokenBase, IVariableDebtToken {
|
|||
address pool,
|
||||
address underlyingAsset,
|
||||
string memory name,
|
||||
string memory symbol
|
||||
) public DebtTokenBase(pool, underlyingAsset, name, symbol) {}
|
||||
string memory symbol,
|
||||
address incentivesController
|
||||
) public DebtTokenBase(pool, underlyingAsset, name, symbol, incentivesController) {}
|
||||
|
||||
/**
|
||||
* @dev gets the revision of the stable debt token implementation
|
||||
|
|
|
@ -8,7 +8,7 @@ import {ILendingPool} from '../../interfaces/ILendingPool.sol';
|
|||
import {
|
||||
VersionedInitializable
|
||||
} from '../../libraries/openzeppelin-upgradeability/VersionedInitializable.sol';
|
||||
import {ERC20} from '../ERC20.sol';
|
||||
import {IncentivizedERC20} from '../IncentivizedERC20.sol';
|
||||
import {Errors} from '../../libraries/helpers/Errors.sol';
|
||||
|
||||
/**
|
||||
|
@ -17,7 +17,7 @@ import {Errors} from '../../libraries/helpers/Errors.sol';
|
|||
* @author Aave
|
||||
*/
|
||||
|
||||
abstract contract DebtTokenBase is ERC20, VersionedInitializable {
|
||||
abstract contract DebtTokenBase is IncentivizedERC20, VersionedInitializable {
|
||||
address internal immutable UNDERLYING_ASSET;
|
||||
ILendingPool internal immutable POOL;
|
||||
mapping(address => uint256) internal _usersData;
|
||||
|
@ -38,8 +38,9 @@ abstract contract DebtTokenBase is ERC20, VersionedInitializable {
|
|||
address pool,
|
||||
address underlyingAssetAddress,
|
||||
string memory name,
|
||||
string memory symbol
|
||||
) public ERC20(name, symbol, 18) {
|
||||
string memory symbol,
|
||||
address incentivesController
|
||||
) public IncentivizedERC20(name, symbol, 18, incentivesController) {
|
||||
POOL = ILendingPool(pool);
|
||||
UNDERLYING_ASSET = underlyingAssetAddress;
|
||||
}
|
||||
|
|
|
@ -82,6 +82,14 @@ interface IAToken is IERC20 {
|
|||
**/
|
||||
function scaledBalanceOf(address user) external view returns (uint256);
|
||||
|
||||
/**
|
||||
* @dev returns the principal balance of the user and principal total supply.
|
||||
* @param user the address of the user
|
||||
* @return the principal balance of the user
|
||||
* @return the principal total supply
|
||||
**/
|
||||
function getScaledUserBalanceAndSupply(address user) external view returns (uint256, uint256);
|
||||
|
||||
/**
|
||||
* @dev Used to validate transfers before actually executing them.
|
||||
* @param user address of the user to check
|
||||
|
|
3
helpers/buidler-constants.ts
Normal file
3
helpers/buidler-constants.ts
Normal file
|
@ -0,0 +1,3 @@
|
|||
export const TEST_SNAPSHOT_ID = '0x1';
|
||||
export const BUIDLEREVM_CHAINID = 31337;
|
||||
export const COVERAGE_CHAINID = 1337;
|
|
@ -1,22 +1,17 @@
|
|||
import {
|
||||
iAssetBase,
|
||||
iAavePoolAssets,
|
||||
IMarketRates,
|
||||
iAssetAggregatorBase,
|
||||
AavePools,
|
||||
eEthereumNetwork,
|
||||
iAavePoolAssets,
|
||||
iAssetAggregatorBase,
|
||||
iAssetBase,
|
||||
iBasicDistributionParams,
|
||||
IMarketRates,
|
||||
iMultiPoolsAssets,
|
||||
IReserveParams,
|
||||
tEthereumAddress,
|
||||
iBasicDistributionParams,
|
||||
eEthereumNetwork,
|
||||
} from './types';
|
||||
import BigNumber from 'bignumber.js';
|
||||
import {getParamPerPool, getParamPerNetwork} from './contracts-helpers';
|
||||
|
||||
export const TEST_SNAPSHOT_ID = '0x1';
|
||||
|
||||
export const BUIDLEREVM_CHAINID = 31337;
|
||||
export const COVERAGE_CHAINID = 1337;
|
||||
import {getParamPerNetwork, getParamPerPool} from './contracts-helpers';
|
||||
|
||||
// ----------------
|
||||
// MATH
|
||||
|
|
|
@ -251,49 +251,55 @@ export const deployDefaultReserveInterestRateStrategy = async ([
|
|||
]
|
||||
);
|
||||
|
||||
export const deployStableDebtToken = async ([name, symbol, underlyingAsset, poolAddress]: [
|
||||
string,
|
||||
string,
|
||||
tEthereumAddress,
|
||||
tEthereumAddress
|
||||
]) => {
|
||||
export const deployStableDebtToken = async ([
|
||||
name,
|
||||
symbol,
|
||||
underlyingAsset,
|
||||
poolAddress,
|
||||
incentivesController,
|
||||
]: [string, string, tEthereumAddress, tEthereumAddress, tEthereumAddress]) => {
|
||||
const token = await deployContract<StableDebtToken>(eContractid.StableDebtToken, [
|
||||
poolAddress,
|
||||
underlyingAsset,
|
||||
name,
|
||||
symbol,
|
||||
incentivesController,
|
||||
]);
|
||||
|
||||
return token;
|
||||
};
|
||||
|
||||
export const deployVariableDebtToken = async ([name, symbol, underlyingAsset, poolAddress]: [
|
||||
string,
|
||||
string,
|
||||
tEthereumAddress,
|
||||
tEthereumAddress
|
||||
]) => {
|
||||
export const deployVariableDebtToken = async ([
|
||||
name,
|
||||
symbol,
|
||||
underlyingAsset,
|
||||
poolAddress,
|
||||
incentivesController,
|
||||
]: [string, string, tEthereumAddress, tEthereumAddress, tEthereumAddress]) => {
|
||||
const token = await deployContract<VariableDebtToken>(eContractid.VariableDebtToken, [
|
||||
poolAddress,
|
||||
underlyingAsset,
|
||||
name,
|
||||
symbol,
|
||||
incentivesController,
|
||||
]);
|
||||
|
||||
return token;
|
||||
};
|
||||
|
||||
export const deployGenericAToken = async ([poolAddress, underlyingAssetAddress, name, symbol]: [
|
||||
tEthereumAddress,
|
||||
tEthereumAddress,
|
||||
string,
|
||||
string
|
||||
]) => {
|
||||
export const deployGenericAToken = async ([
|
||||
poolAddress,
|
||||
underlyingAssetAddress,
|
||||
name,
|
||||
symbol,
|
||||
incentivesController,
|
||||
]: [tEthereumAddress, tEthereumAddress, string, string, tEthereumAddress]) => {
|
||||
const token = await deployContract<AToken>(eContractid.AToken, [
|
||||
poolAddress,
|
||||
underlyingAssetAddress,
|
||||
name,
|
||||
symbol,
|
||||
incentivesController,
|
||||
]);
|
||||
|
||||
return token;
|
||||
|
|
10836
package-lock.json
generated
10836
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
|
@ -175,7 +175,8 @@ const initReserves = async (
|
|||
lendingPoolAddressesProvider: LendingPoolAddressesProvider,
|
||||
lendingPool: LendingPool,
|
||||
lendingPoolConfigurator: LendingPoolConfigurator,
|
||||
aavePool: AavePools
|
||||
aavePool: AavePools,
|
||||
incentivesController: tEthereumAddress
|
||||
) => {
|
||||
if (aavePool !== AavePools.proto && aavePool !== AavePools.secondary) {
|
||||
console.log(`Invalid Aave pool ${aavePool}`);
|
||||
|
@ -230,6 +231,7 @@ const initReserves = async (
|
|||
`stableDebt${assetSymbol === 'WETH' ? 'ETH' : assetSymbol}`,
|
||||
tokenAddress,
|
||||
lendingPool.address,
|
||||
incentivesController,
|
||||
]);
|
||||
|
||||
const variableDebtToken = await deployVariableDebtToken([
|
||||
|
@ -237,6 +239,7 @@ const initReserves = async (
|
|||
`variableDebt${assetSymbol === 'WETH' ? 'ETH' : assetSymbol}`,
|
||||
tokenAddress,
|
||||
lendingPool.address,
|
||||
incentivesController,
|
||||
]);
|
||||
|
||||
const aToken = await deployGenericAToken([
|
||||
|
@ -244,6 +247,7 @@ const initReserves = async (
|
|||
tokenAddress,
|
||||
`Aave interest bearing ${assetSymbol === 'WETH' ? 'ETH' : assetSymbol}`,
|
||||
`a${assetSymbol === 'WETH' ? 'ETH' : assetSymbol}`,
|
||||
incentivesController,
|
||||
]);
|
||||
|
||||
if (process.env.POOL === AavePools.secondary) {
|
||||
|
@ -481,7 +485,8 @@ const buildTestEnv = async (deployer: Signer, secondaryWallet: Signer) => {
|
|||
addressesProvider,
|
||||
lendingPoolProxy,
|
||||
lendingPoolConfiguratorProxy,
|
||||
AavePools.proto
|
||||
AavePools.proto,
|
||||
ZERO_ADDRESS
|
||||
);
|
||||
await enableReservesToBorrow(
|
||||
reservesParams,
|
||||
|
|
|
@ -2,7 +2,6 @@ import {
|
|||
MAX_UINT_AMOUNT,
|
||||
ZERO_ADDRESS,
|
||||
getATokenDomainSeparatorPerNetwork,
|
||||
BUIDLEREVM_CHAINID,
|
||||
} from '../helpers/constants';
|
||||
import {buildPermitParams, getSignatureFromTypedData} from '../helpers/contracts-helpers';
|
||||
import {expect} from 'chai';
|
||||
|
@ -11,6 +10,7 @@ import {eEthereumNetwork} from '../helpers/types';
|
|||
import {makeSuite, TestEnv} from './helpers/make-suite';
|
||||
import {BRE} from '../helpers/misc-utils';
|
||||
import {waitForTx} from './__setup.spec';
|
||||
import {BUIDLEREVM_CHAINID} from '../helpers/buidler-constants';
|
||||
|
||||
const {parseEther} = ethers.utils;
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@ import {
|
|||
import {MockAToken} from '../types/MockAToken';
|
||||
import {MockStableDebtToken} from '../types/MockStableDebtToken';
|
||||
import {MockVariableDebtToken} from '../types/MockVariableDebtToken';
|
||||
import {ZERO_ADDRESS} from '../helpers/constants';
|
||||
|
||||
makeSuite('Upgradeability', (testEnv: TestEnv) => {
|
||||
const {CALLER_NOT_LENDING_POOL_MANAGER} = ProtocolErrors;
|
||||
|
@ -24,16 +25,29 @@ makeSuite('Upgradeability', (testEnv: TestEnv) => {
|
|||
dai.address,
|
||||
'Aave Interest bearing DAI updated',
|
||||
'aDAI',
|
||||
ZERO_ADDRESS,
|
||||
]);
|
||||
|
||||
const stableDebtTokenInstance = await deployContract<MockStableDebtToken>(
|
||||
eContractid.MockStableDebtToken,
|
||||
[pool.address, dai.address, 'Aave stable debt bearing DAI updated', 'stableDebtDAI']
|
||||
[
|
||||
pool.address,
|
||||
dai.address,
|
||||
'Aave stable debt bearing DAI updated',
|
||||
'stableDebtDAI',
|
||||
ZERO_ADDRESS,
|
||||
]
|
||||
);
|
||||
|
||||
const variableDebtTokenInstance = await deployContract<MockVariableDebtToken>(
|
||||
eContractid.MockVariableDebtToken,
|
||||
[pool.address, dai.address, 'Aave variable debt bearing DAI updated', 'variableDebtDAI']
|
||||
[
|
||||
pool.address,
|
||||
dai.address,
|
||||
'Aave variable debt bearing DAI updated',
|
||||
'variableDebtDAI',
|
||||
ZERO_ADDRESS,
|
||||
]
|
||||
);
|
||||
|
||||
newATokenAddress = aTokenInstance.address;
|
||||
|
|
Loading…
Reference in New Issue
Block a user