mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Fixed aToken deployment function
This commit is contained in:
parent
274b63713d
commit
570a81a1b2
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
|
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user