Zephyr Programs

We have already covered what a Zephyr program is, now let's try to get a clearer picture of it.

Setting up the project

Each Mercury account can initialize and deploy a single Zephyr program by following the steps on the Quickstart or the "Set up and manage project" section. With a simple Zephyr SDK command, you can create a Rust project that includes a Zephyr.toml file, where you can define the structure of the database tables that your program will access.

Write, Deploy, and Monitor your Program

Once you're all set, you can start writing your logic in the program. When you're finished the program will be deployed and:

  • Run for every new ledger close while performing the specified logic.

  • Be called through a web request to execute the predefined logic, if you're using it as a custom API.

  • Do both.

It's possible to control the program's execution from Mercury's app, where you can start, pause, and see its logs. Now, let's explore what it means to create your own logic in the program and the various types of actions that can be executed.

Last updated