Skip to content

Commit

Permalink
changing some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
sogipec committed Mar 21, 2023
1 parent bc13911 commit e708a7c
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions contracts/agToken/BaseAgToken.sol
Original file line number Diff line number Diff line change
Expand Up @@ -66,21 +66,16 @@ contract BaseAgToken is IAgToken, ERC20PermitUpgradeable {

// ================================ CONSTRUCTOR ================================

/// @notice Wraps `_initializeBase` for `BaseAgToken` and makes a safety check
/// on `_treasury` and this contract
/// @custom:oz-upgrades-unsafe-allow constructor
constructor() initializer {}

/// @notice Wraps `_initializeBase` for `BaseAgToken` and makes a safety check on `_treasury`
function _initialize(string memory name_, string memory symbol_, address _treasury) internal virtual initializer {
if (address(ITreasury(_treasury).stablecoin()) != address(this)) revert InvalidTreasury();
_initializeBase(name_, symbol_, _treasury);
}

/// @custom:oz-upgrades-unsafe-allow constructor
constructor() initializer {}

/// @notice Initializes the contract
/// @param name_ Name of the token
/// @param symbol_ Symbol of the token
/// @param _treasury Reference to the `Treasury` contract associated to this agToken implementation
/// @dev By default, agTokens are ERC-20 tokens with 18 decimals
function _initializeBase(string memory name_, string memory symbol_, address _treasury) internal virtual {
__ERC20Permit_init(name_);
__ERC20_init(name_, symbol_);
Expand All @@ -91,7 +86,6 @@ contract BaseAgToken is IAgToken, ERC20PermitUpgradeable {
// ================================= MODIFIERS =================================

/// @notice Checks to see if it is the `Treasury` calling this contract
/// @dev There is no Access Control here, because it can be handled cheaply through this modifier
modifier onlyTreasury() {
if (msg.sender != address(treasury)) revert NotTreasury();
_;
Expand Down

0 comments on commit e708a7c

Please sign in to comment.