CosmWasm / wasmd

Basic cosmos-sdk app with web assembly smart contracts
Other
366 stars 397 forks source link

Mark wasmd queries with `module_query_safe` #1903

Closed srdtrk closed 3 months ago

srdtrk commented 3 months ago

Description

module_query_safe tag, introduced in CosmosSDK v0.47, is used mark queries that are deterministic and consume gas properly. In ibc-go, we allow such queries to be executed by interchain accounts. Since wasm queries are deterministic and also track their gas usage, they should be marked with this tag. This would allow wasm queries to be executed by interchain accounts and could also provide additional benefits if #1840 is implemented.

Example

Here is a bank query marked with this tag in CosmosSDK v0.50