Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DSCEngineTest.t.sol #97

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

meitedaf
Copy link

Consolidated vm.prank(owner) Calls: Replaced multiple instances of vm.prank(owner) with a single vm.startPrank(owner) to improve code readability and efficiency. This change ensures that all subsequent operations within the owner context are consistently executed under the correct sender, reducing redundancy.

Improved Test Logic: Updated the logic to use mockWeth as the collateral token instead of mockDsc in the testRevertsIfTransferFromFails() function and testRevertsIfTransferFails() function, aligning with the intended purpose of each token. This adjustment helps in simulating a more realistic scenario where mockWeth acts as the collateral, and mockDsc is the stablecoin managed by the DSCEngine.

Consolidated vm.prank(owner) Calls: Replaced multiple instances of vm.prank(owner) with a single vm.startPrank(owner) to improve code readability and efficiency. This change ensures that all subsequent operations within the owner context are consistently executed under the correct sender, reducing redundancy.
Improved Test Logic: Updated the logic to use mockWeth as the collateral token instead of mockDsc in the testRevertsIfTransferFromFails() function, aligning with the intended purpose of each token. This adjustment helps in simulating a more realistic scenario where mockWeth acts as the collateral, and mockDsc is the stablecoin managed by the DSCEngine.
@EngrPips
Copy link

Thanks for pointing this out, @meitedaf. This will be addressed as soon as possible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants