-
Notifications
You must be signed in to change notification settings - Fork 71
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: whitelist proposal validation #476
Conversation
hard to see the actual diff cuz of changing paths. I just need to review |
let mut user_params = ArrayTrait::<felt252>::new(); | ||
let fake_leaf = Leaf { | ||
address: UserAddress::Starknet(contract_address_const::<0x1337>()), | ||
voting_power: leaf.voting_power + 1, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like the voting power and address are both modified
struct Storage {} | ||
|
||
#[derive(Drop, Serde)] | ||
struct Input { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could call something like StrategyParams
, which we could use in all strategies to define the deserialization of params
so its clear what this refers to.
use starknet::contract_address_const; | ||
use sx::types::UserAddress; | ||
|
||
// Checks that that the leaf at the given index is correclty accepted or rejected (given a certain `threshold`). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
correctly
let members = generate_n_members(20); | ||
let threshold = 3_u256; // Voting power required to submit a proposal | ||
|
||
let (contract, _) = deploy_syscall( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could put following 10 lines into a setup()
utility as its duplicated in every test
closed in favor of #496 |
Based on the merkle implementation of the voting strategy.
Closes #473