Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Representation

With the recent decision to introduce WASM. It is suggested to use it for Triggers. So that Triggers can be written in Rust* and compiled into WASM.
This way Triggers will benefit from a high level language features of an already established language and will be able to solve all the listed use cases with ease.
As discussed previously solving listed use cases with ISI was impossible or very difficult and needed significant work on the language design side.

*- generally speaking any language could be used that can be compiled into WASM. But due to Rust being our primary development language it is suggested to focus on it.

Place in the WSV hierarchy

...

Corresponding to their meaning Triggers can be stored in 2 ways:

  1. Top Level Triggers - in the World entity
    1. They can operate on any data in WSV
  2. Domain Level Triggers - in the corresponding Domain
    1. Their access is restricted only to their Domain

Second option might be interesting for permission-ed blockchains.

Categories

  • Have the following Triggers categories:
    • Time-based
    • Block number-based
    • Transaction-based (can have a condition of whether they need to execute, similar to Oracle `when` condition)
    • Triggers that are triggered by specific ISI call - ExecuteTrigger(Params)
  • Have an ability to configure trigger order for Transaction Based triggers:
    • Before (transaction execution) - have the ability to check and fail or allow transaction
    • After (transaction execution)

...