Binary type, and using the low-level wasm query extension for fine-grained pagination.
Gas Estimation
Auto Gas
When you pass"auto" as the fee, the client simulates the transaction and applies a gas multiplier:
You can pass a numeric multiplier instead of
"auto" for finer control:
Static Fees
For full control, provide an explicit fee object:Gas Simulation
Simulate a transaction to estimate gas without broadcasting:Working with Binary Data
ThetoBinary and fromBinary helpers convert JavaScript objects to and from the base64-encoded JSON format used by CosmWasm Binary fields:
Building Custom Messages
For advanced use cases, construct CosmWasm encode objects directly and broadcast them viasignAndBroadcast:
Mixing CosmWasm and Cosmos SDK Messages
This approach lets you combine contract calls with standard Cosmos SDK messages in a single atomic transaction:Wasm Query Extension
For fine-grained control over pagination or when building a custom query client, use the wasm extension directly instead of the high-levelCosmWasmClient methods:
Available Extension Methods
Next Steps
CosmWasm Overview
Back to the CosmWasm guide overview.
Stargate vs CosmWasm
Comparing the two client families and when to use each.