Fixed aToken deployment function

This commit is contained in:
The3D 2020-09-16 16:44:27 +02:00
parent 274b63713d
commit 570a81a1b2
3 changed files with 4 additions and 5 deletions

View File

@ -33,7 +33,6 @@ import {ILendingPool} from '../interfaces/ILendingPool.sol';
* @notice Implements the actions of the LendingPool, and exposes accessory methods to fetch the users and reserve data * @notice Implements the actions of the LendingPool, and exposes accessory methods to fetch the users and reserve data
* @author Aave * @author Aave
**/ **/
contract LendingPool is VersionedInitializable, ILendingPool { contract LendingPool is VersionedInitializable, ILendingPool {
using SafeMath for uint256; using SafeMath for uint256;
using WadRayMath for uint256; using WadRayMath for uint256;

View File

@ -82,7 +82,7 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
} }
struct MintLocalVars { struct MintLocalVars {
uint256 currentPrincipalSupply; uint256 currentSupply;
uint256 nextSupply; uint256 nextSupply;
uint256 amountInRay; uint256 amountInRay;
uint256 newStableRate; uint256 newStableRate;
@ -110,9 +110,9 @@ contract StableDebtToken is IStableDebtToken, DebtTokenBase {
uint256 balanceIncrease uint256 balanceIncrease
) = _calculateBalanceIncrease(user); ) = _calculateBalanceIncrease(user);
vars.currentPrincipalSupply = totalSupply(); vars.currentSupply = totalSupply();
vars.currentAvgStableRate = _avgStableRate; vars.currentAvgStableRate = _avgStableRate;
vars.nextSupply = _totalSupply = _calcTotalSupply(vars.currentAvgStableRate).add(amount); vars.nextSupply = vars.currentSupply.add(amount);
vars.amountInRay = amount.wadToRay(); vars.amountInRay = amount.wadToRay();

View File

@ -299,7 +299,7 @@ export const deployGenericAToken = async ([
const token = await deployContract<AToken>(eContractid.AToken, [ const token = await deployContract<AToken>(eContractid.AToken, [
poolAddress, poolAddress,
underlyingAssetAddress, underlyingAssetAddress,
ZERO_ADDRESS, reserveTreasuryAddress,
name, name,
symbol, symbol,
incentivesController, incentivesController,