Closed ChefAharoni closed 1 year ago
Seems like this test is failing:
[22636] StopOnRevertHandler::redeemCollateral(9333727928527111674595329096 [9.333e27], 892)
├─ [2805] DSCEngine::getCollateralBalanceOfUser(0x0000000000000000000000000000000000000026, ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3]) [staticcall]
│ └─ ← 3056820747 [3.056e9]
├─ [0] console::log(Bound Result, 892) [staticcall]
│ └─ ← ()
├─ [7830] DSCEngine::redeemCollateral(ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3], 892)
│ └─ ← "Arithmetic over/underflow"
└─ ← "Arithmetic over/underflow"
I don't think it's related to this change though.
@ChefAharoni you are getting this error because you are calling DSCEngine::redeemCollateral(ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3], 892)
by not the same user you called DSCEngine::getCollateralBalanceOfUser(0x0000000000000000000000000000000000000026, ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3])
by. Call both functions by the same user and it will resolve.
Prank redeemCollateral
with msg.sender
.
@ChefAharoni you are getting this error because you are calling
DSCEngine::redeemCollateral(ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3], 892)
by not the same user you calledDSCEngine::getCollateralBalanceOfUser(0x0000000000000000000000000000000000000026, ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3])
by. Call both functions by the same user and it will resolve.Prank
redeemCollateral
withmsg.sender
.
Thanks, but I'm not getting this error in my contract, I meant GitHub actions shows this error while checking if this pull request can be merged easily.
@ChefAharoni you are getting this error because you are calling
DSCEngine::redeemCollateral(ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3], 892)
by not the same user you calledDSCEngine::getCollateralBalanceOfUser(0x0000000000000000000000000000000000000026, ERC20Mock: [0xBb2180ebd78ce97360503434eD37fcf4a1Df61c3])
by. Call both functions by the same user and it will resolve. PrankredeemCollateral
withmsg.sender
.Thanks, but I'm not getting this error in my contract, I meant GitHub actions shows this error while checking if this pull request can be merged easily.
I see.
Yep! This is a fuzz test that is known to fail (intentionally)
Updated the name of the repo to install foundry-devops from; name changed from ChainAccelorg to Cyfrin.