Function cw2::query_contract_info

source ·
pub fn query_contract_info<T, CQ>(
    querier: &QuerierWrapper<'_, CQ>,
    contract_addr: T
) -> StdResult<ContractVersion>
where T: Into<String>, CQ: CustomQuery,
Expand description

This will make a raw_query to another contract to determine the current version it claims to be. This should not be trusted, but could be used as a quick filter if the other contract exists and claims to be a cw20-base contract for example. (Note: you usually want to require interfaces not implementations of the contracts you compose with, so be careful of overuse)