mirror of
https://github.com/Instadapp/dsa-connectors.git
synced 2024-07-29 22:37:00 +00:00
Add more connectors
This commit is contained in:
parent
a953a56c38
commit
20f9af8fe4
|
|
@ -27,6 +27,11 @@ abstract contract Basic is DSMath, Stores {
|
||||||
return abi.encode(eventName, eventParam);
|
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 {
|
function convertEthToWeth(bool isEth, TokenInterface token, uint amount) internal {
|
||||||
if(isEth) token.deposit{value: amount}();
|
if(isEth) token.deposit{value: amount}();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { KyberInterface } from "./interface.sol";
|
||||||
|
|
||||||
abstract contract Helpers is DSMath, Basic {
|
abstract contract Helpers is DSMath, Basic {
|
||||||
/**
|
/**
|
||||||
* @dev Kyver Interface
|
* @dev Kyber Interface
|
||||||
*/
|
*/
|
||||||
KyberInterface internal constant kyber = KyberInterface(0x818E6FECD516Ecc3849DAf6845e3EC868087B755);
|
KyberInterface internal constant kyber = KyberInterface(0x818E6FECD516Ecc3849DAf6845e3EC868087B755);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user