From f2cfe2956abc9610f28fa95142d93c7965eda342 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Wed, 15 Feb 2023 21:19:24 -0800 Subject: [PATCH] the macro is easier --- web3_proxy/src/app/mod.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/web3_proxy/src/app/mod.rs b/web3_proxy/src/app/mod.rs index 351dabf4..06531264 100644 --- a/web3_proxy/src/app/mod.rs +++ b/web3_proxy/src/app/mod.rs @@ -1175,7 +1175,7 @@ impl Web3ProxyApp { } } } - "eth_chainId" => serde_json::Value::Number(U64::from(self.config.chain_id)), + "eth_chainId" => json!(U64::from(self.config.chain_id)), // TODO: eth_callBundle (https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint#eth_callbundle) // TODO: eth_cancelPrivateTransaction (https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint#eth_cancelprivatetransaction, but maybe just reject) // TODO: eth_sendPrivateTransaction (https://docs.flashbots.net/flashbots-auction/searchers/advanced/rpc-endpoint#eth_sendprivatetransaction) @@ -1225,7 +1225,7 @@ impl Web3ProxyApp { // TODO: eth_gasPrice that does awesome magic to predict the future "eth_hashrate" => { // no stats on this. its cheap - serde_json::Value::Number(U64::zero()) + json!(U64::zero()) } "eth_mining" => { // no stats on this. its cheap @@ -1391,7 +1391,7 @@ impl Web3ProxyApp { "net_peerCount" => { // no stats on this. its cheap // TODO: do something with proxy_mode here? - serde_json::Value::Number(U64::from(self.balanced_rpcs.num_synced_rpcs())) + json!(U64::from(self.balanced_rpcs.num_synced_rpcs())) } "web3_clientVersion" => { // no stats on this. its cheap