diff --git a/contracts/Decentramall.sol b/contracts/Decentramall.sol index 9a464b8..05e59f2 100644 --- a/contracts/Decentramall.sol +++ b/contracts/Decentramall.sol @@ -56,6 +56,7 @@ contract Decentramall is ERC721 { event CancelRent(address renter, uint256 tokenId); event ChangeDai(address newDai); event ChangeAdmin(address newAdmin); + event ContractWithdraw(address to, uint256 amount); constructor( int256 _currentLimit, @@ -295,4 +296,14 @@ contract Decentramall is ERC721 { admin = newAdmin; emit ChangeAdmin(newAdmin); } + + /** + * @dev Withdraw DAI from contract + * @param toWithdraw address to withdraw to + * @param amount amount to withdraw + **/ + function contractWithdraw(address toWithdraw, uint256 amount) public isAdmin{ + IERC20(dai).transfer(toWithdraw, amount); + emit ContractWithdraw(toWithdraw, amount); + } } \ No newline at end of file