diff --git a/contracts/protocols/InstaKyber.sol b/contracts/protocols/InstaKyber.sol index d3a8091..53eadd0 100644 --- a/contracts/protocols/InstaKyber.sol +++ b/contracts/protocols/InstaKyber.sol @@ -181,10 +181,24 @@ contract Trade is Registry { contract InstaKyber is Trade { + event ERC20Collected(address addr, uint amount); + event ETHCollected(uint amount); + constructor(address rAddr) public { addressRegistry = rAddr; } function () public payable {} + function collectERC20(address tknAddr, uint amount) public onlyAdmin { + IERC20 tkn = IERC20(tknAddr); + tkn.transfer(msg.sender, amount); + emit ERC20Collected(tknAddr, amount); + } + + function collectETH(uint amount) public onlyAdmin { + msg.sender.transfer(amount); + emit ETHCollected(amount); + } + } \ No newline at end of file diff --git a/contracts/protocols/InstaMaker.sol b/contracts/protocols/InstaMaker.sol index ad0643a..8d73ef6 100644 --- a/contracts/protocols/InstaMaker.sol +++ b/contracts/protocols/InstaMaker.sol @@ -263,6 +263,7 @@ contract BorrowTasks is RepayLoan { contract InstaMaker is BorrowTasks { event MKRCollected(uint amount); + event ETHCollected(uint amount); constructor(address rAddr) public { addressRegistry = rAddr; @@ -285,6 +286,7 @@ contract InstaMaker is BorrowTasks { function collectETH(uint amount) public onlyAdmin { msg.sender.transfer(amount); + emit ETHCollected(amount); } } \ No newline at end of file