Map v8.0.0, it's finally here

Just wanted to double confirm that this map is stable and has no need for pre/post upgrade functions? As stable keyword isn’t used in the code sample and it’s not mentioned prominently except for the Github about.

That’s correct. Map internal structure does not contain any functions (or any other types that are forbidden by stable keyword) so you can easily declare it as stable. All stable variables will persist between upgrades.

This look ok? It compiled for me

stable var transactionLog : Map.Map<Nat64, TransactionInfo> = Map.new<Nat64, TransactionInfo>();

I’m on dfx 0.15.2

1 Like