multiversx_sdk_http/gateway_http_proxy/
http_network.rs

1use anyhow::Result;
2use multiversx_sdk::{
3    data::{network_config::NetworkConfig, network_economics::NetworkEconomics},
4    gateway::{NetworkConfigRequest, NetworkEconimicsRequest},
5};
6
7use super::GatewayHttpProxy;
8
9impl GatewayHttpProxy {
10    // get_network_config retrieves the network configuration from the proxy
11    pub async fn get_network_config(&self) -> Result<NetworkConfig> {
12        self.http_request(NetworkConfigRequest).await
13    }
14
15    // get_network_economics retrieves the network economics from the proxy
16    pub async fn get_network_economics(&self) -> Result<NetworkEconomics> {
17        self.http_request(NetworkEconimicsRequest).await
18    }
19}