Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fromCell is missing for maps #1229

Open
anton-trunov opened this issue Dec 23, 2024 · 1 comment · May be fixed by #1271
Open

fromCell is missing for maps #1229

anton-trunov opened this issue Dec 23, 2024 · 1 comment · May be fixed by #1271
Assignees
Labels
language feature scope: maps The map datatype and operations on it
Milestone

Comments

@anton-trunov
Copy link
Member

Maps are essentially cells under-the-hood. There is the asCell no-operation type converter which allows, for instance, to send maps in messages, but there is no corresponding fromCell type converter that would allow to use the transmitted map as a map on the other end.

@anton-trunov anton-trunov added language feature scope: maps The map datatype and operations on it labels Dec 23, 2024
@anton-trunov anton-trunov added this to the v1.6.0 milestone Dec 23, 2024
@Gusarich Gusarich self-assigned this Dec 28, 2024
@Gusarich Gusarich linked a pull request Dec 29, 2024 that will close this issue
6 tasks
@anton-trunov
Copy link
Member Author

Btw, currently one can use the following workaround:

asm fun castToMap(c: Cell): map<Int as uint8, Bool> { NOP }

let m1 = castToMap(beginCell()
          .storeUint(2, 2) // long label
          .storeUint(8, 4) // key length
          .storeUint(1, 8) // key
          .storeBit(true)  // value
          .endCell());

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language feature scope: maps The map datatype and operations on it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants