diff --git a/Cargo.lock b/Cargo.lock index 29ec6d9..685bac6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1,7 +1,5 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 - [[package]] name = "Inflector" version = "0.11.4" diff --git a/src/near_jsonrpc_client.rs b/src/near_jsonrpc_client.rs index 0b55adb..15133bc 100644 --- a/src/near_jsonrpc_client.rs +++ b/src/near_jsonrpc_client.rs @@ -5,6 +5,8 @@ use crate::primitives::{ ValidatorsResponse, ViewAccountResponse, }; +const NEAR_RPC_ENDPOINT_URL: &str = "https://rpc.mainnet.near.org"; + pub(crate) async fn get_locked_amount( account_id: String, block_height: u64, @@ -24,7 +26,7 @@ pub(crate) async fn get_locked_amount( let client = reqwest::Client::new(); let res = client - .post("https://rpc.mainnet.internal.near.org") + .post(NEAR_RPC_ENDPOINT_URL) .json(¶ms) .send() .await?; @@ -53,7 +55,7 @@ pub(crate) async fn get_liquid_owners_balance( let client = reqwest::Client::new(); let res = client - .post("https://rpc.mainnet.internal.near.org") + .post(NEAR_RPC_ENDPOINT_URL) .json(¶ms) .send() .await?; @@ -83,7 +85,7 @@ pub(crate) async fn get_account_in_pool( let client = reqwest::Client::new(); let res = client - .post("https://rpc.mainnet.internal.near.org") + .post(NEAR_RPC_ENDPOINT_URL) .json(¶ms) .send() .await?; @@ -113,7 +115,7 @@ pub(crate) async fn get_native_balance( let client = reqwest::Client::new(); let res = client - .post("https://rpc.mainnet.internal.near.org") + .post(NEAR_RPC_ENDPOINT_URL) .json(¶ms) .send() .await?; @@ -134,7 +136,7 @@ pub(crate) async fn get_validators() -> Result { let client = reqwest::Client::new(); let res = client - .post("https://rpc.mainnet.internal.near.org") + .post(NEAR_RPC_ENDPOINT_URL) .json(¶ms) .send() .await?; @@ -155,7 +157,7 @@ pub(crate) async fn get_block(block_height: u64) -> Result Result { let client = reqwest::Client::new(); let res = client - .post("https://rpc.mainnet.internal.near.org") + .post(NEAR_RPC_ENDPOINT_URL) .json(¶ms) .send() .await?;