Mars Protocol
Search…
⌃K

MARS Token

The MARS token is a simple CW20 token fork. More details about MARS tokenomics can be found here.

QueryMsg

Balance

Returns the current balance of the given address, 0 if unset.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Balance {
address: String
}
}
{
"balance": {
"address": "terra..."
}
}
Key
Type
Description
address
String
Address to return current balance from

TokenInfo

Returns metadata on the contract - name, decimals, supply, etc.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
TokenInfo {}
}
{
"token_info": {}
}

Minter

Returns the minter of the contract.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Minter {}
}
{
"minter": {}
}

Allowance

Only with "allowance" extension. Returns how much spender can use from owner account, 0 if unset.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
Allowance {
owner: String,
spender: String
}
}
{
"allowance": {
"owner": "terra...",
"spender": "terra..."
}
}
Key
Type
Description
owner
String
Owner contract address
spender
String
Spender contract address

AllAllowances

Only with "enumerable" extension (and "allowances"). Returns all allowances this owner has approved. Supports pagination.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
AllAllowances {
owner: String,
start_after: Option<String>,
limit: Option<u32>
}
}
{
"all_allowances": {
"owner": "terra...",
"start_after": "terra...",
"limit": 10
}
}
Key
Type
Description
owner
String
Owner address to return approved allowances from
start_after*
String
Address to start after
limit*
u32
Limit of query return
* = optional

AllAccounts

Only with "enumerable" extension. Returns all accounts that have balances. Supports pagination.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
AllAccounts {
start_after: Option<String>,
limit: Option<u32>
}
}
{
"all_accounts": {
"start_after": "terra...",
"limit": 10
}
}
Key
Type
Description
start_after*
String
Address to start after
limit*
u32
Limit of query return
* = optional

MarketingInfo

Only with "marketing" extension. Returns more metadata on the contract to display in the client: description, logo, project url, etc.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
MarketingInfo {}
}
{
"marketing_info": {}
}
Only with "marketing" extension. ownloads the mbeded logo data (if stored on chain). Errors if no logo data ftored for this contract.
Rust
JSON
#[derive(Serialize, Deserialize, Clone, Debug, PartialEq, JsonSchema)]
#[serde(rename_all = "snake_case")]
pub enum QueryMsg {
DownloadLogo {}
}
{
"download_logo": {}
}