Skip to main content

MockEthPCVDeposit

Functions

constructor

function constructor(
address payable _beneficiary
) public

Parameters

NameTypeDescription
_beneficiaryaddress payable

receive

function receive() external

deposit

function deposit() external

withdraw

function withdraw(
address to,
uint256 amount
) external

Parameters

NameTypeDescription
toaddress
amountuint256

withdrawERC20

function withdrawERC20(
address token,
address to,
uint256 amount
) public

Parameters

NameTypeDescription
tokenaddress
toaddress
amountuint256

withdrawETH

function withdrawETH(
address payable to,
uint256 amountOut
) external

Parameters

NameTypeDescription
toaddress payable
amountOutuint256

balance

function balance() public returns (uint256)

gets the effective balance of "balanceReportedIn" token if the deposit were fully withdrawn

setBeneficiary

function setBeneficiary(
address payable _beneficiary
) public

Parameters

NameTypeDescription
_beneficiaryaddress payable

balanceReportedIn

function balanceReportedIn() public returns (address)

display the related token of the balance reported

resistantBalanceAndFei

function resistantBalanceAndFei() public returns (uint256, uint256)

gets the resistant token balance and protocol owned fei of this deposit