pub struct CPCWeb3 {
pub web3: Web3<CPCHttp>,
}Fields§
§web3: Web3<CPCHttp>Implementations§
Source§impl CPCWeb3
impl CPCWeb3
pub fn new(url: &str) -> Result<Self, Error>
pub async fn block_number(&self) -> Result<u64, Error>
pub async fn block( &self, number: Option<u32>, ) -> Result<Option<Block<H256>>, Error>
pub async fn block_with_txs( &self, number: Option<u32>, ) -> Result<Option<Block<Transaction>>, Error>
pub async fn balance(&self, address: &Address) -> Result<U256, Error>
pub async fn sign_transaction( &self, account: &Account, tx: &TransactionParameters, ) -> Result<SignedTransaction, Error>
pub async fn gas_price(&self) -> Result<U256, Error>
pub async fn transaction_count(&self, address: &Address) -> Result<U256, Error>
pub async fn submit_signed_raw_tx( &self, signed: &SignedTransaction, ) -> Result<H256, Error>
pub async fn wait_tx( &self, tx_hash: &H256, ) -> Result<TransactionReceipt, Box<dyn Error>>
pub async fn estimate_gas( &self, req: &TransactionParameters, ) -> Result<U256, Error>
pub async fn transaction_receipt( &self, tx_hash: &H256, ) -> Result<Option<TransactionReceipt>, Error>
pub async fn is_contract(&self, addr: H160) -> Result<bool, Error>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for CPCWeb3
impl !RefUnwindSafe for CPCWeb3
impl Send for CPCWeb3
impl Sync for CPCWeb3
impl Unpin for CPCWeb3
impl !UnwindSafe for CPCWeb3
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more