Skip to content

Trigger Import API

Trigger import endpoints ajudam a gerar trigger drafts a partir de descrições externas: EVM ABI, Substrate metadata/pallets e source metadata.

POST /api/v2/triggers/import/evm

Carrega e normaliza EVM ABI entries.

Arguments: nenhum.

Payload: EVM ABI import input. Normalmente contém ABI JSON ou ABI entries.

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

Resposta: EvmAbiImportResult.

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

Tenta carregar ABI por contract address.

Arguments: nenhum.

Payload:

FieldRequiredDescription
sourceSimEVM source name/fullname.
contractSimEVM contract address.

Resposta: EvmAbiResult.

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

Gera EVM trigger drafts a partir de ABI.

Arguments: nenhum.

Payload: EVM import config from import wizard.

Common fields:

FieldRequiredDescription
projectSimProject fullname.
sourceSimEVM source name/fullname.
categoryNãoCategory for generated triggers.
contractNãoContract address.
abiNãoABI JSON string.
abiSourceOverrideNãoprovided ou auto.
includeEventsNãoWhether to generate event triggers.
includeCallsNãoWhether to generate call/transaction triggers.

Resposta: TriggerImportDraftsResult.

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

Gera Substrate trigger drafts a partir de metadata/pallet selection.

Arguments: nenhum.

Payload: Substrate import config from import wizard.

Common fields:

FieldRequiredDescription
projectSimProject fullname.
sourceSimSubstrate source name/fullname.
palletsOne ofSelected pallets/modules.
entriesOne ofSelected entries: { pallet, kind, name }, where kind is event or call.
includeEventsNãoWhether pallet import includes events.
includeCallsNãoWhether pallet import includes calls.
defaultsTemplateNãoDefaults template override object.
metaTemplateNãoMetadata template override object.
labelsTemplateNãoLabels template override object.
executionPolicyNãoExecution policy override for generated drafts.

Resposta: TriggerImportDraftsResult.

GET /api/v2/triggers/substrate/source

Devolve Substrate source info usada pelo import wizard.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: nenhum.

Resposta: SubstrateSourceInfo.

GET /api/v2/triggers/substrate/pallets

Devolve lista de Substrate pallets para o source selecionado.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: nenhum.

Resposta: SubstratePalletSummary[].

GET /api/v2/triggers/substrate/pallet

Devolve metadata de um Substrate pallet específico.

Arguments:

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

Payload: nenhum.

Resposta: SubstratePalletMetadata.