Skip to content

Commit c6e4233

Browse files
committed
requested changes
1 parent 120b1fe commit c6e4233

File tree

4 files changed

+9
-15
lines changed

4 files changed

+9
-15
lines changed

docs/config/ganache.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,8 @@ keep_alive_interval = 1200000
6060
# This will limit the returned Campaigns to the set number
6161
max_campaigns_earning_from = 25
6262

63-
# 0.0001 (UnifiedNum) per 1 impression
63+
# 0.0000001 (UnifiedNum) per 1 impression
6464
# 10 / 10^8 = 0.0000001
65-
# 0.00010000
6665
global_min_impression_price = '10'
6766

6867
[chain."Ganache #1"]

docs/config/prod.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ keep_alive_interval = 1200000
3939
# This will limit the returned Campaigns to the set number
4040
max_campaigns_earning_from = 25
4141

42-
# 0.01 (UnifiedNum) per 1000 impressions
42+
# 0.00001 (UnifiedNum) per 1 impression
4343
# 1_000 / 10^8 = 0.00001
4444
global_min_impression_price = '1000'
4545

sentry/src/routes/campaign.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,10 +1008,10 @@ pub mod insert_events {
10081008

10091009
// Payout: 0.00003 (min pricing bound per 1 event)
10101010
// Leader fee: 0.03
1011-
// Leader payout: 0.00003 * 0.03 = 0.00 000 090 = UnifiedNum(90_000)
1011+
// Leader payout: 0.00003 * 0.03 = 0.00 000 090 = UnifiedNum(90)
10121012
//
10131013
// Follower fee: 0.02
1014-
// Follower payout: 0.00003 * 0.02 = 0.00 000 060 = UnifiedNum(60_000)
1014+
// Follower payout: 0.00003 * 0.02 = 0.00 000 060 = UnifiedNum(60)
10151015
//
10161016
// campaign budget left - payout - leader fee - follower fee
10171017
// 1000.0 - 0.03 - 0.00 000 090 - 0.00 000 060 = 999.9699985

test_harness/src/lib.rs

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -321,27 +321,22 @@ mod tests {
321321
.expect("Should parse"),
322322
channel,
323323
creator: *ADVERTISER,
324-
// 150.00000000
325-
budget: UnifiedNum::from(15_000_000_000),
324+
budget: UnifiedNum::from_whole(150),
326325
validators,
327326
title: Some("Dummy Campaign".to_string()),
328327
pricing_bounds: vec![
329328
(
330329
IMPRESSION,
331330
Pricing {
332-
// 0.04000000
333-
min: 4_000_000.into(),
334-
// 0.05000000
335-
max: 5_000_000.into(),
331+
min: UnifiedNum::from_whole(0.04),
332+
max: UnifiedNum::from_whole(0.05),
336333
},
337334
),
338335
(
339336
CLICK,
340337
Pricing {
341-
// 0.06000000
342-
min: 6_000_000.into(),
343-
// 0.10000000
344-
max: 10_000_000.into(),
338+
min: UnifiedNum::from_whole(0.06),
339+
max: UnifiedNum::from_whole(0.1),
345340
},
346341
),
347342
]

0 commit comments

Comments
 (0)