Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions contracts/Decentramall.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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);
}
}