1mod gen;
2pub use gen::*;
3
4mod pretty;
5pub use pretty::*;
6
7mod token_stream;
8pub use token_stream::*;
9
10mod error;
11pub use error::*;
12
13pub type BindingBuilder = ethbind_gen::BindingBuilder<
14 ethbind_gen::Executor<RustGenerator, ethbind_gen::JsonRuntimeBinder>,
15>;
16
17pub use ethbind_gen::*;
18pub use ethbind_json::*;
19
20#[cfg(test)]
21mod tests {
22 use super::*;
23
24 #[test]
25 fn test_gen() {
26 _ = pretty_env_logger::try_init();
27
28 let runtime_binder: JsonRuntimeBinder = include_str!("../macros/tests/mapping.json")
29 .parse()
30 .expect("Parse mapping");
31
32 let mut contracts = BindingBuilder::new((RustGenerator::default(), runtime_binder))
33 .bind_hardhat(include_str!("../macros/tests/abi.json"))
34 .finalize()
35 .expect("Generate data");
36
37 contracts.pretty().expect("Pretty");
38
39 }
41}