IDL & On-Chain Programs

Upload Solana Anchor IDLs and track program instructions

Upload Solana Anchor IDLs to track on-chain program interactions and use them as data sources for incentives.

parse_idl

Parse a Solana Anchor IDL file and show available instructions with their fields and accounts. Use this before create_idl to inspect what's available.

Requires: none

ParameterTypeRequiredDescription
filePathstringNoAbsolute path to an Anchor IDL JSON file. Preferred for large files.
idlobjectNoFull Anchor IDL JSON content. Use filePath for large IDLs.

Provide either filePath or idl, not both. Instructions are limited to 15 numbers, 15 strings, 10 booleans, and 30 accounts.

create_idl

Upload a Solana Anchor IDL and create instruction tracking in a single call. The program address is extracted from the IDL's address field automatically.

Requires: authentication, active project

ParameterTypeRequiredDescription
filePathstringNoAbsolute path to an Anchor IDL JSON file
idlobjectNoFull Anchor IDL JSON content
programAddressstringNoOverride the program address from the IDL
displayNamestringNoDisplay name for the program
descriptionstringNoDescription of the program
selectedInstructionsarrayNoInstructions to track (use parse_idl first)

create_instruction

Add an instruction to an existing uploaded IDL. Use this when the IDL exists but a specific instruction hasn't been set up for tracking yet.

Requires: authentication, active project

ParameterTypeRequiredDescription
idlIdstringYesID of the existing IDL
instructionNamestringYesName of the instruction from the IDL
labelstringNoDisplay label
fieldsarrayYesFields to track
accountsstring[]YesAccount names to track

list_idls

List all uploaded IDLs and their tracked instructions for the active project.

Requires: authentication, active project

No parameters.

The typical pipeline is: parse_idl -> create_idl -> generate_incentive_query (source: "idl_instruction") -> create_recurring_incentive.