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 singlevm.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 ofmockDsc
in thetestRevertsIfTransferFromFails()
function andtestRevertsIfTransferFails()
function, aligning with the intended purpose of each token. This adjustment helps in simulating a more realistic scenario wheremockWeth
acts as the collateral, andmockDsc
is the stablecoin managed by the DSCEngine.