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

Execute messages

This section outlines the data structures for Warp messages.

Source Code

The source for Warp can be found on Github:

Jobs

CreateJobMsg

Creates a job using a name, condition, execute messages, a reward, and other properties. Jobs are stored in an index. Successfully created jobs are given the Pending status. Jobs can also contain create_job transactions, allowing jobs to be chained together and executed from the same context.

You can view an example of a CreateJobMsg message on Chainscope.

JSON
Rust

_12
{
_12
"name": "<String>",
_12
"description": "<String>",
_12
"labels": ["<String>", "<String>", "..."],
_12
"condition": "<Condition>",
_12
"msgs": ["<String>", "<String>", "..."],
_12
"vars": ["<Variable>", "<Variable>", "..."],
_12
"recurring": "<bool>",
_12
"requeue_on_evict": "<bool>",
_12
"reward": "<Uint128>",
_12
"assets_to_withdraw": ["<AssetInfo>", "<AssetInfo>", "..."]
_12
}

DeleteJobMsg

Allows the Job owner to delete a pending job. Deleted Job messages are still stored in the index and given a Cancelled status.

JSON
Rust

_10
{
_10
"id": "<Uint64>"
_10
}

UpdateJobMsg

Allows the job owner to update Job properties or add more rewards.

JSON
Rust

_10
{
_10
"id": "<Uint64>",
_10
"name": "<Optional String>",
_10
"description": "<Optional String>",
_10
"labels": ["<Optional String 1>", "<Optional String 2>", "..."],
_10
"added_reward": "<Optional Uint128>"
_10
}

ExecuteJobMsg

Allows a keeper to execute a pending job if the conditions are met. Upon execution of the job, the reward will be released to the keeper. External inputs can be specified for the Job execution.

JSON
Rust

_10
{
_10
"id": "<Uint64>",
_10
"external_inputs": [
_10
{
_10
"name": "<String>",
_10
"value": "<String>"
_10
},
_10
// ...
_10
]
_10
}

EvictJobMsg

Evict jobs in the queue and collect a 5% eviction fee.

JSON
Rust

_10
{
_10
"job_id": <value>
_10
}

CreateJobMsg

Creates a job using a name, condition, execute messages, a reward, and other properties. Jobs are stored in an index. Successfully created jobs are given the Pending status. Jobs can also contain create_job transactions, allowing jobs to be chained together and executed from the same context.

You can view an example of a CreateJobMsg message on Chainscope.

DeleteJobMsg

Allows the Job owner to delete a pending job. Deleted Job messages are still stored in the index and given a Cancelled status.

UpdateJobMsg

Allows the job owner to update Job properties or add more rewards.

ExecuteJobMsg

Allows a keeper to execute a pending job if the conditions are met. Upon execution of the job, the reward will be released to the keeper. External inputs can be specified for the Job execution.

EvictJobMsg

Evict jobs in the queue and collect a 5% eviction fee.

JSON
Rust

_12
{
_12
"name": "<String>",
_12
"description": "<String>",
_12
"labels": ["<String>", "<String>", "..."],
_12
"condition": "<Condition>",
_12
"msgs": ["<String>", "<String>", "..."],
_12
"vars": ["<Variable>", "<Variable>", "..."],
_12
"recurring": "<bool>",
_12
"requeue_on_evict": "<bool>",
_12
"reward": "<Uint128>",
_12
"assets_to_withdraw": ["<AssetInfo>", "<AssetInfo>", "..."]
_12
}

Accounts

CreateAccountMsg

Create a Warp account. Warp accounts can be created with funds. When used along with the CreateJobMsg, you can create an account, create a Job, and fund the account all in one transaction.

JSON
Rust

_16
{
_16
"funds": [
_16
{
_16
"Cw20": {
_16
"contract_addr": "terra1...",
_16
"amount": "100"
_16
}
_16
},
_16
{
_16
"Cw721": {
_16
"contract_addr": "terra1...",
_16
"token_id": "12345"
_16
}
_16
}
_16
]
_16
}

CreateAccountMsg

Create a Warp account. Warp accounts can be created with funds. When used along with the CreateJobMsg, you can create an account, create a Job, and fund the account all in one transaction.

JSON
Rust

_16
{
_16
"funds": [
_16
{
_16
"Cw20": {
_16
"contract_addr": "terra1...",
_16
"amount": "100"
_16
}
_16
},
_16
{
_16
"Cw721": {
_16
"contract_addr": "terra1...",
_16
"token_id": "12345"
_16
}
_16
}
_16
]
_16
}

Config

UpdateConfigMsg

Update the config message for Warp configuration.

Rust

_13
pub struct UpdateConfigMsg {
_13
pub owner: Option<String>,
_13
pub fee_denom: Option<String>,
_13
pub fee_collector: Option<String>,
_13
pub minimum_reward: Option<Uint128>,
_13
pub creation_fee_percentage: Option<Uint64>,
_13
pub cancellation_fee_percentage: Option<Uint64>,
_13
pub t_max: Option<Uint64>,
_13
pub t_min: Option<Uint64>,
_13
pub a_max: Option<Uint128>,
_13
pub a_min: Option<Uint128>,
_13
pub q_max: Option<Uint64>,
_13
}

UpdateConfigMsg

Update the config message for Warp configuration.

Rust

_13
pub struct UpdateConfigMsg {
_13
pub owner: Option<String>,
_13
pub fee_denom: Option<String>,
_13
pub fee_collector: Option<String>,
_13
pub minimum_reward: Option<Uint128>,
_13
pub creation_fee_percentage: Option<Uint64>,
_13
pub cancellation_fee_percentage: Option<Uint64>,
_13
pub t_max: Option<Uint64>,
_13
pub t_min: Option<Uint64>,
_13
pub a_max: Option<Uint128>,
_13
pub a_min: Option<Uint128>,
_13
pub q_max: Option<Uint64>,
_13
}