Skip to content

Commit

Permalink
Add writeoff wrapper for nav feed pv
Browse files Browse the repository at this point in the history
  • Loading branch information
hieronx committed Nov 17, 2023
1 parent 4584b0d commit 60f077c
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions src/borrower/wrappers/writeOffWrapperPV.sol
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)
}
}

0 comments on commit 60f077c

Please sign in to comment.