apollo_l1_gas_price,apollo_l1_gas_price_config: move exchange_rate_decimals const to config#13881
Conversation
PR SummaryMedium Risk Overview Updates generated config schema ( Reviewed by Cursor Bugbot for commit 88cb588. Bugbot is set up for automated code reviews on this repo. Configure here. |
ShahakShama
left a comment
There was a problem hiding this comment.
@ShahakShama reviewed 4 files and all commit messages, and made 3 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on ob1337 and sirandreww-starkware).
a discussion (no related file):
I'll make sure with @ob1337 that this is indeed needed
crates/apollo_integration_tests/src/utils.rs line 573 at r1 (raw file):
// tests. let price = format!("0x{DEFAULT_ETH_TO_FRI_RATE:x}"); let response = json!({ "timestamp": query.timestamp ,"price": price, "decimals": 18 });
If the decimals are already part of the response, why do we need them as config?
crates/apollo_l1_gas_price_config/src/config.rs line 31 at r1 (raw file):
pub max_cache_size: usize, pub query_timeout_sec: u64, pub exchange_rate_decimals: u64,
I prefer this won't be a config and will instead be a separate parameter in the ctor. Then, when you initialize eth to strk you'll use 10^18 constant and when you use strk to usd you'll use a different constant
af7a9a3 to
4c28248
Compare
8148825 to
6768f3a
Compare
f2218f7 to
102b640
Compare
2d7839e to
045b217
Compare
102b640 to
a212b4d
Compare
95db906 to
e5738d6
Compare
a212b4d to
29bdf7a
Compare
e5738d6 to
bf81ef7
Compare
29bdf7a to
6afda0a
Compare
bf81ef7 to
cc0fccb
Compare
48944e0 to
cafe0b9
Compare
cc0fccb to
085c1f6
Compare
c4353ed to
e6ed317
Compare
2a30b4a to
8d0d084
Compare
cbc60f5 to
cccdd35
Compare
cccdd35 to
906347d
Compare
…cimals const to config
906347d to
88cb588
Compare
2a7878e to
38bafeb
Compare

No description provided.