Skip to main content

ERC20HoldingPCVDeposit

DO NOT USE in prod, still needs multiple code reviews. Contract is only for testing currently

Methods

CONTRACT_ADMIN_ROLE

function CONTRACT_ADMIN_ROLE() external view returns (bytes32)

a role used with a subset of governor permissions for this contract only

Returns

NameTypeDescription
_0bytes32undefined

balance

function balance() external view returns (uint256)

returns total balance of PCV in the deposit

Returns

NameTypeDescription
_0uint256undefined

balanceReportedIn

function balanceReportedIn() external view returns (address)

display the related token of the balance reported

Returns

NameTypeDescription
_0addressundefined

core

function core() external view returns (contract ICore)

address of the Core contract referenced

Returns

NameTypeDescription
_0contract ICoreICore implementation address

deposit

function deposit() external nonpayable

No-op deposit

isContractAdmin

function isContractAdmin(address _admin) external view returns (bool)

returns whether a given address has the admin role for this contract

Parameters

NameTypeDescription
_adminaddressundefined

Returns

NameTypeDescription
_0boolundefined

pause

function pause() external nonpayable

set pausable methods to paused

paused

function paused() external view returns (bool)

Returns true if the contract is paused, and false otherwise.

Returns

NameTypeDescription
_0boolundefined

resistantBalanceAndVolt

function resistantBalanceAndVolt() external view returns (uint256, uint256)

returns the resistant balance and VOLT in the deposit

Returns

NameTypeDescription
_0uint256undefined
_1uint256undefined

setContractAdminRole

function setContractAdminRole(bytes32 newContractAdminRole) external nonpayable

sets a new admin role for this contract

Parameters

NameTypeDescription
newContractAdminRolebytes32undefined

token

function token() external view returns (contract IERC20)

Token which the balance is reported in

Returns

NameTypeDescription
_0contract IERC20undefined

unpause

function unpause() external nonpayable

set pausable methods to unpaused

vcon

function vcon() external view returns (contract IERC20)

address of the Tribe contract referenced by Core

Returns

NameTypeDescription
_0contract IERC20IERC20 implementation address

vconBalance

function vconBalance() external view returns (uint256)

vcon balance of contract

Returns

NameTypeDescription
_0uint256vcon amount held

volt

function volt() external view returns (contract IVolt)

address of the Fei contract referenced by Core

Returns

NameTypeDescription
_0contract IVoltIFei implementation address

voltBalance

function voltBalance() external view returns (uint256)

volt balance of contract

Returns

NameTypeDescription
_0uint256volt amount held

weth

function weth() external view returns (contract IWETH)

WETH contract

Returns

NameTypeDescription
_0contract IWETHundefined

withdraw

function withdraw(address to, uint256 amountUnderlying) external nonpayable

Withdraw underlying

Parameters

NameTypeDescription
toaddressthe address to send PCV to
amountUnderlyinguint256of tokens withdrawn

withdrawAll

function withdrawAll(address to) external nonpayable

Withdraw all of underlying

Parameters

NameTypeDescription
toaddressthe address to send PCV to

withdrawERC20

function withdrawERC20(address token, address to, uint256 amount) external nonpayable

withdraw ERC20 from the contract

Parameters

NameTypeDescription
tokenaddressaddress of the ERC20 to send
toaddressaddress destination of the ERC20
amountuint256quantity of ERC20 to send

withdrawETH

function withdrawETH(address payable to, uint256 amountOut) external nonpayable

withdraw ETH from the contract

Parameters

NameTypeDescription
toaddress payableaddress to send ETH
amountOutuint256amount of ETH to send

wrapETH

function wrapETH() external nonpayable

Wraps all ETH held by the contract to WETH. Permissionless, anyone can call it

Events

ContractAdminRoleUpdate

event ContractAdminRoleUpdate(bytes32 indexed oldContractAdminRole, bytes32 indexed newContractAdminRole)

Parameters

NameTypeDescription
oldContractAdminRole indexedbytes32undefined
newContractAdminRole indexedbytes32undefined

CoreUpdate

event CoreUpdate(address indexed oldCore, address indexed newCore)

Parameters

NameTypeDescription
oldCore indexedaddressundefined
newCore indexedaddressundefined

Deposit

event Deposit(address indexed _from, uint256 _amount)

Parameters

NameTypeDescription
_from indexedaddressundefined
_amountuint256undefined

Paused

event Paused(address account)

Parameters

NameTypeDescription
accountaddressundefined

Unpaused

event Unpaused(address account)

Parameters

NameTypeDescription
accountaddressundefined

WithdrawERC20

event WithdrawERC20(address indexed _caller, address indexed _token, address indexed _to, uint256 _amount)

Parameters

NameTypeDescription
_caller indexedaddressundefined
_token indexedaddressundefined
_to indexedaddressundefined
_amountuint256undefined

WithdrawETH

event WithdrawETH(address indexed _caller, address indexed _to, uint256 _amount)

Parameters

NameTypeDescription
_caller indexedaddressundefined
_to indexedaddressundefined
_amountuint256undefined

Withdrawal

event Withdrawal(address indexed _caller, address indexed _to, uint256 _amount)

Parameters

NameTypeDescription
_caller indexedaddressundefined
_to indexedaddressundefined
_amountuint256undefined