Skip to content

Commit

Permalink
added isAllowedToken, moreThanZero modifier to depositCollateralAndMi…
Browse files Browse the repository at this point in the history
…ntDsc()
  • Loading branch information
AAYUSH-GUPTA-coder authored Nov 25, 2024
1 parent cb7f7e0 commit 98d90e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/DSCEngine.sol
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,9 @@ contract DSCEngine is ReentrancyGuard {
uint256 amountDscToMint
)
external
isAllowedToken(tokenCollateralAddress)
moreThanZero(amountCollateral)
moreThanZero(amountDscToMint)
{
depositCollateral(tokenCollateralAddress, amountCollateral);
mintDsc(amountDscToMint);
Expand Down

0 comments on commit 98d90e7

Please sign in to comment.