Just some mappings

Sometimes, while coding up some Solidity contracts, all you want is a simple key/value mapping, to store some details into.

You want to keep it simple so the gas costs are low, but what about everything else? Would you still like to use smart contract proxies, so you can update your code? And maybe you’d like to keep this key/value mapping separate from your code, keeping upgrades manageable..?

With previous versions of AKAP-utils you a LinkedHashMap implementation. That’s still there and it gives you a lot of features, from put, get, remove and update entries, to iterating over keys, in insert order. Basically a full featured linked hash map, in Solidity. But you do pay a bit more in gas for these features.

If all you’re looking for is a simple key/value mapping, and don’t want to give up on upgradability, managed write access or any of the other features you get with AKAP, then we’ve got good news for you.

As of AKAP-utils v0.9.4, released earlier today, you can now use the SimpleMap for all your simple key/value mapping needs.