chore: export abi related types (#1677)
* chore: export abi related types * feat: expose function
This commit is contained in:
parent
0e7f46b03d
commit
513ed588ca
|
@ -3,7 +3,7 @@ mod common;
|
||||||
mod errors;
|
mod errors;
|
||||||
mod events;
|
mod events;
|
||||||
mod methods;
|
mod methods;
|
||||||
mod structs;
|
pub(crate) mod structs;
|
||||||
mod types;
|
mod types;
|
||||||
|
|
||||||
use super::{util, Abigen};
|
use super::{util, Abigen};
|
||||||
|
|
|
@ -373,6 +373,11 @@ impl InternalStructs {
|
||||||
pub fn rust_type_names(&self) -> &HashMap<String, String> {
|
pub fn rust_type_names(&self) -> &HashMap<String, String> {
|
||||||
&self.rust_type_names
|
&self.rust_type_names
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// Returns all the solidity struct types
|
||||||
|
pub fn structs_types(&self) -> &HashMap<String, SolStruct> {
|
||||||
|
&self.structs
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// This will determine the name of the rust type and will make sure that possible collisions are
|
/// This will determine the name of the rust type and will make sure that possible collisions are
|
||||||
|
|
|
@ -13,9 +13,12 @@ mod test_macros;
|
||||||
|
|
||||||
/// Contains types to generate rust bindings for solidity contracts
|
/// Contains types to generate rust bindings for solidity contracts
|
||||||
pub mod contract;
|
pub mod contract;
|
||||||
|
pub use contract::structs::InternalStructs;
|
||||||
use contract::Context;
|
use contract::Context;
|
||||||
|
|
||||||
pub mod rawabi;
|
pub mod rawabi;
|
||||||
|
pub use rawabi::RawAbi;
|
||||||
|
|
||||||
mod rustfmt;
|
mod rustfmt;
|
||||||
mod source;
|
mod source;
|
||||||
mod util;
|
mod util;
|
||||||
|
|
|
@ -49,7 +49,7 @@ pub mod builders {
|
||||||
#[cfg(any(test, feature = "abigen"))]
|
#[cfg(any(test, feature = "abigen"))]
|
||||||
#[cfg_attr(docsrs, doc(cfg(feature = "abigen")))]
|
#[cfg_attr(docsrs, doc(cfg(feature = "abigen")))]
|
||||||
pub use ethers_contract_abigen::{
|
pub use ethers_contract_abigen::{
|
||||||
Abigen, ContractFilter, ExcludeContracts, MultiAbigen, SelectContracts,
|
Abigen, ContractFilter, ExcludeContracts, InternalStructs, MultiAbigen, RawAbi, SelectContracts,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(any(test, feature = "abigen"))]
|
#[cfg(any(test, feature = "abigen"))]
|
||||||
|
|
Loading…
Reference in New Issue