Asset collection functions.

This commit is contained in:
Sowmayjain 2018-11-30 12:24:38 +05:30
parent 99a1fc199e
commit 8682fc9092
2 changed files with 16 additions and 0 deletions

View File

@ -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);
}
}

View File

@ -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);
}
}