-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attempt to upgrade everything (esp saddle), fix some tests (#67)
* Attempt to upgrade everything (esp saddle), fix some tests * CToken delegate for a comp-like token (#68) * Add networks config for cUNI (#69) Co-authored-by: Antonina Norair <[email protected]>
- Loading branch information
1 parent
4caf72a
commit ca6bc76
Showing
34 changed files
with
4,184 additions
and
1,210 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
pragma solidity ^0.5.16; | ||
|
||
import "./CErc20Delegate.sol"; | ||
|
||
interface CompLike { | ||
function delegate(address delegatee) external; | ||
} | ||
|
||
/** | ||
* @title Compound's CCompLikeDelegate Contract | ||
* @notice CTokens which can 'delegate votes' of their underlying ERC-20 | ||
* @author Compound | ||
*/ | ||
contract CCompLikeDelegate is CErc20Delegate { | ||
/** | ||
* @notice Construct an empty delegate | ||
*/ | ||
constructor() public CErc20Delegate() {} | ||
|
||
/** | ||
* @notice Admin call to delegate the votes of the COMP-like underlying | ||
* @param compLikeDelegatee The address to delegate votes to | ||
*/ | ||
function _delegateCompLikeTo(address compLikeDelegatee) external { | ||
require(msg.sender == admin, "only the admin may set the comp-like delegate"); | ||
CompLike(underlying).delegate(compLikeDelegatee); | ||
} | ||
} |
Oops, something went wrong.