diff --git a/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs b/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs index 8129eac4..9d9e7170 100644 --- a/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs +++ b/web3_proxy/src/bin/web3_proxy_cli/rpc_accounting.rs @@ -123,6 +123,10 @@ impl RpcAccountingSubCommand { condition = condition.add(rpc_accounting::Column::PeriodDatetime.lte(end_timestamp)) } + if let Some(chain_id) = self.chain_id { + condition = condition.add(rpc_accounting::Column::ChainId.eq(chain_id)) + } + q = q.filter(condition); // TODO: make this work without into_json. i think we need to make a struct