ERC20PCVDepositWrapper
a lightweight contract to wrap ERC20 holding PCV contracts @author Fei Protocol When upgrading the PCVDeposit interface, there are many old contracts which do not support it. The main use case for the new interface is to add read methods for the Collateralization Oracle. Most PCVDeposits resistant balance method is simply returning the balance as a pass-through If the PCVDeposit holds FEI it may be considered as protocol FEI
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
Functions
constructor
function constructor(
address _tokenDeposit,
contract IERC20 _token,
bool _isProtocolFeiDeposit
) public
Parameters
Name | Type | Description |
---|---|---|
_tokenDeposit | address | |
_token | contract IERC20 | |
_isProtocolFeiDeposit | bool |
balance
function balance() public returns (uint256)
returns total balance of PCV in the Deposit
resistantBalanceAndFei
function resistantBalanceAndFei() public returns (uint256, uint256)
returns the resistant balance and FEI in the deposit
balanceReportedIn
function balanceReportedIn() public returns (address)
display the related token of the balance reported