apollo_l1_gas_price,apollo_l1_gas_price_config: move exchange_rate_decimals const to config#13881
Conversation
PR SummaryLow Risk Overview
Reviewed by Cursor Bugbot for commit adab40d. 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
906347d to
88cb588
Compare
2a7878e to
38bafeb
Compare
88cb588 to
e00cfff
Compare
38bafeb to
8e2ea16
Compare
e00cfff to
76a3b5b
Compare
14d696c to
9747f33
Compare
44769b8 to
429514c
Compare
9747f33 to
2c92f9a
Compare
429514c to
bbf45a2
Compare
87143d3 to
7895fa9
Compare
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 04875da. Configure here.
matanl-starkware
left a comment
There was a problem hiding this comment.
@matanl-starkware reviewed 6 files and all commit messages, and made 2 comments.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on ob1337, ShahakShama, and sirandreww-starkware).
crates/apollo_integration_tests/src/utils.rs line 573 at r1 (raw file):
Previously, ShahakShama wrote…
If the decimals are already part of the response, why do we need them as config?
+1
crates/apollo_l1_gas_price_config/src/config.rs line 31 at r1 (raw file):
Previously, ShahakShama wrote…
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
Why do we need it as a parameter of the struct at all?
Take whatever value the response contains and use it for conversion.
…cimals const to config


No description provided.