AllowMint

Permits an SPL token mint on the instance and creates the escrow's associated token account for that mint. Deposits for this mint become possible after this call.

Accounts

AccountWritableSignerDescription
payerFee payer
adminInstance admin
instanceInstance PDA
mintSPL token mint to allow
allowed_mintAllowedMint PDA (created by this instruction)
instance_ataEscrow's associated token account for this mint (created by this instruction)
system_programSystem Program
token_programSPL Token Program
associated_token_programAssociated Token Program
event_authorityEvent authority PDA
private_channel_escrow_programEscrow Program

Parameters

ParameterTypeDescription
bumpu8Bump seed for the allowed_mint PDA. Optional: the Async client auto-derives it if omitted

The IDL contains a discriminator: u8 argument (value 1) that is auto-set by the generated client and should not be passed manually.

Important Notes

  • Use getAllowMintInstructionAsync; it auto-derives bump, allowed_mint, and instance_ata when they are not provided. Pass your own bump only if you already computed it via Pubkey::find_program_address(&[b"allowed_mint", instance_pda, mint], &PROGRAM_ID)
  • Also creates instance_ata, the escrow's ATA for this mint
  • Mints with a transfer hook extension are explicitly blocked: attempting to allow such a mint throws TransferHookNotAllowed
  • Emits an event via EmitEvent CPI

Is this page helpful?

Зміст

Редагувати сторінку
AllowMint | Solana