Skip to content

Commit

Permalink
Remove MockNonlinearDutchDecayLibContract
Browse files Browse the repository at this point in the history
  • Loading branch information
codyborn committed Oct 17, 2024
1 parent caec474 commit d417919
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .forge-snapshots/V3-DutchDecayNoDecay.snap
Original file line number Diff line number Diff line change
@@ -1 +1 @@
9066
9977
25 changes: 1 addition & 24 deletions test/lib/NonLinearDutchDecayLib.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -14,30 +14,7 @@ import {CurveBuilder} from "../util/CurveBuilder.sol";
import {MockERC20} from "../util/mock/MockERC20.sol";
import {OutputToken, InputToken} from "../../src/base/ReactorStructs.sol";

/// @notice mock contract to test NonlinearDutchDecayLib functionality
contract MockNonlinearDutchDecayLibContract {
function decayInput(
NonlinearDutchDecay memory curve,
uint256 startAmount,
uint256 decayStartBlock,
uint256 maxAmount
) public view {
decayInput(curve, startAmount, decayStartBlock, maxAmount);
}

function decayOutput(
NonlinearDutchDecay memory curve,
uint256 startAmount,
uint256 decayStartBlock,
uint256 minAmount,
uint256 maxAmount
) public view {
decayOutput(curve, startAmount, decayStartBlock, minAmount, maxAmount);
}
}

contract NonlinearDutchDecayLibTest is Test, GasSnapshot {
MockNonlinearDutchDecayLibContract mockNonlinearDutchDecayLibContract = new MockNonlinearDutchDecayLibContract();
MockERC20 tokenIn;
MockERC20 tokenOut;

Expand Down Expand Up @@ -571,7 +548,7 @@ contract NonlinearDutchDecayLibTest is Test, GasSnapshot {
NonlinearDutchDecay memory curve = CurveBuilder.singlePointCurve(100, decayAmount);
vm.roll(150);
vm.expectRevert();
mockNonlinearDutchDecayLibContract.decayOutput(curve, startAmount, decayStartBlock, 0 ether, 1 ether);
decayOutput(curve, startAmount, decayStartBlock, 1 ether);
}

function testDutchMismatchedDecay() public {
Expand Down

0 comments on commit d417919

Please sign in to comment.