rename cPool

This commit is contained in:
poma 2021-03-11 22:56:02 +03:00
parent 3ad634594e
commit f189a657c9
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
1 changed files with 3 additions and 2 deletions

View File

@ -15,7 +15,7 @@ pragma solidity ^0.6.0;
import "./ERC20Tornado.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
contract cPool is ERC20Tornado {
contract cTornado is ERC20Tornado {
address public immutable governance = 0x5efda50f22d34F262c29268506C5Fa42cB56A1Ce;
IERC20 public immutable comp;
@ -27,11 +27,12 @@ contract cPool is ERC20Tornado {
uint32 _merkleTreeHeight,
IERC20 _token
) public ERC20Tornado(_verifier, _hasher, _denomination, _merkleTreeHeight, _token) {
require(address(_comp) != address(0), "Invalid COMP token address");
comp = _comp;
}
/// @dev Moves earned yield of the COMP token to the tornado governance contract
/// To make it work you may need to call `comptroller.claimComp(cPoolAddress)` before
/// To make it work you might need to call `comptroller.claimComp(cPoolAddress)` first
function claimComp() external {
comp.transfer(governance, comp.balanceOf(address(this)));
}