-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add writeoff wrapper for nav feed pv
- Loading branch information
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// SPDX-License-Identifier: AGPL-3.0-only | ||
pragma solidity >=0.7.6; | ||
pragma experimental ABIEncoderV2; | ||
|
||
import "tinlake-auth/auth.sol"; | ||
|
||
interface NAVFeedPVLike { | ||
function writeOff(uint256 loan) external; | ||
} | ||
|
||
/// @notice WriteOff contract can move overdue loans into a write off group | ||
/// The wrapper contract works specifically for the NAVFeedPV version | ||
contract WriteOffWrapperPV is Auth { | ||
NAVFeedPVLike navFeed; | ||
|
||
constructor(address navFeed_) { | ||
navFeed = NAVFeedPVLike(navFeed_); | ||
wards[msg.sender] = 1; | ||
emit Rely(msg.sender); | ||
} | ||
|
||
/// @notice writes off an overdue loan | ||
/// @param loan the id of the loan | ||
function writeOff(uint256 loan) public auth { | ||
navFeed.writeOff(loan) | ||
} | ||
} |