Skip to content

Commit

Permalink
chore: cache token during mints
Browse files Browse the repository at this point in the history
  • Loading branch information
DhairyaSethi committed Oct 2, 2023
1 parent 2306739 commit d9fd897
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/DefaultEmissionManager.sol
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ contract DefaultEmissionManager is Ownable2StepUpgradeable, IDefaultEmissionMana

emit TokenMint(amountToMint, msg.sender);

token.mint(address(this), amountToMint);
token.safeTransfer(treasury, treasuryAmt);
IPolygonEcosystemToken _token = token;
_token.mint(address(this), amountToMint);
_token.safeTransfer(treasury, treasuryAmt);
// backconvert POL to MATIC before sending to StakeManager
migration.unmigrateTo(stakeManager, stakeManagerAmt);
}
Expand Down

0 comments on commit d9fd897

Please sign in to comment.