Skip to content

Commit

Permalink
chore; rm lastMint
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Sep 11, 2023
1 parent 2db6408 commit a0f6523
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Polygon.sol
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {IDefaultInflationManager} from "./interfaces/IDefaultInflationManager.so
/// @custom:security-contact [email protected]
contract Polygon is ERC20Permit, IPolygon {
address public immutable inflationManager;
uint256 public lastMint;

constructor(address migration_, address inflationManager_) ERC20("Polygon", "POL") ERC20Permit("Polygon") {
if (migration_ == address(0) || inflationManager_ == address(0)) revert InvalidAddress();
Expand All @@ -28,10 +27,6 @@ contract Polygon is ERC20Permit, IPolygon {
/// @param amount Amount to mint
function mint(address to, uint256 amount) external {
if (msg.sender != inflationManager) revert OnlyInflationManager();
uint256 lastMintCache = lastMint;
if (lastMintCache == 0) lastMintCache = IDefaultInflationManager(inflationManager).startTimestamp();

lastMint = block.timestamp;
_mint(to, amount);
}
}

0 comments on commit a0f6523

Please sign in to comment.