File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
whitelist-immutable-flex/src Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ const CONTRACT_NAME: &str = "crates.io:sg-whitelist-flex";
26
26
const CONTRACT_VERSION : & str = env ! ( "CARGO_PKG_VERSION" ) ;
27
27
28
28
// contract governance params
29
- pub const MAX_MEMBERS : u32 = 5000 ;
29
+ pub const MAX_MEMBERS : u32 = 25_000 ;
30
30
pub const PRICE_PER_1000_MEMBERS : u128 = 100_000_000 ;
31
31
pub const MIN_MINT_PRICE : u128 = 0 ;
32
32
@@ -233,11 +233,10 @@ pub fn execute_add_members(
233
233
} ) ;
234
234
}
235
235
let addr = deps. api . addr_validate ( & add. address ) ?;
236
- if WHITELIST . has ( deps. storage , addr. clone ( ) ) {
237
- return Err ( ContractError :: DuplicateMember ( addr. to_string ( ) ) ) ;
236
+ if !WHITELIST . has ( deps. storage , addr. clone ( ) ) {
237
+ WHITELIST . save ( deps. storage , addr, & add. mint_count ) ?;
238
+ config. num_members += 1 ;
238
239
}
239
- WHITELIST . save ( deps. storage , addr, & add. mint_count ) ?;
240
- config. num_members += 1 ;
241
240
}
242
241
243
242
CONFIG . save ( deps. storage , & config) ?;
Original file line number Diff line number Diff line change @@ -42,7 +42,8 @@ pub fn instantiate(
42
42
fn update_whitelist ( deps : & mut DepsMut , msg : InstantiateMsg ) -> Result < u64 , ContractError > {
43
43
let mut count = 0u64 ;
44
44
for member in msg. members . into_iter ( ) {
45
- WHITELIST . save ( deps. storage , & member. address , & member. mint_count ) ?;
45
+ let address_lower = member. address . clone ( ) . to_ascii_lowercase ( ) ;
46
+ WHITELIST . save ( deps. storage , & address_lower, & member. mint_count ) ?;
46
47
count += 1 ;
47
48
}
48
49
Ok ( count)
You can’t perform that action at this time.
0 commit comments