Skip to content

Commit

Permalink
Sanity check mom's splitter
Browse files Browse the repository at this point in the history
  • Loading branch information
telome committed Jan 19, 2024
1 parent af764d3 commit ce7978e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deploy/FlapperInit.sol
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ interface FlapperUniV2Like {
}

interface SplitterMomLike {
function splitter() external view returns (address);
function setAuthority(address) external;
}

Expand Down Expand Up @@ -143,9 +144,10 @@ library FlapperInit {
SplitterMomLike mom = SplitterMomLike(splitterInstance.mom);

// Sanity checks
require(splitter.vat() == address(dss.vat), "Splitter vat mismatch");
require(splitter.daiJoin() == cfg.daiJoin, "Splitter daiJoin mismatch");
require(splitter.farm() == cfg.farm, "Splitter farm mismatch");
require(splitter.vat() == address(dss.vat), "Splitter vat mismatch");
require(splitter.daiJoin() == cfg.daiJoin, "Splitter daiJoin mismatch");
require(splitter.farm() == cfg.farm, "Splitter farm mismatch");
require(mom.splitter() == splitterInstance.splitter, "Mom splitter mismatch");

require(cfg.hump > 0, "hump too low");
require(cfg.hop >= 5 minutes, "hop too low");
Expand Down

0 comments on commit ce7978e

Please sign in to comment.