mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Add Initialized event at aToken and Debt Token Base to match interfaces in newer versions of Aave Protocol.
This commit is contained in:
parent
ee04de7636
commit
9afc1d002a
|
@ -14,6 +14,28 @@ interface IAToken is IERC20, IScaledBalanceToken {
|
|||
**/
|
||||
event Mint(address indexed from, uint256 value, uint256 index);
|
||||
|
||||
/**
|
||||
* @dev Emitted when an aToken is initialized
|
||||
* @param underlyingAsset The address of the underlying asset
|
||||
* @param pool The address of the associated lending pool
|
||||
* @param treasury The address of the treasury
|
||||
* @param incentivesController The address of the incentives controller for this aToken
|
||||
* @param aTokenDecimals the decimals of the underlying
|
||||
* @param aTokenName the name of the aToken
|
||||
* @param aTokenSymbol the symbol of the aToken
|
||||
* @param params A set of encoded parameters for additional initialization
|
||||
**/
|
||||
event Initialized(
|
||||
address indexed underlyingAsset,
|
||||
address indexed pool,
|
||||
address treasury,
|
||||
address incentivesController,
|
||||
uint8 aTokenDecimals,
|
||||
string aTokenName,
|
||||
string aTokenSymbol,
|
||||
bytes params
|
||||
);
|
||||
|
||||
/**
|
||||
* @dev Mints `amount` aTokens to `user`
|
||||
* @param user The address receiving the minted tokens
|
||||
|
|
24
contracts/interfaces/IDebtTokenBase.sol
Normal file
24
contracts/interfaces/IDebtTokenBase.sol
Normal file
|
@ -0,0 +1,24 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity 0.6.12;
|
||||
|
||||
interface IDebtTokenBase {
|
||||
/**
|
||||
* @dev Emitted when a debt token is initialized
|
||||
* @param underlyingAsset The address of the underlying asset
|
||||
* @param pool The address of the associated lending pool
|
||||
* @param incentivesController The address of the incentives controller for this aToken
|
||||
* @param debtTokenDecimals the decimals of the debt token
|
||||
* @param debtTokenName the name of the debt token
|
||||
* @param debtTokenSymbol the symbol of the debt token
|
||||
* @param params A set of encoded parameters for additional initialization
|
||||
**/
|
||||
event Initialized(
|
||||
address indexed underlyingAsset,
|
||||
address indexed pool,
|
||||
address incentivesController,
|
||||
uint8 debtTokenDecimals,
|
||||
string debtTokenName,
|
||||
string debtTokenSymbol,
|
||||
bytes params
|
||||
);
|
||||
}
|
|
@ -84,6 +84,17 @@ contract AToken is VersionedInitializable, IncentivizedERC20, IAToken {
|
|||
_setName(tokenName);
|
||||
_setSymbol(tokenSymbol);
|
||||
_setDecimals(underlyingAssetDecimals);
|
||||
|
||||
emit Initialized(
|
||||
UNDERLYING_ASSET_ADDRESS,
|
||||
address(POOL),
|
||||
RESERVE_TREASURY_ADDRESS,
|
||||
address(_incentivesController),
|
||||
underlyingAssetDecimals,
|
||||
tokenName,
|
||||
tokenSymbol,
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,7 @@ pragma solidity 0.6.12;
|
|||
|
||||
import {ILendingPool} from '../../../interfaces/ILendingPool.sol';
|
||||
import {ICreditDelegationToken} from '../../../interfaces/ICreditDelegationToken.sol';
|
||||
import {IDebtTokenBase} from '../../../interfaces/IDebtTokenBase.sol';
|
||||
import {
|
||||
VersionedInitializable
|
||||
} from '../../libraries/aave-upgradeability/VersionedInitializable.sol';
|
||||
|
@ -18,7 +19,8 @@ import {Errors} from '../../libraries/helpers/Errors.sol';
|
|||
abstract contract DebtTokenBase is
|
||||
IncentivizedERC20,
|
||||
VersionedInitializable,
|
||||
ICreditDelegationToken
|
||||
ICreditDelegationToken,
|
||||
IDebtTokenBase
|
||||
{
|
||||
address public immutable UNDERLYING_ASSET_ADDRESS;
|
||||
ILendingPool public immutable POOL;
|
||||
|
@ -62,6 +64,16 @@ abstract contract DebtTokenBase is
|
|||
_setName(name);
|
||||
_setSymbol(symbol);
|
||||
_setDecimals(decimals);
|
||||
|
||||
emit Initialized(
|
||||
UNDERLYING_ASSET_ADDRESS,
|
||||
address(POOL),
|
||||
address(_incentivesController),
|
||||
decimals,
|
||||
name,
|
||||
symbol,
|
||||
''
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue
Block a user