#![allow(
clippy::type_complexity,
clippy::wrong_self_convention,
clippy::single_match,
clippy::let_unit_value,
clippy::match_wild_err_arm
)]
#![warn(missing_docs)]
#![recursion_limit = "256"]
#![cfg_attr(not(any(feature = "std", feature = "test", test)), no_std)]
#[cfg(test)]
use jsonrpc_core as rpc;
#[macro_use]
extern crate alloc;
pub use ethabi;
#[macro_use]
pub mod helpers;
mod prelude {
pub(crate) use alloc::borrow::ToOwned as _;
pub(crate) use alloc::string::String;
pub(crate) use alloc::string::ToString as _;
pub(crate) use alloc::vec;
pub(crate) use alloc::vec::Vec;
#[cfg(not(any(feature = "std", feature = "test", test)))]
pub(crate) use core as std;
}
use prelude::*;
#[macro_use]
pub extern crate futures;
pub mod api;
pub mod confirm;
pub mod contract;
pub mod error;
pub mod keys;
pub mod signing;
pub mod transports;
pub mod types;
pub use crate::{
api::{Accounts, Eth, Web3},
error::{Error, Result},
};
pub type RequestId = usize;
type Value<'a> = &'a dyn erased_serde::Serialize;
pub trait Transport: Clone {
type Out: core::future::Future<Output = Result<Vec<u8>>>;
fn execute(&self, method: &'static str, params: Vec<Value>) -> Self::Out;
}
impl<T: Transport> Transport for &T {
type Out = T::Out;
fn execute(&self, method: &'static str, params: Vec<Value>) -> Self::Out {
(*self).execute(method, params)
}
}