Skip to main content Link Search Menu Expand Document (external link)

WIP

Proposal Contract Queries

Table of contents
  1. Proposal Contract Queries
    1. Token Info:
    2. All Accounts:
    3. Initial Accounts:
    4. Balance:
    5. Votes:

Below I will describe the possible Query messages that can be used on the proposal contracts in both object and JSON formats

Token Info:

Gets the on-chain information about the token stored on the blockchain


        
  
{token_info: {}}


      

        
  
{"token_info": {}}


      

        
  
{
  "name": "YFD Governance Proposal AAAB",
  "symbol": "YFD_GOVAAAB",
  "decimals": 6,
  "total_supply": "24999852549"
} 


      

All Accounts:

Gets all wallet addressess that hold vote tokens


        
  
{all_accounts:{}}


      

        
  
{"all_accounts":{}}


      

        
  
{"accounts":["address", "address", "address", ...]}


      

Initial Accounts:

Gets all wallet addressess that initially held vote tokens


        
  
{initial_accounts:{}}


      

        
  
{"inital_accounts":{}}


      

        
  
{"accounts":["address", "address", "address", ...]}


      

Balance:

Gets the token balance of the given wallet address. Balance is returned in microunits


        
  
{balance: { address: [account_address]}}


      

        
  
{"balance": { "address": "[account_address]"}}


      

        
  
{"balance": "78999989667"}


      

Votes:

Gets the information on the status of voting. Balances are returned in microunits. Blocks are used for expiration and quorum_block


        
  
{votes:{}}


      

        
  
{"votes":{}}


      

        
  
{
  "affirm": "24999852549",
  "deny": "0",
  "deny_with_penalty": "0",
  "abstain": "0",
  "total_supply": "24999852549",
  "expiration": 2619871,
  "quorum_block": 2519140,
  "vote_state": {
    "Affirm": {}
  }
}