near / near-sdk-as

Tools for building NEAR smart contracts in AssemblyScript
https://near.github.io/near-sdk-as/
Other
115 stars 44 forks source link

Some collection types use prefix incorrectly #369

Open abacabadabacaba opened 3 years ago

abacabadabacaba commented 3 years ago

The constructors of collection types have a parameter named prefix. A user may assume that all storage keys used to store the collection's data begin with prefix.

This doesn't hold for some collection types. This may result in storage collisions between different collections, as well as between collections and direct storage use.

Also, it will be nice if the collections in near-sdk-as had the same storage representation as in near-sdk-rs.

willemneal commented 3 years ago

@abacabadabacaba, which collection types does this not hold for?