pub struct ArcRpcClient { /* private fields */ }Expand description
Arc read-only JSON-RPC namespace.
Arc native USDC balances are returned in 18-decimal base units. The official ERC-20 view uses 6 decimals over the same underlying balance. This namespace returns both wire values unchanged and does not expose a token, wrapper, or native-sentinel registry.
Arc Mainnet’s documented chain ID is 5042 (0x13b2). A configured
endpoint’s response is passed through unchanged, so a testnet response
such as 0x4cef52 is never relabeled as Mainnet.
The intentionally narrow surface has compile-fail coverage for forbidden escape hatches and state-changing operations:
ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.arc.rpc;
let _ = rpc.raw::<String>("eth_chainId", None);ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.arc.rpc;
let _ = rpc.request::<String>("eth_chainId", Vec::<serde_json::Value>::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.arc.rpc;
let _ = rpc.batch(Vec::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.arc.rpc;
let _ = rpc.subscribe("newHeads", Vec::new());ⓘ
let rpc = ErpcClient::new(ErpcClientConfig::new("key"))?.arc.rpc;
let _ = rpc.eth_send_raw_transaction(["0xdeadbeef"]);Implementations§
Source§impl ArcRpcClient
impl ArcRpcClient
Sourcepub fn eth_chain_id(&self) -> PendingRpcRequest<String>
pub fn eth_chain_id(&self) -> PendingRpcRequest<String>
Sourcepub fn eth_get_balance<P: Serialize>(
&self,
params: P,
) -> Result<PendingRpcRequest<String>>
pub fn eth_get_balance<P: Serialize>( &self, params: P, ) -> Result<PendingRpcRequest<String>>
Creates a pending positional eth_getBalance read.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for ArcRpcClient
impl !UnwindSafe for ArcRpcClient
impl Freeze for ArcRpcClient
impl Send for ArcRpcClient
impl Sync for ArcRpcClient
impl Unpin for ArcRpcClient
impl UnsafeUnpin for ArcRpcClient
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more