Skip to content

Commit

Permalink
refactor: address @oldchili review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
amusingaxl committed Oct 28, 2024
1 parent 8dfa747 commit e37bf81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ After deployment, governance must set the `cap` value using the `file` function.

#### DssVestSuckable

Pass the MCD [chainlog](https://github.com/makerdao/dss-chain-log) address to the constructor to set up the contract for scheduled Dai `suck`s. Note: this contract must be given authority to `suck()` Dai from the `vat`'s surplus buffer.
Pass the MCD [chainlog](https://github.com/makerdao/dss-chain-log) address to the constructor to set up the contract for scheduled Dai or USDS `suck`s. Note: this contract must be given authority to `suck()` Dai from the `vat`'s surplus buffer.

To choose between Dai and USDS, supply the relevant join (`MCD_JOIN_DAI` or `USDS_JOIN`) as the `address _join` constructor parameter.

A `vat.live` check is introduced to disable `vest()` in the event of Emergency Shutdown (aka Global Settlement).

Expand Down
14 changes: 6 additions & 8 deletions src/DssVest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ interface ERC20Like is GemLike {
function balanceOf(address) external returns (uint256);
}

interface JoinLike {}

interface DSTokenLike {
function balanceOf(address) external returns (uint256);
}
Expand Down Expand Up @@ -101,9 +99,9 @@ contract DssVestTest is DSTest {
MkrAuthorityLike authority;
VatLike vat;
ERC20Like dai;
JoinLike daiJoin;
address daiJoin;
ERC20Like usds;
JoinLike usdsJoin;
address usdsJoin;
EndLike end;

address VOW;
Expand All @@ -116,17 +114,17 @@ contract DssVestTest is DSTest {
authority = MkrAuthorityLike( chainlog.getAddress("GOV_GUARD"));
vat = VatLike( chainlog.getAddress("MCD_VAT"));
dai = ERC20Like( chainlog.getAddress("MCD_DAI"));
daiJoin = JoinLike( chainlog.getAddress("MCD_JOIN_DAI"));
daiJoin = chainlog.getAddress("MCD_JOIN_DAI");
usds = ERC20Like( chainlog.getAddress("USDS"));
usdsJoin = JoinLike( chainlog.getAddress("USDS_JOIN"));
usdsJoin = chainlog.getAddress("USDS_JOIN");
end = EndLike( chainlog.getAddress("MCD_END"));
VOW = chainlog.getAddress("MCD_VOW");

mVest = new DssVestMintable(address(gem));
mVest.file("cap", (2000 * WAD) / (4 * 365 days));
sVest = new DssVestSuckable(address(chainlog), address(daiJoin));
sVest = new DssVestSuckable(address(chainlog), daiJoin);
sVest.file("cap", (2000 * WAD) / (4 * 365 days));
sVestUsds = new DssVestSuckable(address(chainlog), address(usdsJoin));
sVestUsds = new DssVestSuckable(address(chainlog), usdsJoin);
sVestUsds.file("cap", (2000 * WAD) / (4 * 365 days));
boss = new Manager();
tVest = new DssVestTransferrable(address(boss), address(dai));
Expand Down

0 comments on commit e37bf81

Please sign in to comment.