Skip to content

Trigger Import API

Trigger import endpoints ayudan a generar trigger drafts desde descripciones externas: EVM ABI, Substrate metadata/pallets y source metadata.

POST /api/v2/triggers/import/evm

Carga y normaliza EVM ABI entries.

Arguments: ninguno.

Payload: EVM ABI import input. Normalmente contiene ABI JSON o ABI entries.

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

Respuesta: EvmAbiImportResult.

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

Intenta cargar ABI por contract address.

Arguments: ninguno.

Payload:

FieldRequiredDescription
sourceEVM source name/fullname.
contractEVM contract address.

Respuesta: EvmAbiResult.

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

Genera EVM trigger drafts desde ABI.

Arguments: ninguno.

Payload: EVM import config from import wizard.

Common fields:

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

Respuesta: TriggerImportDraftsResult.

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

Genera Substrate trigger drafts desde metadata/pallet selection.

Arguments: ninguno.

Payload: Substrate import config from import wizard.

Common fields:

FieldRequiredDescription
projectProject fullname.
sourceSubstrate 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.

Respuesta: TriggerImportDraftsResult.

GET /api/v2/triggers/substrate/source

Devuelve Substrate source info usada por import wizard.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: ninguno.

Respuesta: SubstrateSourceInfo.

GET /api/v2/triggers/substrate/pallets

Devuelve lista de Substrate pallets para el source elegido.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: ninguno.

Respuesta: SubstratePalletSummary[].

GET /api/v2/triggers/substrate/pallet

Devuelve metadata de un Substrate pallet concreto.

Arguments:

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

Payload: ninguno.

Respuesta: SubstratePalletMetadata.