Skip to content

Commit

Permalink
Make AToken's initialize and _transfer functions virtual so they can …
Browse files Browse the repository at this point in the history
…be extended (#774)

* Make aToken.initialize public and virtual so it can be extended

* Make aToken._transfer virtual so it can be extended

* Make AToken._transfer/3 virtual for consistency
  • Loading branch information
davidlaprade authored Dec 23, 2022
1 parent 3e1c3c2 commit c38c627
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions contracts/protocol/tokenization/AToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I
string calldata aTokenName,
string calldata aTokenSymbol,
bytes calldata params
) external override initializer {
) public virtual override initializer {
require(initializingPool == POOL, Errors.POOL_ADDRESSES_DO_NOT_MATCH);
_setName(aTokenName);
_setSymbol(aTokenSymbol);
Expand Down Expand Up @@ -210,7 +210,7 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I
address to,
uint256 amount,
bool validate
) internal {
) internal virtual {
address underlyingAsset = _underlyingAsset;

uint256 index = POOL.getReserveNormalizedIncome(underlyingAsset);
Expand All @@ -237,7 +237,7 @@ contract AToken is VersionedInitializable, ScaledBalanceTokenBase, EIP712Base, I
address from,
address to,
uint128 amount
) internal override {
) internal virtual override {
_transfer(from, to, amount, true);
}

Expand Down

0 comments on commit c38c627

Please sign in to comment.