ERC20CompoundPCVDeposit
Volt Protocol
ERC-20 implementation for a Compound PCV Deposit
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
Name | Type | Description |
---|
_0 | bytes32 | undefined |
balance
function balance() external view returns (uint256)
returns total balance of PCV in the Deposit excluding the VOLT
returns stale values from Compound if the market hasn't been updated
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
balanceReportedIn
function balanceReportedIn() external view returns (address)
display the related token of the balance reported
Returns
Name | Type | Description |
---|
_0 | address | undefined |
cToken
function cToken() external view returns (contract CToken)
Returns
Name | Type | Description |
---|
_0 | contract CToken | undefined |
core
function core() external view returns (contract ICore)
address of the Core contract referenced
Returns
Name | Type | Description |
---|
_0 | contract ICore | ICore implementation address |
deposit
function deposit() external nonpayable
deposit ERC-20 tokens to Compound
isContractAdmin
function isContractAdmin(address _admin) external view returns (bool)
returns whether a given address has the admin role for this contract
Parameters
Name | Type | Description |
---|
_admin | address | undefined |
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
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
Name | Type | Description |
---|
_0 | bool | undefined |
resistantBalanceAndVolt
function resistantBalanceAndVolt() external view returns (uint256, uint256)
gets the resistant token balance and protocol owned fei of this deposit
Returns
Name | Type | Description |
---|
_0 | uint256 | undefined |
_1 | uint256 | undefined |
setContractAdminRole
function setContractAdminRole(bytes32 newContractAdminRole) external nonpayable
sets a new admin role for this contract
Parameters
Name | Type | Description |
---|
newContractAdminRole | bytes32 | undefined |
token
function token() external view returns (contract IERC20)
the token underlying the cToken
Returns
Name | Type | Description |
---|
_0 | contract IERC20 | undefined |
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
Name | Type | Description |
---|
_0 | contract IERC20 | IERC20 implementation address |
vconBalance
function vconBalance() external view returns (uint256)
vcon balance of contract
Returns
Name | Type | Description |
---|
_0 | uint256 | vcon amount held |
volt
function volt() external view returns (contract IVolt)
address of the Fei contract referenced by Core
Returns
Name | Type | Description |
---|
_0 | contract IVolt | IFei implementation address |
voltBalance
function voltBalance() external view returns (uint256)
volt balance of contract
Returns
Name | Type | Description |
---|
_0 | uint256 | volt amount held |
withdraw
function withdraw(address to, uint256 amountUnderlying) external nonpayable
withdraw tokens from the PCV allocation
Parameters
Name | Type | Description |
---|
to | address | the address to send PCV to |
amountUnderlying | uint256 | of tokens withdrawn |
withdrawERC20
function withdrawERC20(address token, address to, uint256 amount) external nonpayable
withdraw ERC20 from the contract
Parameters
Name | Type | Description |
---|
token | address | address of the ERC20 to send |
to | address | address destination of the ERC20 |
amount | uint256 | quantity of ERC20 to send |
withdrawETH
function withdrawETH(address payable to, uint256 amountOut) external nonpayable
withdraw ETH from the contract
Parameters
Name | Type | Description |
---|
to | address payable | address to send ETH |
amountOut | uint256 | amount of ETH to send |
Events
ContractAdminRoleUpdate
event ContractAdminRoleUpdate(bytes32 indexed oldContractAdminRole, bytes32 indexed newContractAdminRole)
Parameters
Name | Type | Description |
---|
oldContractAdminRole indexed | bytes32 | undefined |
newContractAdminRole indexed | bytes32 | undefined |
CoreUpdate
event CoreUpdate(address indexed oldCore, address indexed newCore)
Parameters
Name | Type | Description |
---|
oldCore indexed | address | undefined |
newCore indexed | address | undefined |
Deposit
event Deposit(address indexed _from, uint256 _amount)
Parameters
Name | Type | Description |
---|
_from indexed | address | undefined |
_amount | uint256 | undefined |
Paused
event Paused(address account)
Parameters
Name | Type | Description |
---|
account | address | undefined |
Unpaused
event Unpaused(address account)
Parameters
Name | Type | Description |
---|
account | address | undefined |
WithdrawERC20
event WithdrawERC20(address indexed _caller, address indexed _token, address indexed _to, uint256 _amount)
Parameters
Name | Type | Description |
---|
_caller indexed | address | undefined |
_token indexed | address | undefined |
_to indexed | address | undefined |
_amount | uint256 | undefined |
WithdrawETH
event WithdrawETH(address indexed _caller, address indexed _to, uint256 _amount)
Parameters
Name | Type | Description |
---|
_caller indexed | address | undefined |
_to indexed | address | undefined |
_amount | uint256 | undefined |
Withdrawal
event Withdrawal(address indexed _caller, address indexed _to, uint256 _amount)
Parameters
Name | Type | Description |
---|
_caller indexed | address | undefined |
_to indexed | address | undefined |
_amount | uint256 | undefined |