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: proposition power proposal validation strategy #496

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

pscott
Copy link
Contributor

@pscott pscott commented Aug 16, 2023

Adds the starknet version of proposition power proposal validation strategy

replaces #476

Closes #494
Closes #473

@pscott
Copy link
Contributor Author

pscott commented Aug 16, 2023

btw we need to track https://github.com/software-mansion/scarb/discussions/568#discussioncomment-6742412 this way we can remove the erc20_votes.cairo file in the mocks folder


#[external(v0)]
impl ProposingPowerProposalValidationStrategy of IProposalValidationStrategy<ContractState> {
fn validate(
Copy link
Contributor

Choose a reason for hiding this comment

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

probably makes sense to follow the same approach as sx-evm where we have the internal _validate function defined in utils then the strategy can call decode and call whichever ones it wants.

Copy link
Contributor Author

Choose a reason for hiding this comment

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


let allowed_strategies = array![vanilla_strategy.clone()];
let proposal_threshold = 1_u256;
let mut params: Array<felt252> = array![];
Copy link
Contributor

Choose a reason for hiding this comment

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

cant infer the type here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@pscott pscott requested a review from Orland0x August 17, 2023 20:48
Copy link
Contributor

@Orland0x Orland0x left a comment

Choose a reason for hiding this comment

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

uTACK

@pscott pscott merged commit f98e008 into develop Aug 21, 2023
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.

Use != instead of == Whitelist proposal validation strategy
2 participants