Skip to content

Commit

Permalink
feat: merkle whitelist (#469)
Browse files Browse the repository at this point in the history
* feat: merkle whitelist

* fix: uncomment code in tests.cairo

* refactor: move merkle utils to its own mod

* feat: add lying_address_power test

* feat: comments on test_merkle_whitelist

* feat: comments in merkle_whitelist

* fix: update tests to UserAddress

* feat: use both Ethereum address and Starknet address for members in test

* chore: comments in merkle.cairo

* refactor: move legacy hash impls to its own file

* refactor: declare LEAF_SIZE as a const
  • Loading branch information
pscott authored Aug 11, 2023
1 parent 60212fd commit 9beecd7
Show file tree
Hide file tree
Showing 13 changed files with 623 additions and 32 deletions.
2 changes: 1 addition & 1 deletion starknet/src/authenticators/eth_sig.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mod EthSigAuthenticator {
use clone::Clone;
use sx::space::space::{ISpaceDispatcher, ISpaceDispatcherTrait};
use sx::types::{Strategy, IndexedStrategy, Choice, UserAddress};
use sx::utils::{signatures, LegacyHashEthAddress};
use sx::utils::{signatures, legacy_hash::LegacyHashEthAddress};

#[storage]
struct Storage {
Expand Down
1 change: 1 addition & 0 deletions starknet/src/space/space.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ mod Space {
NoUpdateStrategy, NoUpdateArray
};
use sx::utils::bits::BitSetter;
use sx::utils::legacy_hash::LegacyHashChoice;
use sx::external::ownable::Ownable;

#[storage]
Expand Down
3 changes: 2 additions & 1 deletion starknet/src/tests.cairo
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
mod test_space;
mod test_merkle_whitelist;
mod test_factory;
mod test_space;
mod test_upgrade;

mod mocks;
Expand Down
Loading

0 comments on commit 9beecd7

Please sign in to comment.