Junø
Web
Discord
Github
Medium
Search…
Juno
Introduction
Home of CosmWasm
Economic Overview
Contributors
Brand Identity
Social/Resources/Updates
TUTORIALS
Wallets
Staking
Governance
Before submitting a proposal
Submitting a Proposal (CLI)
Command-Line Interface (CLI)
Introduction
Useful CLI Commands
Module Reference
Smart Contracts & Junod Development
Getting started
Junod Local Dev Setup
Interacting with Smart Contracts
Smart Contracts Installation
ERC-20 Tutorial
CW1 Tutorial
Installation
Download, Compile, Store
Initialise the Contract
Query commands
Execute commands
Nodes & Validators
Junod Installation and setup
Setting up Cosmovisor
Mainnet Setup and Tooling
Joining Mainnet
Mainnet Upgrades
Joining Testnet
Sync from Snapshot
Sync with state-sync
Relayers
Official Delegations Handbook
Sync Juno Classic
Powered By
GitBook
Query commands
Some useful commands for querying contract state
Useful commands
The CW1 subkeys contract has several useful commands available.
You can query a specific address, to see if it has an allowance:
1
junod query wasm contract-state smart
<
contract-addr
>
'{"allowance":{"spender":"<address>"}}'
--chain-id
<
chain-id
>
Copied!
You can query to see which keys are admins:
1
junod query wasm contract-state smart
<
contract-addr
>
'{"admin_list":{}}'
--chain-id
<
chain-id
>
Copied!
Or query to see all allowances:
1
junod query wasm contract-state smart
<
contract-addr
>
'{"all_allowances":{}}'
--chain-id
<
chain-id
>
Copied!
Previous
Initialise the Contract
Next
Execute commands
Last modified
5mo ago
Copy link