Skip to content

Commit e37bf81

Browse files
committed
refactor: address @oldchili review comments
1 parent 8dfa747 commit e37bf81

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ After deployment, governance must set the `cap` value using the `file` function.
3232

3333
#### DssVestSuckable
3434

35-
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.
35+
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.
36+
37+
To choose between Dai and USDS, supply the relevant join (`MCD_JOIN_DAI` or `USDS_JOIN`) as the `address _join` constructor parameter.
3638

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

src/DssVest.t.sol

+6-8
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@ interface ERC20Like is GemLike {
3030
function balanceOf(address) external returns (uint256);
3131
}
3232

33-
interface JoinLike {}
34-
3533
interface DSTokenLike {
3634
function balanceOf(address) external returns (uint256);
3735
}
@@ -101,9 +99,9 @@ contract DssVestTest is DSTest {
10199
MkrAuthorityLike authority;
102100
VatLike vat;
103101
ERC20Like dai;
104-
JoinLike daiJoin;
102+
address daiJoin;
105103
ERC20Like usds;
106-
JoinLike usdsJoin;
104+
address usdsJoin;
107105
EndLike end;
108106

109107
address VOW;
@@ -116,17 +114,17 @@ contract DssVestTest is DSTest {
116114
authority = MkrAuthorityLike( chainlog.getAddress("GOV_GUARD"));
117115
vat = VatLike( chainlog.getAddress("MCD_VAT"));
118116
dai = ERC20Like( chainlog.getAddress("MCD_DAI"));
119-
daiJoin = JoinLike( chainlog.getAddress("MCD_JOIN_DAI"));
117+
daiJoin = chainlog.getAddress("MCD_JOIN_DAI");
120118
usds = ERC20Like( chainlog.getAddress("USDS"));
121-
usdsJoin = JoinLike( chainlog.getAddress("USDS_JOIN"));
119+
usdsJoin = chainlog.getAddress("USDS_JOIN");
122120
end = EndLike( chainlog.getAddress("MCD_END"));
123121
VOW = chainlog.getAddress("MCD_VOW");
124122

125123
mVest = new DssVestMintable(address(gem));
126124
mVest.file("cap", (2000 * WAD) / (4 * 365 days));
127-
sVest = new DssVestSuckable(address(chainlog), address(daiJoin));
125+
sVest = new DssVestSuckable(address(chainlog), daiJoin);
128126
sVest.file("cap", (2000 * WAD) / (4 * 365 days));
129-
sVestUsds = new DssVestSuckable(address(chainlog), address(usdsJoin));
127+
sVestUsds = new DssVestSuckable(address(chainlog), usdsJoin);
130128
sVestUsds.file("cap", (2000 * WAD) / (4 * 365 days));
131129
boss = new Manager();
132130
tVest = new DssVestTransferrable(address(boss), address(dai));

0 commit comments

Comments
 (0)