Best practise with `try_read()` & `write` on storage keys



I don’t see the point of introducing try_read() if we are going to use it like this. It probably adds to gas cost too.

So i am guessing there is something i am missing. So how do I best use try_read()? Also when would I use write() instead of what we had previously - using map.insert()

The motivations for the API change are explained in the RFC, namely that the wrapper type is required to handle storage slots as language constructs and not have to fiddle with compiler intrinsics, which is required to make dynamic storage types possible.

As for when to use those particular methods, I guess it depends what you’re trying to do.

Closed due to lack of activity.