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

Nested maps using hashing of keys #398

Open
anton-trunov opened this issue Sep 24, 2024 · 2 comments
Open

Nested maps using hashing of keys #398

anton-trunov opened this issue Sep 24, 2024 · 2 comments
Labels
tact-docs: Cookbook /cookbook section of the docs: "How-Tos" and complete code examples for various use-cases

Comments

@anton-trunov
Copy link
Member

We should provide an example of how to emulated binary maps of pseudo-type map<(K1, K2), V> using hashes and a map of type map<Int, V>

@novusnota
Copy link
Member

SomeStruct.toCell().hash() for the hashing?

@novusnota novusnota added the tact-docs: Cookbook /cookbook section of the docs: "How-Tos" and complete code examples for various use-cases label Sep 24, 2024
@anton-trunov
Copy link
Member Author

I think this is going to be expensive because the cell-creating operation (ENDC) costs 518 gas units. We should use hashing of the keys directly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tact-docs: Cookbook /cookbook section of the docs: "How-Tos" and complete code examples for various use-cases
Projects
None yet
Development

No branches or pull requests

2 participants