Skip to main content

PCVGuardian

Functions

constructor

function constructor(
address _core,
address[] _safeAddresses
) public

Parameters

NameTypeDescription
_coreaddress
_safeAddressesaddress[]

isSafeAddress

function isSafeAddress(
address pcvDeposit
) public returns (bool)

returns true if the the provided address is a valid destination to withdraw funds to

Parameters

NameTypeDescription
pcvDepositaddressthe address to check

getSafeAddresses

function getSafeAddresses() public returns (address[])

returns all safe addresses

setSafeAddress

function setSafeAddress(
address pcvDeposit
) external

governor-only method to set an address as "safe" to withdraw funds to

Parameters

NameTypeDescription
pcvDepositaddressthe address to set as safe

setSafeAddresses

function setSafeAddresses(
address[] _safeAddresses
) external

batch version of setSafeAddress

Parameters

NameTypeDescription
_safeAddressesaddress[]the addresses to set as safe, as calldata

unsetSafeAddress

function unsetSafeAddress(
address pcvDeposit
) external

governor-or-guardian-only method to un-set an address as "safe" to withdraw funds to

Parameters

NameTypeDescription
pcvDepositaddressthe address to un-set as safe

unsetSafeAddresses

function unsetSafeAddresses(
address[] _safeAddresses
) external

batch version of unsetSafeAddresses

Parameters

NameTypeDescription
_safeAddressesaddress[]the addresses to un-set as safe

withdrawToSafeAddress

function withdrawToSafeAddress(
address pcvDeposit,
address safeAddress,
uint256 amount,
bool pauseAfter,
bool depositAfter
) external

governor-or-guardian-only method to withdraw funds from a pcv deposit, by calling the withdraw() method on it

Parameters

NameTypeDescription
pcvDepositaddressthe address of the pcv deposit contract
safeAddressaddressthe destination address to withdraw to
amountuint256the amount to withdraw
pauseAfterboolif true, the pcv contract will be paused after the withdraw
depositAfterboolif true, attempts to deposit to the target PCV deposit

withdrawETHToSafeAddress

function withdrawETHToSafeAddress(
address pcvDeposit,
address payable safeAddress,
uint256 amount,
bool pauseAfter,
bool depositAfter
) external

governor-or-guardian-only method to withdraw funds from a pcv deposit, by calling the withdraw() method on it

Parameters

NameTypeDescription
pcvDepositaddressthe address of the pcv deposit contract
safeAddressaddress payablethe destination address to withdraw to
amountuint256the amount of tokens to withdraw
pauseAfterboolif true, the pcv contract will be paused after the withdraw
depositAfterboolif true, attempts to deposit to the target PCV deposit

withdrawERC20ToSafeAddress

function withdrawERC20ToSafeAddress(
address pcvDeposit,
address safeAddress,
address token,
uint256 amount,
bool pauseAfter,
bool depositAfter
) external

governor-or-guardian-only method to withdraw funds from a pcv deposit, by calling the withdraw() method on it

Parameters

NameTypeDescription
pcvDepositaddressthe deposit to pull funds from
safeAddressaddressthe destination address to withdraw to
tokenaddress
amountuint256the amount of funds to withdraw
pauseAfterboolwhether to pause the pcv after withdrawing
depositAfterboolif true, attempts to deposit to the target PCV deposit

_setSafeAddress

function _setSafeAddress(
address anAddress
) internal

Parameters

NameTypeDescription
anAddressaddress

_unsetSafeAddress

function _unsetSafeAddress(
address anAddress
) internal

Parameters

NameTypeDescription
anAddressaddress