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

ref: clear blacklist #73

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/naming/main.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ mod Naming {
_server_pub_key: felt252,
_whitelisted_renewal_contracts: LegacyMap<ContractAddress, bool>,
// a for alpha, as we will probably do this campaign again in the future
_ar_discount_blacklist_b: LegacyMap<felt252, bool>,
_ar_discount_blacklist_c: LegacyMap<felt252, bool>,
_ar_discount_renew_enabled: bool,
#[substorage(v0)]
storage_read: storage_read_component::Storage,
Expand Down Expand Up @@ -521,7 +521,7 @@ mod Naming {
assert(self._ar_discount_renew_enabled.read(), 'Discount disabled');

// We check that domain didn't already claim the discount
assert(!self._ar_discount_blacklist_b.read(domain), 'You can\'t claim this twice');
assert(!self._ar_discount_blacklist_c.read(domain), 'You can\'t claim this twice');

// We check it's a valid AR contract, then we check that AR is enabled,
// we don't validate the pricing because it could change
Expand All @@ -536,7 +536,7 @@ mod Naming {
assert(erc20_allowance != 0, 'Invalid ERC20 allowance');

// We then blacklist that domain for this discount
self._ar_discount_blacklist_b.write(domain, true);
self._ar_discount_blacklist_c.write(domain, true);

// We can finally renew the domain with no SaleMetadata event since it's free
let now = get_block_timestamp();
Expand Down