Utility methods for slab keys
Open
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 43
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
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: https://github.com/onflow/flow-go/pull/3644
Suggested Solution
add function:
func IsSlabIndex(key string) bool {
return len(key) == 9 && key[0] == '$'
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the existing slab-key handling in the Go package and the relevant tests. Add the requested public recognition utility and verify that it correctly identifies slab keys without requiring callers to know their structure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100