How to operate complex map, wrap map within map

Here is my demo code:

struct Point{
    red: u64,
    white: u64,
    black: u64,
}

storage {
    mymap: StorageMap<Identity, StorageMap<u64, Point>> = StorageMap {},
}

How to implement the store and read operations of mymap?

hey @Clara, you can follow our docs here. Lmk how it goes, happy to help more :slight_smile:

Hi @Nazeeh21 I read the documentation, but it doesn’t suit my scenario. I found that it can be solved like this

mymap: StorageMap<(Identity, u64), Point> = StorageMap {},

A bit like the way cairo language is processed

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.