babylonlabs-io / babylon-contract

CosmWasm smart contracts for Babylon integration
Other
3 stars 0 forks source link

Use raw queries when / if possible #41

Open maurolacy opened 1 month ago

maurolacy commented 1 month ago

Raw queries are much cheaper than smart queries, as they access the storage directly. Every time a query returns an umodified value from the store, it could in principle be done through a raw query.

Since raw queries have their own problems (no encapsulation, become part of the public API, requires care, migrations, etc.) let's use them only when / if convenient. By example, when querying something regularly at each block, like is the case with: