Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'implement-feature/tier/add-tier-att-to-rns-record' into…
Browse files Browse the repository at this point in the history
… implement-feature/script/add-v0.3.4-rns-unified-migration-script
TuDo1403 committed Feb 21, 2024

Verified

This commit was signed with the committer’s verified signature.
freya022 freya02
2 parents cf13794 + bc623c2 commit 2b934a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/RNSDomainPrice.sol
Original file line number Diff line number Diff line change
@@ -284,8 +284,11 @@ contract RNSDomainPrice is Initializable, AccessControlEnumerable, INSDomainPric

if (overriddenTier != 0) return ~overriddenTier;

uint256 renewalFeeByLength = _rnFee[Math.min(label.strlen(), _rnfMaxLength)];
uint256 tierValue = renewalFeeByLength * 365 days + _getDomainPrice(lbHash) * 365 days / 2;
uint256 overriddenRenewalFee = _rnFeeOverriding[lbHash];
uint256 yearlyRenewalFeeByLength = overriddenRenewalFee != 0
? 365 days * ~overriddenRenewalFee
: 365 days * _rnFee[Math.min(label.strlen(), _rnfMaxLength)];
uint256 tierValue = yearlyRenewalFeeByLength + _getDomainPrice(lbHash) / 2;

if (tierValue > TIER_1_THRESHOLD) {
return uint256(Tier.Tier1);

0 comments on commit 2b934a1

Please sign in to comment.