Types

Trigger values is a list of parameters that must be filled in for the trigger to work. Each value has a type, for convenient management and validation of input data.

String

A string.

Spec

value: { type: string }

Runtime value

'hello'

Number

A number.

Spec

value: { type: number }

Runtime value

12

Boolean

A boolean.

Spec

value: { type: boolean }

Runtime value

true

Object

An object of specified shape.

Spec

value:
  type: object
  properties:
    foo: { type: string }
    bar: { type: number }

Runtime value

{ foo: 'hello', bar: 12 }

Array

An array of elements of the same type.

Spec

value:
  type: array
  items: { type: string }

Runtime value

['foo', 'bar']

Tuple

A fixed-length array of elements of different specified types.

Spec

value:
  type: array
  items:
    - { type: string }
    - { type: number }

Runtime value

['foo', 12]

Address

For convenient management of the address book in the Web3alert, there is a special address type. Here is a list of supported address formats.

Plain

Plain string with no validation. But fields of this format still have an addressbook intergration.

value: { type: address }

SS58 (Substrate format)

value:
  type: address
  format: ss58
  prefix: 0

EVM

value:
  type: address
  format: evm

Bitcoin

value:
  type: address
  format: bitcoin

Sui

value:
  type: address
  format: sui

Cosmos

address-cosmos:
  type: address
  format: cosmos
  prefix: celestia

Runtime value

It will be a string of specified format.

'0xc0ffee234729296a45a3885638AC7E11F9d54979'

Last updated