🔐edit_controller
Permissionned - Update one or multiple properties of controller in a single call
Flow
Checks
Anchor IDL accounts checks
Validates:
redeemable_global_supply_capshould not over 2^128
Handler
Update the
controllerPDA internal data with the new valueEmits Anchor
SetRedeemableGlobalSupplyCapEventevent
Parameters
EditControllerFields - a specific object type that accomodate all the new values for updating the properties in controller. The latest structure:
{
redeemable_global_supply_cap: Option<u128>,
}Accounts in
// ...
#[derive(Accounts)]
pub struct EditController<'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>,
}
// ...Last updated
Was this helpful?