1#![warn(missing_docs)]
4
5extern crate rustc_hex as hex;
6extern crate serde;
7extern crate serde_json;
8extern crate tiny_keccak;
9
10#[macro_use]
11extern crate serde_derive;
12
13#[macro_use]
14extern crate error_chain;
15
16#[cfg(test)]
17#[macro_use]
18extern crate hex_literal;
19
20extern crate s_types;
21
22pub mod param_type;
23pub mod token;
24mod constructor;
25mod contract;
26mod decoder;
27mod encoder;
28mod errors;
29mod event;
30mod event_param;
31mod filter;
32mod function;
33mod log;
34mod operation;
35mod param;
36mod signature;
37mod util;
38
39pub use param_type::ParamType;
40pub use constructor::Constructor;
41pub use contract::{Contract, Functions, Events};
42pub use token::Token;
43pub use errors::{Error, ErrorKind, Result, ResultExt};
44pub use encoder::encode;
45pub use decoder::decode;
46pub use filter::{Topic, TopicFilter, RawTopicFilter};
47pub use function::Function;
48pub use param::Param;
49pub use log::{Log, RawLog, LogParam, ParseLog, LogFilter};
50pub use event::Event;
51pub use event_param::EventParam;
52
53pub type Address = s_types::Address;
55
56pub type FixedBytes = Vec<u8>;
58
59pub type Bytes = Vec<u8>;
61
62pub type Int = s_types::U256;
64
65pub type Uint = s_types::U256;
67
68pub type Hash = s_types::H256;
70
71pub trait FunctionOutputDecoder {
73 type Output;
75
76 fn decode(&self, &[u8]) -> Result<Self::Output>;
78}