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 used by GLAM Policies for transfer-hook lockup checks.
authoritysigner, writableInstruction-specific account supplied by the caller or SDK.
subjectread-onlyInstruction-specific account supplied by the caller or SDK.
payersigner, writableInstruction-specific account supplied by the caller or SDK.
mintread-onlyToken mint account used by the instruction.
subject_token_accountread-onlyToken account read or written by the instruction.
system_programread-onlyStandard Solana program account required by the instruction.

Arguments

ArgumentTypeNotes
locked_untilu64Unlock time expressed in the selected time unit.
time_unitTimeUnitWhether the lockup uses slot-based or timestamp-based time. Fields: enum variants: Second, Slot