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

Query messages

The following messages are used for querying Warp jobs, conditions, queries, and accounts.

Source Code

The source for Warp can be found on Github:

Queries

QueryJobMsg

Returns the job information from a given job id.

JSON

_10
{
_10
"query_job": {
_10
"id": "200"
_10
}
_10
}

Response

_18
{
_18
"job": {
_18
"id": "number",
_18
"owner": "string",
_18
"last_update_time": "number",
_18
"name": "string",
_18
"description": "string",
_18
"labels": ["string", "string", "..."],
_18
"status": {<JobStatus>},
_18
"condition": {<Condition>},
_18
"msgs": ["string", "string", "..."],
_18
"vars": [],
_18
"recurring": "boolean",
_18
"requeue_on_evict": "boolean",
_18
"reward": "number",
_18
"assets_to_withdraw": []
_18
}
_18
}

QueryJobsMsg

Queries and returns job information based on:

  • single or multiple job id's
  • Active/inactive jobs
  • a job's owner
  • a job's name
  • a job's status
  • jobs specified by a status and a boolean.
  • all job's created after a specific time or block height.

At least one of the previous fields must be specified to return a valid response.

Response sizes can be limited using limit.

JSON

_12
{
_12
"query_jobs": {
_12
"ids": ["number", "number", "..."],
_12
"active": "boolean",
_12
"owner": "string",
_12
"name": "string",
_12
"job_status": "JobStatus object",
_12
"condition_status": "boolean",
_12
"start_after": "JobIndex object",
_12
"limit": "number"
_12
}
_12
}

Response

_22
{
_22
"jobs": [
_22
{
_22
"id": "number",
_22
"owner": "string",
_22
"last_update_time": "number",
_22
"name": "string",
_22
"description": "string",
_22
"labels": ["string", "string", "..."],
_22
"status": "JobStatus object",
_22
"condition": "Condition object",
_22
"msgs": ["string", "string", "..."],
_22
"vars": ["Variable object", "Variable object", "..."],
_22
"recurring": "boolean",
_22
"requeue_on_evict": "boolean",
_22
"reward": "number",
_22
"assets_to_withdraw": ["AssetInfo object", "AssetInfo object", "..."]
_22
},
_22
// ... more Job objects
_22
],
_22
"total_count": "number"
_22
}

SimulateQueryMsg

Simulates a query given a query request message.

JSON

_10
{
_10
"simulate_query": {
_10
"query": "string"
_10
}
_10
}

Response

_10
{
_10
"simulate_response": {
_10
"response": "<resolved query expression>"
_10
}
_10
}

QueryAccountMsg

Queries an account by owner. Returns the owner and account addresses.

JSON

_10
{
_10
"query_account": {
_10
"owner": "string"
_10
}
_10
}

Response

_10
{
_10
"account": {
_10
"owner": "<owner address>",
_10
"account": "<account address>"
_10
}
_10
}

QueryAccountsMsg

Queries accounts. Response sizes can be limited using limit.

JSON

_10
{
_10
"query_accounts": {
_10
"start_after": "string",
_10
"limit": "number"
_10
}
_10
}

Response

_13
{
_13
"accounts": [
_13
{
_13
"owner": "<owner address>",
_13
"account": "<account address>"
_13
},
_13
{
_13
"owner": "<owner address>",
_13
"account": "<account address>"
_13
},
_13
...
_13
]
_13
}

QueryConfigMsg

Queries the config. The response is the configuration for the Warp contract.

JSON

_10
{
_10
"query_config": {}
_10
}

Response

_16
{
_16
"config": {
_16
"owner": "<owner_address>",
_16
"fee_denom": "<fee_denomination>",
_16
"fee_collector": "<fee_collector_address>",
_16
"warp_account_code_id": "<warp_account_code_id>",
_16
"minimum_reward": "<minimum_reward>",
_16
"creation_fee_percentage": "<creation_fee_percentage>",
_16
"cancellation_fee_percentage": "<cancellation_fee_percentage>",
_16
"t_max": "<t_max>",
_16
"t_min": "<t_min>",
_16
"a_max": "<a_max>",
_16
"a_min": "<a_min>",
_16
"q_max": "<q_max>"
_16
}
_16
}

QueryJobMsg

Returns the job information from a given job id.

QueryJobsMsg

Queries and returns job information based on:

  • single or multiple job id's
  • Active/inactive jobs
  • a job's owner
  • a job's name
  • a job's status
  • jobs specified by a status and a boolean.
  • all job's created after a specific time or block height.

At least one of the previous fields must be specified to return a valid response.

Response sizes can be limited using limit.

SimulateQueryMsg

Simulates a query given a query request message.

QueryAccountMsg

Queries an account by owner. Returns the owner and account addresses.

QueryAccountsMsg

Queries accounts. Response sizes can be limited using limit.

QueryConfigMsg

Queries the config. The response is the configuration for the Warp contract.

JSON

_10
{
_10
"query_job": {
_10
"id": "200"
_10
}
_10
}

Response

_18
{
_18
"job": {
_18
"id": "number",
_18
"owner": "string",
_18
"last_update_time": "number",
_18
"name": "string",
_18
"description": "string",
_18
"labels": ["string", "string", "..."],
_18
"status": {<JobStatus>},
_18
"condition": {<Condition>},
_18
"msgs": ["string", "string", "..."],
_18
"vars": [],
_18
"recurring": "boolean",
_18
"requeue_on_evict": "boolean",
_18
"reward": "number",
_18
"assets_to_withdraw": []
_18
}
_18
}