var img = document.createElement('img'); img.src = "https://terradocs.matomo.cloud//piwik.php?idsite=3&rec=1&url=https://docs.warp.money" + location.pathname; img.style = "border:0"; img.alt = "tracker"; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(img,s);
Skip to main content

Job state

Owner side

  1. An owner creates a job with an execute message, conditions, and a reward. Upon successful creation, the job enters the Pending status.
  2. While in the Pending state, an owner can update a job's message or increase the reward amount of the job.
  3. Owners can also delete a job while in the Pending state. When a job is deleted, its state becomes Cancelled.
Job-Status

_25
_25
create_job()
_25
_25
│◄─────────────┐
_25
│ │
_25
▼ │
_25
┌───────┐ │
_25
┌─────│Pending├─┬──► update_job()
_25
│ └───┬───┘ │
_25
│ │ │
_25
│ │ └──► delete_job() ───┐
_25
│ │ │
_25
│ │ ▼
_25
│ ▼ ┌───────┐ ┌─────────┐
_25
│ evict_job()───► │Evicted│ │Cancelled│
_25
│ └───────┘ └─────────┘
_25
_25
└─► execute_job() ──────┐
_25
_25
│ ┌──────┐
_25
│ │Failed│
_25
▼ └──────┘
_25
┌────────┐
_25
│Executed│
_25
└────────┘

Keeper side

  1. A keeper can attempt to execute any job with a Pending status if they believe the job's conditions have been met.
  2. If the job's conditions aren't yet met, the job remains in the queue, and its status is unchanged.
  3. Evictors will collect 5% of the reward amount from the creator's Warp account balance for a job in the queue every 24 hours. If the account cannot pay, the job becomes Evicted, and the 5% eviction fee is taken from the reward and sent to the evictor. The rest of the reward is refunded to the creator.
  4. If a job fails during execution, its status becomes Failed.
  5. If the job's conditions are met, the job's execute message gets sent, and the rewards included for executing the job are sent to the keeper. The job's status becomes Executed.
Job-Status

_25
_25
create_job()
_25
_25
│◄─────────────┐
_25
│ │
_25
▼ │
_25
┌───────┐ │
_25
┌─────│Pending├─┬──► update_job()
_25
│ └───┬───┘ │
_25
│ │ │
_25
│ │ └──► delete_job() ───┐
_25
│ │ │
_25
│ │ ▼
_25
│ ▼ ┌───────┐ ┌─────────┐
_25
│ evict_job()───► │Evicted│ │Cancelled│
_25
│ └───────┘ └─────────┘
_25
_25
└─► execute_job() ──────┐
_25
_25
│ ┌──────┐
_25
│ │Failed│
_25
▼ └──────┘
_25
┌────────┐
_25
│Executed│
_25
└────────┘

Owner side

  1. An owner creates a job with an execute message, conditions, and a reward. Upon successful creation, the job enters the Pending status.
  2. While in the Pending state, an owner can update a job's message or increase the reward amount of the job.
  3. Owners can also delete a job while in the Pending state. When a job is deleted, its state becomes Cancelled.

Keeper side

  1. A keeper can attempt to execute any job with a Pending status if they believe the job's conditions have been met.
  2. If the job's conditions aren't yet met, the job remains in the queue, and its status is unchanged.
  3. Evictors will collect 5% of the reward amount from the creator's Warp account balance for a job in the queue every 24 hours. If the account cannot pay, the job becomes Evicted, and the 5% eviction fee is taken from the reward and sent to the evictor. The rest of the reward is refunded to the creator.
  4. If a job fails during execution, its status becomes Failed.
  5. If the job's conditions are met, the job's execute message gets sent, and the rewards included for executing the job are sent to the keeper. The job's status becomes Executed.
Job-Status

_25
_25
create_job()
_25
_25
│◄─────────────┐
_25
│ │
_25
▼ │
_25
┌───────┐ │
_25
┌─────│Pending├─┬──► update_job()
_25
│ └───┬───┘ │
_25
│ │ │
_25
│ │ └──► delete_job() ───┐
_25
│ │ │
_25
│ │ ▼
_25
│ ▼ ┌───────┐ ┌─────────┐
_25
│ evict_job()───► │Evicted│ │Cancelled│
_25
│ └───────┘ └─────────┘
_25
_25
└─► execute_job() ──────┐
_25
_25
│ ┌──────┐
_25
│ │Failed│
_25
▼ └──────┘
_25
┌────────┐
_25
│Executed│
_25
└────────┘