Skip to main content

TreasuryCustodian

Methods

ROLES

function ROLES() external view returns (contract ROLESv1)

Returns

NameTypeDescription
_0contract ROLESv1undefined

TRSRY

function TRSRY() external view returns (contract TRSRYv1)

Returns

NameTypeDescription
_0contract TRSRYv1undefined

changeKernel

function changeKernel(contract Kernel newKernel_) external nonpayable

Function used by kernel when migrating to a new kernel.

Parameters

NameTypeDescription
newKernel_contract Kernelundefined

configureDependencies

function configureDependencies() external nonpayable returns (Keycode[] dependencies)

Define module dependencies for this policy.

Returns

NameTypeDescription
dependenciesKeycode[]- 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

NameTypeDescription
token_contract ERC20undefined
debtor_addressundefined
amount_uint256undefined

grantDebtorApproval

function grantDebtorApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable

Allow an address to incur amount_ of debt from the treasury

Parameters

NameTypeDescription
for_addressundefined
token_contract ERC20undefined
amount_uint256undefined

grantWithdrawerApproval

function grantWithdrawerApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable

Allow an address to withdraw amount_ from the treasury

Parameters

NameTypeDescription
for_addressundefined
token_contract ERC20undefined
amount_uint256undefined

increaseDebt

function increaseDebt(contract ERC20 token_, address debtor_, uint256 amount_) external nonpayable

Allow authorized addresses to increase debt in special cases

Parameters

NameTypeDescription
token_contract ERC20undefined
debtor_addressundefined
amount_uint256undefined

isActive

function isActive() external view returns (bool)

Easily accessible indicator for if a policy is activated or not.

Returns

NameTypeDescription
_0boolundefined

kernel

function kernel() external view returns (contract Kernel)

Returns

NameTypeDescription
_0contract Kernelundefined

reduceDebtorApproval

function reduceDebtorApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable

Lower an address's debtor approval

Parameters

NameTypeDescription
for_addressundefined
token_contract ERC20undefined
amount_uint256undefined

reduceWithdrawerApproval

function reduceWithdrawerApproval(address for_, contract ERC20 token_, uint256 amount_) external nonpayable

Lower an address's withdrawer approval

Parameters

NameTypeDescription
for_addressundefined
token_contract ERC20undefined
amount_uint256undefined

requestPermissions

function requestPermissions() external view returns (struct Permissions[] requests)

Function called by kernel to set module function permissions.

Returns

NameTypeDescription
requestsPermissions[]- 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

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

NameTypeDescription
to_addressundefined
token_contract ERC20undefined
amount_uint256undefined

Events

ApprovalRevoked

event ApprovalRevoked(address indexed policy_, contract ERC20[] tokens_)

Parameters

NameTypeDescription
policy_ indexedaddressundefined
tokens_contract ERC20[]undefined

Errors

KernelAdapter_OnlyKernel

error KernelAdapter_OnlyKernel(address caller_)

Parameters

NameTypeDescription
caller_addressundefined

PolicyStillActive

error PolicyStillActive()

Policy_ModuleDoesNotExist

error Policy_ModuleDoesNotExist(Keycode keycode_)

Parameters

NameTypeDescription
keycode_Keycodeundefined