chore: export abi related types (#1677)

* chore: export abi related types

* feat: expose function
This commit is contained in:
Matthias Seitz 2022-09-08 18:07:38 +02:00 committed by GitHub
parent 0e7f46b03d
commit 513ed588ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -3,7 +3,7 @@ mod common;
mod errors;
mod events;
mod methods;
mod structs;
pub(crate) mod structs;
mod types;
use super::{util, Abigen};

View File

@ -373,6 +373,11 @@ impl InternalStructs {
pub fn rust_type_names(&self) -> &HashMap<String, String> {
&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

View File

@ -13,9 +13,12 @@ mod test_macros;
/// Contains types to generate rust bindings for solidity contracts
pub mod contract;
pub use contract::structs::InternalStructs;
use contract::Context;
pub mod rawabi;
pub use rawabi::RawAbi;
mod rustfmt;
mod source;
mod util;

View File

@ -49,7 +49,7 @@ pub mod builders {
#[cfg(any(test, feature = "abigen"))]
#[cfg_attr(docsrs, doc(cfg(feature = "abigen")))]
pub use ethers_contract_abigen::{
Abigen, ContractFilter, ExcludeContracts, MultiAbigen, SelectContracts,
Abigen, ContractFilter, ExcludeContracts, InternalStructs, MultiAbigen, RawAbi, SelectContracts,
};
#[cfg(any(test, feature = "abigen"))]