You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cross contract configuration Item queries is a common execution. This is usually done using SmartQuery which costs quite gas for retrieving simple object from storage. Instead RawQuery can be used for lower costs.
Proposal
Develop new generic storage helper that generates raw query wrapper for given data struct.
Background
Cross contract configuration
Item
queries is a common execution. This is usually done usingSmartQuery
which costs quite gas for retrieving simple object from storage. InsteadRawQuery
can be used for lower costs.Proposal
Develop new generic storage helper that generates raw query wrapper for given data struct.
Usage example
On source contract
On external contract
CONTRACT_CONFIG::query(&deps.querier, external_contract_addr)
raw query with config key internally, and parses
State
struct.Please look at cw4 helpers.rs for member query to see an example of reading remote state with raw query https://github.com/CosmWasm/cw-plus/blob/main/packages/cw4/src/helpers.rs#L87-L112
The text was updated successfully, but these errors were encountered: