Skip to content

Commit 06bfc80

Browse files
committed
whitelist updates
1 parent 613978f commit 06bfc80

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

contracts/whitelists/whitelist-flex/src/contract.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const CONTRACT_NAME: &str = "crates.io:sg-whitelist-flex";
2626
const CONTRACT_VERSION: &str = env!("CARGO_PKG_VERSION");
2727

2828
// contract governance params
29-
pub const MAX_MEMBERS: u32 = 5000;
29+
pub const MAX_MEMBERS: u32 = 25_000;
3030
pub const PRICE_PER_1000_MEMBERS: u128 = 100_000_000;
3131
pub const MIN_MINT_PRICE: u128 = 0;
3232

@@ -233,11 +233,10 @@ pub fn execute_add_members(
233233
});
234234
}
235235
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;
238239
}
239-
WHITELIST.save(deps.storage, addr, &add.mint_count)?;
240-
config.num_members += 1;
241240
}
242241

243242
CONFIG.save(deps.storage, &config)?;

contracts/whitelists/whitelist-immutable-flex/src/contract.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ pub fn instantiate(
4242
fn update_whitelist(deps: &mut DepsMut, msg: InstantiateMsg) -> Result<u64, ContractError> {
4343
let mut count = 0u64;
4444
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)?;
4647
count += 1;
4748
}
4849
Ok(count)

0 commit comments

Comments
 (0)