Expand description
cosmwasm_std::Addr
<->cosmwasm_std::CanonicalAddr
conversion for types that contain addresses.
Traits
The trait that represents any type which contains a
cosmwasm_std::Addr
and needs to be stored since cosmwasm_std::Addr
is usually converted
to cosmwasm_std::CanonicalAddr
first. The trait must be implemented on
the non-canonical version of the type and the output of Canonize::canonize
must
return the canonical version of the same type which is represented by its sister trait
Humanize
. This relationship is enforced on the type level since Canonize::Output
must implement Humanize
and vice versa. Functions
Attempting to canonicalize an empty address will fail.
This function skips calling
cosmwasm_std::Api::addr_canonicalize
if the input is empty and returns CanonicalAddr::default()
instead.Attempting to humanize an empty address will fail.
This function skips calling
cosmwasm_std::Api::addr_humanize
if the input is empty
and returns Addr::default()
instead.Validates a collection of strings that are expected to be valid addresses.