Issue To Be Solved
It would be convenient (and safer) if cadence exposed methods for recognizing if a storage key is a slab key, so that code importing cadence doesn't have to know about the slab key structure.
This was relevant here: onflow/flow-go#3644
Suggested Solution
add function:
func IsSlabIndex(key string) bool {
return len(key) == 9 && key[0] == '$'
}