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
The method get or the following variants might cause the contract to panic on a Map:
get panics if the value corresponding to the key cannot be converted to type V.
get_unchecked panics if the map does not contain a value with the specified key or if the value corresponding to the key cannot be converted to type V
try_get_unchecked panics if the map does not contain a value with the specified key.
When using externally provided Maps as contract function arguments, there's no guarantee that entries will match the expected key (K) and value (V) types. To ensure type safety and avoid runtime errors, validate all entries before storage or when accessing them using try_ variant.
The text was updated successfully, but these errors were encountered:
Description
The method
get
or the following variants might cause the contract to panic on a Map:get
panics if the value corresponding to the key cannot be converted to type V.get_unchecked
panics if the map does not contain a value with the specified key or if the value corresponding to the key cannot be converted to type Vtry_get_unchecked
panics if the map does not contain a value with the specified key.When using externally provided Maps as contract function arguments, there's no guarantee that entries will match the expected key (K) and value (V) types. To ensure type safety and avoid runtime errors, validate all entries before storage or when accessing them using
try_
variant.The text was updated successfully, but these errors were encountered: