From 8ffd7d2e1b903e91d30cd91ed8c74044c26ad727 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Fri, 16 Jun 2023 23:55:41 -0700 Subject: [PATCH] enable more advanced cost calculation --- web3_proxy/src/stats/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/web3_proxy/src/stats/mod.rs b/web3_proxy/src/stats/mod.rs index fcd3214b..d8e7cbdc 100644 --- a/web3_proxy/src/stats/mod.rs +++ b/web3_proxy/src/stats/mod.rs @@ -899,10 +899,8 @@ impl RpcQueryStats { } } - // for now, always return a flat cost - Decimal::from_str("0.000018").unwrap() + // TODO: finalize cost calculation - /* // TODO: get cost_minimum, cost_free_bytes, cost_per_byte, cache_hit_divisor from config. each chain will be different // pays at least $0.000018 / credits per request let cost_minimum = Decimal::new(18, 6); @@ -927,6 +925,5 @@ impl RpcQueryStats { } cost - */ } }