PCVGuardian
PCV Guardian is a contract to safeguard protocol funds by being able to withdraw whitelisted PCV deposits to an immutable safe address
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 |
addWhitelistAddress
function addWhitelistAddress(address pcvDeposit) external nonpayable
governor-only method to whitelist a pcvDeposit address to withdraw funds from
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the address to whitelist |
addWhitelistAddresses
function addWhitelistAddresses(address[] _whitelistAddresses) external nonpayable
batch version of addWhiteListaddress
Parameters
Name | Type | Description |
---|
_whitelistAddresses | address[] | the addresses to whitelist, as calldata |
core
function core() external view returns (contract ICore)
address of the Core contract referenced
Returns
Name | Type | Description |
---|
_0 | contract ICore | ICore implementation address |
getWhitelistAddresses
function getWhitelistAddresses() external view returns (address[])
returns all whitelisted pcvDeposit addresses
Returns
Name | Type | Description |
---|
_0 | address[] | undefined |
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 |
isWhitelistAddress
function isWhitelistAddress(address pcvDeposit) external view returns (bool)
returns true if the the provided address is a valid destination to withdraw funds from
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the pcvDeposit address to check if whitelisted |
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 |
removeWhitelistAddress
function removeWhitelistAddress(address pcvDeposit) external nonpayable
governor-or-guardian-only method to remove pcvDeposit address from the whitelist to withdraw funds from
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the address to remove from whitelist |
removeWhitelistAddresses
function removeWhitelistAddresses(address[] _whitelistAddresses) external nonpayable
batch version of removeWhitelistAddress
Parameters
Name | Type | Description |
---|
_whitelistAddresses | address[] | the addresses to remove from whitelist |
safeAddress
function safeAddress() external view returns (address)
safe address where PCV funds can be withdrawn to
Returns
Name | Type | Description |
---|
_0 | address | undefined |
setContractAdminRole
function setContractAdminRole(bytes32 newContractAdminRole) external nonpayable
sets a new admin role for this contract
Parameters
Name | Type | Description |
---|
newContractAdminRole | bytes32 | 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 |
withdrawAllERC20ToSafeAddress
function withdrawAllERC20ToSafeAddress(address pcvDeposit, address token) external nonpayable
governor-or-guardian-or-pcv-guard method to withdraw all of an ERC20 balance from a pcv deposit, by calling the withdrawERC20() method on it
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the deposit to pull funds from |
token | address | the address of the token to withdraw |
withdrawAllToSafeAddress
function withdrawAllToSafeAddress(address pcvDeposit) external nonpayable
governor-or-guardian-or-pcv-guard method to withdraw all at once funds from a pcv deposit, by calling the withdraw() method on it
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the address of the pcv deposit contract |
withdrawERC20ToSafeAddress
function withdrawERC20ToSafeAddress(address pcvDeposit, address token, uint256 amount) external nonpayable
governor-or-guardian-or-pcv-guard method to withdraw an ERC20 from a pcv deposit, by calling the withdrawERC20() method on it
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the deposit to pull funds from |
token | address | the address of the token to withdraw |
amount | uint256 | the amount of funds to withdraw |
withdrawToSafeAddress
function withdrawToSafeAddress(address pcvDeposit, uint256 amount) external nonpayable
governor-or-guardian-or-pcv-guard method to withdraw funds from a pcv deposit, by calling the withdraw() method on it
Parameters
Name | Type | Description |
---|
pcvDeposit | address | the address of the pcv deposit contract |
amount | uint256 | the amount to withdraw |
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 |
PCVGuardianERC20Withdrawal
event PCVGuardianERC20Withdrawal(address indexed pcvDeposit, address indexed token, uint256 amount)
Parameters
Name | Type | Description |
---|
pcvDeposit indexed | address | undefined |
token indexed | address | undefined |
amount | uint256 | undefined |
PCVGuardianWithdrawal
event PCVGuardianWithdrawal(address indexed pcvDeposit, uint256 amount)
Parameters
Name | Type | Description |
---|
pcvDeposit 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 |
WhitelistAddressAdded
event WhitelistAddressAdded(address indexed pcvDeposit)
Parameters
Name | Type | Description |
---|
pcvDeposit indexed | address | undefined |
WhitelistAddressRemoved
event WhitelistAddressRemoved(address indexed pcvDeposit)
Parameters
Name | Type | Description |
---|
pcvDeposit indexed | address | undefined |