🎛️
UXDProgram (Solana)
  • 💾Welcome
    • Purpose and philosophy
    • Testing
    • Audits
  • 📚Useful Informations
    • Glossary
      • 🪙Depository
      • 🪙Controller
      • 📘CPI
    • ✨Visualisations
  • On-chain Accounts
    • Controller
    • MercurialVaultDepository
    • IdentityDepository
  • Instructions
    • 🟢initialize_controller
    • 🔐register_mercurial_vault_depository
    • 🔐initialize_identity_depository
    • 🔐edit_controller
    • 🔐edit_identity_depository
    • 🔐edit_mercurial_vault_depository
    • 🟢mint_with_identity_depository
    • 🟢redeem_from_identity_depository
    • mercurial
      • 🟢mint_with_mercurial_vault_depository
      • 🟢redeem_from_mercurial_vault_depository
Powered by GitBook
On this page
  • Flow
  • Parameters
  • Accounts in

Was this helpful?

  1. Instructions

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 value

    • Emits Anchor SetDepositoryRedeemableAmountUnderManagementCapEvent or/and SetDepositoryMintingDisabledEvent 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

programs/uxd/src/instructions/edit_identity_depository.rs
// ...

#[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>,
}

// ...
Previousedit_controllerNextedit_mercurial_vault_depository

Last updated 2 years ago

Was this helpful?

🔐