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

feat(schema): to support borsh spec about sorted keys #321

Open
dzmitry-lahoda opened this issue Nov 13, 2024 · 0 comments
Open

feat(schema): to support borsh spec about sorted keys #321

dzmitry-lahoda opened this issue Nov 13, 2024 · 0 comments

Comments

@dzmitry-lahoda
Copy link
Contributor

dzmitry-lahoda commented Nov 13, 2024

As per https://github.com/near/borsh?tab=readme-ov-file#specification:

all unordered containers (hashmap/hashset) are ordered in lexicographic order by key (in tie breaker case on value);

So HashMap and HashSet are ordered maps and sets.

In current schema I cannot distinguish that difference as part of schema enumeration, and has to resort to parsing rust types, which will not work for custom sorted things.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant