🔐edit_identity_depository
Permissionned - Update one or multiple properties of the identity depository in a single call
Flow
Checks
Anchor IDL accounts checks
Handler
Update the
depository
PDA internal data with the new valueEmits Anchor
SetDepositoryRedeemableAmountUnderManagementCapEvent
or/andSetDepositoryMintingDisabledEvent
event
Parameters
EditIdentityDepositoryFields
- a specific object type that accomodate all the new values for updating the properties in depository
. The latest structure:
{
redeemable_amount_under_management_cap: Option<u128>,
minting_disabled: Option<bool>,
}
Accounts in
// ...
#[derive(Accounts)]
pub struct EditIdentityDepository<'info> {
/// #1 Authored call accessible only to the signer matching Controller.authority
pub authority: Signer<'info>,
/// #2 The top level UXDProgram on chain account managing the redeemable mint
#[account(
mut,
seeds = [CONTROLLER_NAMESPACE],
bump = controller.load()?.bump,
has_one = authority @UxdError::InvalidAuthority,
)]
pub controller: AccountLoader<'info, Controller>,
/// #3 UXDProgram on chain account bound to a Controller instance.
#[account(
mut,
seeds = [IDENTITY_DEPOSITORY_NAMESPACE],
bump = depository.load()?.bump,
)]
pub depository: AccountLoader<'info, IdentityDepository>,
}
// ...
Last updated
Was this helpful?