Skip to content

Trigger Import API

Trigger import endpoints help generate trigger drafts from external descriptions: EVM ABI, Substrate metadata/pallets, and source metadata.

POST /api/v2/triggers/import/evm

Loads and normalizes EVM ABI entries.

Arguments: none.

Payload: EVM ABI import input. Usually contains ABI JSON or ABI entries.

FieldRequiredDescription
projectYesProject fullname.
sourceYesEVM source name/fullname.
contractRequired if abi is missingContract address.
abiRequired if contract is missingABI JSON string.

Response: EvmAbiImportResult.

POST /api/v2/triggers/import/evm/abi

Tries to load ABI by contract address.

Arguments: none.

Payload:

FieldRequiredDescription
sourceYesEVM source name/fullname.
contractYesEVM contract address.

Response: EvmAbiResult.

POST /api/v2/triggers/import/evm/drafts

Generates EVM trigger drafts from ABI.

Arguments: none.

Payload: EVM import config from import wizard.

Common fields:

FieldRequiredDescription
projectYesProject fullname.
sourceYesEVM source name/fullname.
categoryNoCategory for generated triggers.
contractNoContract address.
abiNoABI JSON string.
abiSourceOverrideNoprovided or auto.
includeEventsNoWhether to generate event triggers.
includeCallsNoWhether to generate call/transaction triggers.

Response: TriggerImportDraftsResult.

POST /api/v2/triggers/import/substrate/drafts

Generates Substrate trigger drafts from metadata/pallet selection.

Arguments: none.

Payload: Substrate import config from import wizard.

Common fields:

FieldRequiredDescription
projectYesProject fullname.
sourceYesSubstrate source name/fullname.
palletsOne ofSelected pallets/modules.
entriesOne ofSelected entries: { pallet, kind, name }, where kind is event or call.
includeEventsNoWhether pallet import includes events.
includeCallsNoWhether pallet import includes calls.
defaultsTemplateNoDefaults template override object.
metaTemplateNoMetadata template override object.
labelsTemplateNoLabels template override object.
executionPolicyNoExecution policy override for generated drafts.

Response: TriggerImportDraftsResult.

GET /api/v2/triggers/substrate/source

Returns Substrate source info used by import wizard.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: none.

Response: SubstrateSourceInfo.

GET /api/v2/triggers/substrate/pallets

Returns list of Substrate pallets for selected source.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: none.

Response: SubstratePalletSummary[].

GET /api/v2/triggers/substrate/pallet

Returns metadata of a specific Substrate pallet.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.
palletQueryPallet/module name.

Payload: none.

Response: SubstratePalletMetadata.