1#![cfg_attr(not(feature = "std"), no_std)]
12#![allow(clippy::module_inception)]
13#![warn(missing_docs)]
14
15#[cfg_attr(not(feature = "std"), macro_use)]
16extern crate alloc;
17#[cfg(not(feature = "std"))]
18mod no_std_prelude {
19 pub use alloc::{
20 borrow::{Cow, ToOwned},
21 boxed::Box,
22 string::{self, String, ToString},
23 vec::Vec,
24 };
25}
26#[cfg(feature = "std")]
27mod no_std_prelude {
28 pub use std::borrow::Cow;
29}
30#[cfg(not(feature = "std"))]
31use no_std_prelude::*;
32
33mod constructor;
34mod contract;
35mod decoder;
36mod encoder;
37mod error;
38mod errors;
39mod event;
40mod event_param;
41mod filter;
42mod function;
43mod log;
44#[cfg(feature = "serde")]
45pub mod operation;
46mod param;
47pub mod param_type;
48mod signature;
49mod state_mutability;
50pub mod token;
51#[cfg(feature = "serde")]
52mod tuple_param;
53mod util;
54
55#[cfg(test)]
56mod tests;
57
58pub use ethereum_types;
59
60#[cfg(feature = "serde")]
61pub use crate::tuple_param::TupleParam;
62pub use crate::{
63 constructor::Constructor,
64 contract::{Contract, Events, Functions},
65 decoder::{decode, decode_validate},
66 encoder::encode,
67 error::Error as AbiError,
68 errors::{Error, Result},
69 event::Event,
70 event_param::EventParam,
71 filter::{RawTopicFilter, Topic, TopicFilter},
72 function::Function,
73 log::{Log, LogFilter, LogParam, ParseLog, RawLog},
74 param::Param,
75 param_type::ParamType,
76 signature::{long_signature, short_signature},
77 state_mutability::StateMutability,
78 token::Token,
79};
80
81pub type Word = [u8; 32];
83
84pub type Address = ethereum_types::Address;
86
87pub type FixedBytes = Vec<u8>;
89
90pub type Bytes = Vec<u8>;
92
93pub type Int = ethereum_types::U256;
95
96pub type Uint = ethereum_types::U256;
98
99pub type Hash = ethereum_types::H256;
101
102pub trait FunctionOutputDecoder {
104 type Output;
106
107 fn decode(&self, _: &[u8]) -> Result<Self::Output>;
109}