From b33f4a679d9cea0e9cc46c6615048e4cbcd8e5ad Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Wed, 1 May 2024 15:48:30 +0100 Subject: [PATCH 1/2] fix: 1 letter domain name --- src/pricing.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pricing.cairo b/src/pricing.cairo index 33a2932..9e80e93 100644 --- a/src/pricing.cairo +++ b/src/pricing.cairo @@ -44,7 +44,7 @@ mod Pricing { impl InternalImpl of InternalTrait { fn get_price_per_day(self: @ContractState, domain_len: usize) -> u128 { if domain_len == 1 { - return 534246575342466; + return 801369863013699; } if domain_len == 2 { From 3074adcd7292b75a4e8f2b08265d67fc7ec58499 Mon Sep 17 00:00:00 2001 From: Thomas Marchand Date: Wed, 1 May 2024 15:52:42 +0100 Subject: [PATCH 2/2] test: update tests to new pricing --- src/tests/test_pricing.cairo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/tests/test_pricing.cairo b/src/tests/test_pricing.cairo index 3df6b56..d82662d 100644 --- a/src/tests/test_pricing.cairo +++ b/src/tests/test_pricing.cairo @@ -24,7 +24,7 @@ fn test_buy_price() { // Test with "b" / 1 letter and one year let (erc20, price) = pricing.compute_buy_price(1, 365); assert(erc20.into() == 0x123, 'wrong erc20 address'); - assert(price == 195000000000000090, 'incorrect price'); + assert(price == 292500000000000135, 'incorrect price'); // Test with "be" / 2 letters and one year let (_erc20, price) = pricing.compute_buy_price(2, 365);