Add more connectors

This commit is contained in:
Mubaris NK 2021-02-13 18:19:22 +05:30
parent a953a56c38
commit 20f9af8fe4
No known key found for this signature in database
GPG Key ID: 9AC09AD0F8D68561
2 changed files with 6 additions and 1 deletions

View File

@ -27,6 +27,11 @@ abstract contract Basic is DSMath, Stores {
return abi.encode(eventName, eventParam);
}
function changeEthAddress(address buy, address sell) internal pure returns(TokenInterface _buy, TokenInterface _sell){
_buy = buy == ethAddr ? TokenInterface(wethAddr) : TokenInterface(buy);
_sell = sell == ethAddr ? TokenInterface(wethAddr) : TokenInterface(sell);
}
function convertEthToWeth(bool isEth, TokenInterface token, uint amount) internal {
if(isEth) token.deposit{value: amount}();
}

View File

@ -6,7 +6,7 @@ import { KyberInterface } from "./interface.sol";
abstract contract Helpers is DSMath, Basic {
/**
* @dev Kyver Interface
* @dev Kyber Interface
*/
KyberInterface internal constant kyber = KyberInterface(0x818E6FECD516Ecc3849DAf6845e3EC868087B755);