Query

What is Query?

Querying Contract in CosmWasm refers to the process of retrieving information from a smart contract without altering its state.

Query Messages

In Celatone, we provide the set of available messages for each selected contract.

  1. Click on “Query” in the Developer Tools of the sidebar
  2. Click on “Select Contract” button
  3. You can fill in the contract address manually or selecting the contract you’ve instantiated or saved to the list before
  4. Available Query messages will display, you can either click on any messages and input their key and value, or input the entire query parameters in JSON input manually.
  5. Submit the query by click “Query” button or press Cmd + Enter (or Ctrl + Enter for Windows) to receive the response in the “Return Output”.

If the input is an invalid JSON input, the system will display input error. But in case of invalid parameters, the error will display after the query attempt in the Return Output.


Execute

What is Execute?

Executing a contract involves sending a transaction, which require connected wallet and transaction fee, that alters the contract’s state.

Execute Messages

ExecuteMsg is a command sent to a contract to perform actions, each contract having its own set of executable messages. In Celatone, we provide the available messages for each selected contract.

  1. Connect your wallet to Celatone, by clicking the “Connect” button at the top-right of the screen
  2. Click on “Execute” in the Developer Tools of the sidebar
  3. Click on “Select Contract” button
  4. You can fill in the contract address manually or selecting the contract you’ve instantiated or saved to the list before
  5. Available Execute messages will display, you can either click on any messages and input their key and value, or input the entire Execute parameters in JSON input manually.
  6. Submit the transaction by click “Execute” button or press Cmd + Enter (or Ctrl + Enter for Windows)
  7. If the transaction is submitted properly. The modal display the assigned transaction hash with execution details. Otherwise, the error log will display or the transaction will end in failed status.

Attach Funds with Execute Messages

  1. Before submit the transaction, you can specify any funds you wish to attach through Attach Funds section, which you can provide in two options
  2. Submit the transaction by click “Execute” button or press Cmd + Enter (or Ctrl + Enter for Windows)
  3. If the transaction is submitted properly. The modal display the assigned transaction hash with execution details. Otherwise, the error log will display or the transaction will end in failed status.
  4. You can view the contract through the Contract Details to see if the contract successfully received the attach funds.