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

Implement Hash, Eq and PartialEq for AMM and Factory #187

Merged
merged 2 commits into from
Aug 18, 2024
Merged

Implement Hash, Eq and PartialEq for AMM and Factory #187

merged 2 commits into from
Aug 18, 2024

Conversation

0xDmtri
Copy link
Contributor

@0xDmtri 0xDmtri commented Jul 28, 2024

Problem:

Now, enum AMM (and Factory) compare be compared nor inserted into a HashMap. This is a bit inconvenient.

Solution:

I offer to implement Hash, Eq and PartialEq for AMM and Factory macros.
Moreover, I think it will be sufficient (to save up compute time) to just use Addresses for the comparison as they are unique Hashes a priori.

P.S. Feel free to suggest a better idea. Always open for discussion :)

@0xDmtri 0xDmtri changed the title feature/hashable amm Implement Hash, Eq and PartialEq for AMM and Factory Jul 28, 2024
@0xKitsune 0xKitsune merged commit c3187de into darkforestry:main Aug 18, 2024
0 of 2 checks passed
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

Successfully merging this pull request may close these issues.

2 participants