IFeiPCVGuardian
IFeiPCVGuardian
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
getSafeAddresses
function getSafeAddresses() external view returns (address[])
returns all safe addresses
Returns
Name | Type | Description |
---|---|---|
_0 | address[] | undefined |
isSafeAddress
function isSafeAddress(address pcvDeposit) external view returns (bool)
returns true if the the provided address is a valid destination to withdraw funds to
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit | address | the address to check |
Returns
Name | Type | Description |
---|---|---|
_0 | bool | undefined |
setSafeAddress
function setSafeAddress(address pcvDeposit) external nonpayable
governor-only method to set an address as "safe" to withdraw funds to
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit | address | the address to set as safe |
setSafeAddresses
function setSafeAddresses(address[] safeAddresses) external nonpayable
batch version of setSafeAddress
Parameters
Name | Type | Description |
---|---|---|
safeAddresses | address[] | the addresses to set as safe, as calldata |
unsetSafeAddress
function unsetSafeAddress(address pcvDeposit) external nonpayable
governor-or-guardian-only method to un-set an address as "safe" to withdraw funds to
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit | address | the address to un-set as safe |
unsetSafeAddresses
function unsetSafeAddresses(address[] safeAddresses) external nonpayable
batch version of unsetSafeAddresses
Parameters
Name | Type | Description |
---|---|---|
safeAddresses | address[] | the addresses to un-set as safe |
withdrawERC20ToSafeAddress
function withdrawERC20ToSafeAddress(address pcvDeposit, address safeAddress, address token, uint256 amount, bool pauseAfter, bool depositAfter) external nonpayable
governor-or-guardian-only method to withdraw funds from a pcv deposit, by calling the withdraw() method on it
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit | address | the deposit to pull funds from |
safeAddress | address | the destination address to withdraw to |
token | address | the token to withdraw |
amount | uint256 | the amount of funds to withdraw |
pauseAfter | bool | whether to pause the pcv after withdrawing |
depositAfter | bool | if true, attempts to deposit to the target PCV deposit |
withdrawETHToSafeAddress
function withdrawETHToSafeAddress(address pcvDeposit, address payable safeAddress, uint256 amount, bool pauseAfter, bool depositAfter) external nonpayable
governor-or-guardian-only 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 |
safeAddress | address payable | the destination address to withdraw to |
amount | uint256 | the amount of tokens to withdraw |
pauseAfter | bool | if true, the pcv contract will be paused after the withdraw |
depositAfter | bool | if true, attempts to deposit to the target PCV deposit |
withdrawToSafeAddress
function withdrawToSafeAddress(address pcvDeposit, address safeAddress, uint256 amount, bool pauseAfter, bool depositAfter) external nonpayable
governor-or-guardian-only 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 |
safeAddress | address | the destination address to withdraw to |
amount | uint256 | the amount to withdraw |
pauseAfter | bool | if true, the pcv contract will be paused after the withdraw |
depositAfter | bool | if true, attempts to deposit to the target PCV deposit |
Events
PCVGuardianERC20Withdrawal
event PCVGuardianERC20Withdrawal(address indexed pcvDeposit, address indexed destination, address indexed token, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit indexed | address | undefined |
destination indexed | address | undefined |
token indexed | address | undefined |
amount | uint256 | undefined |
PCVGuardianETHWithdrawal
event PCVGuardianETHWithdrawal(address indexed pcvDeposit, address indexed destination, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit indexed | address | undefined |
destination indexed | address | undefined |
amount | uint256 | undefined |
PCVGuardianWithdrawal
event PCVGuardianWithdrawal(address indexed pcvDeposit, address indexed destination, uint256 amount)
Parameters
Name | Type | Description |
---|---|---|
pcvDeposit indexed | address | undefined |
destination indexed | address | undefined |
amount | uint256 | undefined |
SafeAddressAdded
event SafeAddressAdded(address indexed safeAddress)
Parameters
Name | Type | Description |
---|---|---|
safeAddress indexed | address | undefined |
SafeAddressRemoved
event SafeAddressRemoved(address indexed safeAddress)
Parameters
Name | Type | Description |
---|---|---|
safeAddress indexed | address | undefined |