Error (shared function has non-shared parameter typ)

The short answer is no, shared types, used in messaging, cannot contain mutable fields or arrays.

A TrieMap object cannot be stable, because some of its fields are functions, but you can use the encapsulated Trie as a stale variable, because it is just first order data. However, you need to make sure you don’t change the definition of the hash function used between upgrades.

2 Likes