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

Voting strategy indexing #287

Merged
merged 8 commits into from
Aug 24, 2022
Merged

Voting strategy indexing #287

merged 8 commits into from
Aug 24, 2022

Conversation

Orland0x
Copy link
Contributor

@Orland0x Orland0x commented Aug 17, 2022

Instead of indexing by voting strategy address, we now index by a unique number instead. The benefit of this is that it allows a space to register multiple instances of the same strategy (but with different parameters)

closes #163

@Orland0x Orland0x marked this pull request as ready for review August 18, 2022 14:04
@Orland0x Orland0x requested a review from pscott August 19, 2022 11:27
@Orland0x Orland0x marked this pull request as draft August 19, 2022 11:28
@Orland0x Orland0x marked this pull request as ready for review August 24, 2022 10:08
Copy link
Contributor

@pscott pscott left a comment

Choose a reason for hiding this comment

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

Minor improvement maybe we could add in ControllerActions.test.ts but other that that it looks good!

@@ -149,7 +149,7 @@ describe('Controller Actions', () => {
user.address,
utils.intsSequence.IntsSequence.LEFromString(''),
vanillaExecutionStrategy.address,
[vanillaVotingStrategy.address],
['0x2'],
Copy link
Contributor

Choose a reason for hiding this comment

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

looking at those 0x0, 0x1, 0x2, it might be a good idea to declare a variable latestIndex and increment it and use it when need be? Might make working with this code easier in the future

Copy link
Contributor Author

Choose a reason for hiding this comment

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

feels like a lot of effort right now lol, will defo do that for the starknet.js scripts

@Orland0x Orland0x merged commit b40575b into develop Aug 24, 2022
@Orland0x Orland0x deleted the voting_strategy_indexing branch September 5, 2022 14:17
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.

Handling multiple instances of the same strategy but with different parameters
2 participants