TreasuryCustodian
Methods
ROLES
function ROLES() external view returns (contract ROLESv1)
Returns
Name | Type | Description |
---|
_0 | contract ROLESv1 | undefined |
TRSRY
function TRSRY() external view returns (contract TRSRYv1)
Returns
Name | Type | Description |
---|
_0 | contract TRSRYv1 | undefined |
changeKernel
function changeKernel(contract Kernel newKernel_) external nonpayable
Function used by kernel when migrating to a new kernel.
Parameters
Name | Type | Description |
---|
newKernel_ | contract Kernel | undefined |
function configureDependencies() external nonpayable returns (Keycode[] dependencies)
Define module dependencies for this policy.
Returns
Name | Type | Description |
---|
dependencies | Keycode[] | - Keycode array of module dependencies. |
decreaseDebt
function decreaseDebt(contract ERC20 token_, address debtor_, uint256 amount_) external nonpayable
Allow authorized addresses to decrease debt in special cases
Parameters
Name | Type | Description |
---|
token_ | contract ERC20 | undefined |
debtor_ | address | undefined |
amount_ | uint256 | undefined |
grantDebtorApproval
function grantDebtorApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable
Allow an address to incur amount_
of debt from the treasury
Parameters
Name | Type | Description |
---|
for_ | address | undefined |
token_ | contract ERC20 | undefined |
amount_ | uint256 | undefined |
grantWithdrawerApproval
function grantWithdrawerApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable
Allow an address to withdraw amount_
from the treasury
Parameters
Name | Type | Description |
---|
for_ | address | undefined |
token_ | contract ERC20 | undefined |
amount_ | uint256 | undefined |
increaseDebt
function increaseDebt(contract ERC20 token_, address debtor_, uint256 amount_) external nonpayable
Allow authorized addresses to increase debt in special cases
Parameters
Name | Type | Description |
---|
token_ | contract ERC20 | undefined |
debtor_ | address | undefined |
amount_ | uint256 | undefined |
isActive
function isActive() external view returns (bool)
Easily accessible indicator for if a policy is activated or not.
Returns
Name | Type | Description |
---|
_0 | bool | undefined |
kernel
function kernel() external view returns (contract Kernel)
Returns
Name | Type | Description |
---|
_0 | contract Kernel | undefined |
reduceDebtorApproval
function reduceDebtorApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable
Lower an address's debtor approval
Parameters
Name | Type | Description |
---|
for_ | address | undefined |
token_ | contract ERC20 | undefined |
amount_ | uint256 | undefined |
reduceWithdrawerApproval
function reduceWithdrawerApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable
Lower an address's withdrawer approval
Parameters
Name | Type | Description |
---|
for_ | address | undefined |
token_ | contract ERC20 | undefined |
amount_ | uint256 | undefined |
requestPermissions
function requestPermissions() external view returns (struct Permissions[] requests)
Function called by kernel to set module function permissions.
Returns
Name | Type | Description |
---|
requests | Permissions[] | - Array of keycodes and function selectors for requested permissions. |
revokePolicyApprovals
function revokePolicyApprovals(address policy_, contract ERC20[] tokens_) external nonpayable
Anyone can call to revoke a deactivated policy's approvals.
Parameters
Name | Type | Description |
---|
policy_ | address | undefined |
tokens_ | contract ERC20[] | undefined |
withdrawReservesTo
function withdrawReservesTo(address to_, contract ERC20 token_, uint256 amount_) external nonpayable
Custodian can withdraw reserves to an address.
Used for withdrawing assets to a MS or other address in special cases.
Parameters
Name | Type | Description |
---|
to_ | address | undefined |
token_ | contract ERC20 | undefined |
amount_ | uint256 | undefined |
Events
ApprovalRevoked
event ApprovalRevoked(address indexed policy_, contract ERC20[] tokens_)
Parameters
Name | Type | Description |
---|
policy_ indexed | address | undefined |
tokens_ | contract ERC20[] | undefined |
Errors
KernelAdapter_OnlyKernel
error KernelAdapter_OnlyKernel(address caller_)
Parameters
Name | Type | Description |
---|
caller_ | address | undefined |
PolicyStillActive
error PolicyStillActive()
Policy_ModuleDoesNotExist
error Policy_ModuleDoesNotExist(Keycode keycode_)
Parameters
Name | Type | Description |
---|
keycode_ | Keycode | undefined |