1#[cfg(feature = "curl")]
4pub mod curl;
5#[cfg(feature = "http")]
6pub mod http;
7pub mod jsonrpc;
8#[macro_use]
9pub mod method;
10mod bloom;
11mod debug;
12mod serialization;
13pub mod types;
14
15use self::types::*;
16
17module! {
18 pub mod web3 {
20 pub struct ClientVersion as "web3_clientVersion"
22 Empty => String;
23 }
24}
25
26module! {
27 pub mod eth {
32 pub struct BlockNumber as "eth_blockNumber"
34 Empty => U256;
35
36 pub struct Call as "eth_call"
38 (TransactionCall, BlockId) => Vec<u8> [serialization::bytes];
39
40 pub struct GetBlockByHash as "eth_getBlockByHash"
42 (Digest, Hydrated) => Option<Block>;
43
44 pub struct GetBlockByNumber as "eth_getBlockByNumber"
46 (BlockSpec, Hydrated) => Option<Block>;
47
48 pub struct GetBlockTransactionCountByHash as "eth_getBlockTransactionCountByHash"
50 (Digest,) => Option<U256>;
51
52 pub struct GetBlockTransactionCountByNumber as "eth_getBlockTransactionCountByNumber"
54 (BlockSpec,) => Option<U256>;
55
56 pub struct GetCode as "eth_getCode"
58 (Address, BlockId) => Vec<u8> [serialization::bytes];
59
60 pub struct GetLogs as "eth_getLogs"
62 (LogFilter,) => Vec<Log>;
63
64 pub struct GetTransactionByBlockHashAndIndex as "eth_getTransactionByBlockHashAndIndex"
66 (Digest, U256) => Option<SignedTransaction>;
67
68 pub struct GetTransactionByBlockNumberAndIndex as "eth_getTransactionByBlockNumberAndIndex"
70 (BlockSpec, U256) => Option<SignedTransaction>;
71
72 pub struct GetTransactionByHash as "eth_getTransactionByHash"
74 (Digest,) => Option<SignedTransaction>;
75 }
76}
77
78pub mod ext {
80 use crate::{serialization, types::*};
81
82 module! {
83 pub mod eth {
85 pub struct Call as "eth_call"
88 (TransactionCall, BlockId, StateOverrides) => Vec<u8> [serialization::bytes];
89 }
90 }
91}