GLAMIDL Reference

create_policy

Creates a GLAM Policies account for transfer-hook lockup enforcement.

Required conditions

  • Creation-style flows require the target account or PDA to be uninitialized or intentionally updatable, the fee payer to be writable, and the System Program to be present when rent or allocation is needed.

Accounts

AccountRoleDescription
policy_accountwritablePolicy account or policy-related account.
authoritysigner, writableauthority account read or updated by GLAM Policies (Transfer Hook)'s create policy instruction.
subjectread-onlysubject account read by GLAM Policies (Transfer Hook)'s create policy instruction.
payersigner, writableFee payer funding rent or account allocation for this instruction.
mintread-onlyToken mint account used or validated by this instruction.
subject_token_accountread-onlyToken account read or written by this instruction.
system_programread-onlySolana System Program.

Arguments

ArgumentTypeNotes
locked_untilu64
time_unitTimeUnit

Policy & permissions

  • authority must be the Token-2022 mint authority or permanent delegate.
  • A separate payer is allowed. Existing lockups can only be extended; not shortened.
  • GLAM owner/delegate authority is not used.