Skip to content

Trigger Import API

Trigger import endpoints помогают сгенерировать trigger drafts из внешних описаний: EVM ABI, Substrate metadata/pallets and source metadata.

POST /api/v2/triggers/import/evm

Загружает и нормализует EVM ABI entries.

Arguments: нет.

Payload: EVM ABI import input. Обычно содержит ABI JSON или ABI entries.

FieldRequiredDescription
projectДаProject fullname.
sourceДаEVM source name/fullname.
contractRequired if abi is missingContract address.
abiRequired if contract is missingABI JSON string.

Response: parsed ABI entries.

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

Пытается загрузить ABI по contract address.

Arguments: нет.

Payload:

FieldRequiredDescription
sourceДаEVM source name/fullname.
contractДаEVM contract address.

Response: ABI JSON or detect/load error.

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

Генерирует EVM trigger drafts из ABI.

Arguments: нет.

Payload: EVM import config from import wizard.

Common fields:

FieldRequiredDescription
projectДаProject fullname.
sourceДаEVM source name/fullname.
categoryНетCategory for generated triggers.
contractНетContract address.
abiНетABI JSON string.
abiSourceOverrideНетprovided или auto.
includeEventsНетWhether to generate event triggers.
includeCallsНетWhether to generate call/transaction triggers.

Response: generated trigger drafts.

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

Генерирует Substrate trigger drafts из metadata/pallet selection.

Arguments: нет.

Payload: Substrate import config from import wizard.

Common fields:

FieldRequiredDescription
projectДаProject fullname.
sourceДаSubstrate source name/fullname.
palletsOne ofSelected pallets/modules.
entriesOne ofSelected entries: { pallet, kind, name }, where kind is event or call.
includeEventsНетWhether pallet import includes events.
includeCallsНетWhether pallet import includes calls.
defaultsTemplateНетDefaults template override object.
metaTemplateНетMetadata template override object.
labelsTemplateНетLabels template override object.
executionPolicyНетExecution policy override for generated drafts.

Response: generated trigger drafts.

GET /api/v2/triggers/substrate/source

Возвращает Substrate source info used by import wizard.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: нет.

Response: source metadata summary.

GET /api/v2/triggers/substrate/pallets

Возвращает список Substrate pallets для выбранного source.

Arguments:

ArgumentLocationDescription
sourceQuerySubstrate data source fullname/name.

Payload: нет.

Response: array of pallets.

GET /api/v2/triggers/substrate/pallet

Возвращает metadata конкретного Substrate pallet.

Arguments:

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

Payload: нет.

Response: pallet events/calls/storage metadata used for draft generation.