@@ -20,25 +20,28 @@ interface ERC20Like {
20
20
function approve (address usr , uint256 wad ) external returns (bool );
21
21
}
22
22
23
- interface JoinLike {
23
+ interface DaiJoinLike {
24
24
function dai () external view returns (address );
25
25
function join (address , uint256 ) external ;
26
26
}
27
+ interface UsdsJoinLike is DaiJoinLike {
28
+ function usds () external view returns (address );
29
+ }
27
30
28
31
contract DssBlow2 {
29
32
address public immutable vow;
30
33
ERC20Like public immutable dai;
31
34
ERC20Like public immutable usds;
32
- JoinLike public immutable daiJoin;
33
- JoinLike public immutable usdsJoin;
35
+ DaiJoinLike public immutable daiJoin;
36
+ UsdsJoinLike public immutable usdsJoin;
34
37
35
38
event Blow (address indexed token , uint256 amount );
36
39
37
40
constructor (address daiJoin_ , address usdsJoin_ , address vow_ ) {
38
- daiJoin = JoinLike (daiJoin_);
41
+ daiJoin = DaiJoinLike (daiJoin_);
39
42
dai = ERC20Like (daiJoin.dai ());
40
- usdsJoin = JoinLike (usdsJoin_);
41
- usds = ERC20Like (usdsJoin.dai ());
43
+ usdsJoin = UsdsJoinLike (usdsJoin_);
44
+ usds = ERC20Like (usdsJoin.usds ());
42
45
vow = vow_;
43
46
dai.approve (daiJoin_, type (uint256 ).max);
44
47
usds.approve (usdsJoin_, type (uint256 ).max);
0 commit comments