WebsiteDiscordGithubSecret University
Search
⌃K
Links
Introduction
🤫
Overview, Ecosystem and Technology
Secret Network Overview
Ecosystem Overview
Secret Network Techstack
💻
Development
Getting Started
Secret contract - design fundamentals
Secret Contract / CosmWasm framework
Development concepts/templates
Testing Secret Contracts
Reference contracts, guides and examples
Resources - API/Contract addresses
Tools & Libraries
LocalSecret
SecretJS
Getting Started with SecretJS
Snippets
Deploying a Contract
Send Native Coin
Query a Contract
Create a new Wallet
Permits
SNIP20
SNIP721
SecretCLI
Secret.NET
SecretPy (Python)
SecretK (Kotlin)
Contract Development
Frontend Development
Hidden Gems
Versioning & Changelog
🔧
Infrastructure
Setting up a node/validator
Maintaining a node/validator
IBC Relayers
Sentry and Archive nodes
Upgrade Instructions
Postmortems
Contribute to the documentation
Powered By GitBook

Query a Contract

// Query the current count
console.log("Querying contract for current count");
const { count } = await secretjs.query.compute.queryContract({
contract_address: contractAddress,
code_hash: contractCodeHash,
query: { get_count: {} },
});
Previous
Send Native Coin
Next
Create a new Wallet
Last modified 7mo ago