Skip to main content

IPCVGuardian

IPCVGuardian

an interface for defining how the PCVGuardian functions

any implementation of this contract should be granted the roles of Guardian and PCVController in order to work correctly

Methods

addWhitelistAddress

function addWhitelistAddress(address pcvDeposit) external nonpayable

governor-only method to whitelist a pcvDeposit address to withdraw funds from

Parameters

NameTypeDescription
pcvDepositaddressthe address to whitelist

addWhitelistAddresses

function addWhitelistAddresses(address[] whitelistAddresses) external nonpayable

batch version of addWhitelistAddress

Parameters

NameTypeDescription
whitelistAddressesaddress[]the pcvDespoit addresses to whitelist, as calldata

getWhitelistAddresses

function getWhitelistAddresses() external view returns (address[])

returns all whitelisted addresses

Returns

NameTypeDescription
_0address[]undefined

isWhitelistAddress

function isWhitelistAddress(address pcvDeposit) external view returns (bool)

returns true if the pcvDeposit address is whitelisted

Parameters

NameTypeDescription
pcvDepositaddressthe address to check

Returns

NameTypeDescription
_0boolundefined

removeWhitelistAddress

function removeWhitelistAddress(address pcvDeposit) external nonpayable

governor-or-guardian-only method to remove pcvDeposit address from the whitelist to withdraw funds from

Parameters

NameTypeDescription
pcvDepositaddressthe address to un-whitelist

removeWhitelistAddresses

function removeWhitelistAddresses(address[] whitelistAddresses) external nonpayable

batch version of removeWhitelistAddress

Parameters

NameTypeDescription
whitelistAddressesaddress[]the addresses to un-whitelist

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

NameTypeDescription
pcvDepositaddressthe deposit to pull funds from
tokenaddressthe 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

NameTypeDescription
pcvDepositaddressthe 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

NameTypeDescription
pcvDepositaddressthe deposit to pull funds from
tokenaddressthe address of the token to withdraw
amountuint256the 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

NameTypeDescription
pcvDepositaddressthe address of the pcv deposit contract
amountuint256the amount to withdraw

Events

PCVGuardianERC20Withdrawal

event PCVGuardianERC20Withdrawal(address indexed pcvDeposit, address indexed token, uint256 amount)

Parameters

NameTypeDescription
pcvDeposit indexedaddressundefined
token indexedaddressundefined
amountuint256undefined

PCVGuardianWithdrawal

event PCVGuardianWithdrawal(address indexed pcvDeposit, uint256 amount)

Parameters

NameTypeDescription
pcvDeposit indexedaddressundefined
amountuint256undefined

WhitelistAddressAdded

event WhitelistAddressAdded(address indexed pcvDeposit)

Parameters

NameTypeDescription
pcvDeposit indexedaddressundefined

WhitelistAddressRemoved

event WhitelistAddressRemoved(address indexed pcvDeposit)

Parameters

NameTypeDescription
pcvDeposit indexedaddressundefined