11pragma solidity ^ 0.8.4 ;
22
3- import "../IPCVDeposit .sol " ;
3+ import "../IPCVDepositBalances .sol " ;
44
55/**
66 @notice a lightweight contract to wrap old PCV deposits to use the new interface
@@ -12,37 +12,37 @@ import "../IPCVDeposit.sol";
1212
1313 This wrapper can be used in the CR oracle which reduces the number of contract upgrades and reduces the complexity and risk of the upgrade
1414*/
15- contract PCVDepositWrapper {
15+ contract PCVDepositWrapper is IPCVDepositBalances {
1616
1717 /// @notice the referenced PCV Deposit
18- IPCVDeposit public pcvDeposit;
18+ IPCVDepositBalances public pcvDeposit;
1919
2020 /// @notice the balance reported in token
2121 address public token;
2222
2323 /// @notice a flag for whether to report the balance as protocol owned FEI
2424 bool public isProtocolFeiDeposit;
2525
26- constructor (IPCVDeposit _pcvDeposit , address _token , bool _isProtocolFeiDeposit ) {
26+ constructor (IPCVDepositBalances _pcvDeposit , address _token , bool _isProtocolFeiDeposit ) {
2727 pcvDeposit = _pcvDeposit;
2828 token = _token;
2929 isProtocolFeiDeposit = _isProtocolFeiDeposit;
3030 }
3131
3232 /// @notice returns total balance of PCV in the Deposit
33- function balance () public view returns (uint256 ) {
33+ function balance () public view override returns (uint256 ) {
3434 return pcvDeposit.balance ();
3535 }
3636
3737 /// @notice returns the resistant balance and FEI in the deposit
38- function resistantBalanceAndFei () public view returns (uint256 , uint256 ) {
38+ function resistantBalanceAndFei () public view override returns (uint256 , uint256 ) {
3939 uint256 resistantBalance = balance ();
4040 uint256 reistantFei = isProtocolFeiDeposit ? resistantBalance : 0 ;
4141 return (resistantBalance, reistantFei);
4242 }
4343
4444 /// @notice display the related token of the balance reported
45- function balanceReportedIn () public view returns (address ) {
45+ function balanceReportedIn () public view override returns (address ) {
4646 return token;
4747 }
4848}
0 commit comments