zksync_node_api_server 0.1.0

ZKsync API server
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use zksync_types::U256;
use zksync_web3_decl::{jsonrpsee::core::RpcResult, namespaces::NetNamespaceServer};

use crate::web3::NetNamespace;

impl NetNamespaceServer for NetNamespace {
    fn version(&self) -> RpcResult<String> {
        Ok(self.version_impl())
    }

    fn peer_count(&self) -> RpcResult<U256> {
        Ok(self.peer_count_impl())
    }

    fn is_listening(&self) -> RpcResult<bool> {
        Ok(self.is_listening_impl())
    }
}