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

Convert StorageDoubleMap to StorageNMap for evaluations and participations #55

Merged

Conversation

JuaniRios
Copy link
Contributor

No description provided.

@linear
Copy link

linear bot commented Jul 28, 2023

PLMC-233 Change from StorageDoubleMap to StorageNMap

The current way of getting the PLMC to convert locks is by using the fungibles API, but we need to now use the original bonded amount to limit to 80% of the total bonded, which is stored in the Evaluations StorageDoubleMap.

I believe it has become cumbersome enough to use vectors to store all the evaluations for one project since now we need to make sure each evaluation item never is deducted less than 20%, while at the same time knowing the total amount bonded, and which item to transfer the lock.

@JuaniRios JuaniRios requested a review from lrazovic July 28, 2023 13:25
@JuaniRios JuaniRios self-assigned this Jul 28, 2023
@JuaniRios JuaniRios marked this pull request as ready for review July 31, 2023 11:20
Copy link
Member

@lrazovic lrazovic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The StorageNMap allows for much cleaner code. Solid improvement!

@lrazovic lrazovic merged commit d673420 into main Aug 3, 2023
1 of 2 checks passed
@lrazovic lrazovic deleted the feature/plmc-233-change-from-storagedoublemap-to-storagenmap branch October 11, 2023 07:14
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