[last try] Fixing WIPE error.

This commit is contained in:
Sowmayjain 2019-04-01 18:17:35 +05:30
parent b4a6113f00
commit 6f6debbf30
3 changed files with 3 additions and 15 deletions

View File

@ -17,13 +17,12 @@ interface TubInterface {
function skr() external view returns (TokenInterface); function skr() external view returns (TokenInterface);
function sai() external view returns (TokenInterface); function sai() external view returns (TokenInterface);
function ink(bytes32) external view returns (uint); function ink(bytes32) external view returns (uint);
function tab(bytes32) external view returns (uint); function tab(bytes32) external returns (uint);
function rap(bytes32) external view returns (uint); function rap(bytes32) external returns (uint);
function per() external view returns (uint); function per() external view returns (uint);
function pep() external view returns (PepInterface); function pep() external view returns (PepInterface);
} }
interface TokenInterface { interface TokenInterface {
function allowance(address, address) external view returns (uint); function allowance(address, address) external view returns (uint);
function balanceOf(address) external view returns (uint); function balanceOf(address) external view returns (uint);
@ -34,17 +33,10 @@ interface TokenInterface {
function withdraw(uint) external; function withdraw(uint) external;
} }
interface PepInterface { interface PepInterface {
function peek() external returns (bytes32, bool); function peek() external returns (bytes32, bool);
} }
interface WETHFace {
function deposit() external payable;
function withdraw(uint wad) external;
}
interface UniswapExchange { interface UniswapExchange {
function getEthToTokenOutputPrice(uint256 tokensBought) external view returns (uint256 ethSold); function getEthToTokenOutputPrice(uint256 tokensBought) external view returns (uint256 ethSold);
function getTokenToEthOutputPrice(uint256 ethBought) external view returns (uint256 tokensSold); function getTokenToEthOutputPrice(uint256 ethBought) external view returns (uint256 tokensSold);
@ -188,11 +180,7 @@ contract CDPResolver is Helpers {
} }
} }
function wipe( function wipe(uint cdpNum, uint _wad) public {
uint cdpNum,
uint _wad
) public
{
require(_wad > 0, "no-wipe-no-dai"); require(_wad > 0, "no-wipe-no-dai");
TubInterface tub = TubInterface(getSaiTubAddress()); TubInterface tub = TubInterface(getSaiTubAddress());