pub struct ContractMetadata {Show 19 fields
pub name: String,
pub is_abstract: bool,
pub is_library: bool,
pub methods: Vec<FunctionMetadata>,
pub events: Vec<EventMetadata>,
pub uses_storage: bool,
pub state_variables: Vec<StateVariableMetadata>,
pub structs: Vec<StructMetadata>,
pub enums: Vec<EnumMetadata>,
pub contract_types: Vec<String>,
pub selector_registry: Arc<SelectorRegistry>,
pub documentation: NatspecDoc,
pub has_using_for_star: bool,
pub has_using_function_list: bool,
pub using_for_libraries: Vec<String>,
pub has_type_definitions: bool,
pub type_aliases: HashMap<String, String>,
pub flatten_warnings: Vec<String>,
pub super_method_map: HashMap<String, String>,
}Fields§
§name: String§is_abstract: boolWhether this contract was declared abstract.
is_library: boolWhether this contract was declared as a library.
methods: Vec<FunctionMetadata>§events: Vec<EventMetadata>§uses_storage: bool§state_variables: Vec<StateVariableMetadata>§structs: Vec<StructMetadata>§enums: Vec<EnumMetadata>§contract_types: Vec<String>All contract/interface type names visible to this compilation unit.
This is used during IR lowering to recognize Solidity-style contract casts
like IERC20(token).transfer(...) without accidentally treating unknown
function calls as casts.
selector_registry: Arc<SelectorRegistry>Registry of known function selectors for contract/interface types visible to this
compilation unit (shared across contracts via Arc).
documentation: NatspecDocNatspec documentation for the contract
has_using_for_star: boolWhether this contract contains using X for * directives.
has_using_function_list: boolWhether this contract contains using { f, g } for Y directives.
using_for_libraries: Vec<String>Library names referenced by using X for Y directives.
has_type_definitions: boolWhether this contract contains type X is Y definitions.
type_aliases: HashMap<String, String>User-defined value type aliases (type X is Y).
Maps type name to underlying Solidity type string.
flatten_warnings: Vec<String>Warnings collected during inheritance flattening (e.g. virtual/override checks).
super_method_map: HashMap<String, String>Mapping from original method name to the renamed super-method name.
Populated during inheritance flattening so super.method() can resolve.
Trait Implementations§
Source§impl Clone for ContractMetadata
impl Clone for ContractMetadata
Source§fn clone(&self) -> ContractMetadata
fn clone(&self) -> ContractMetadata
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreAuto Trait Implementations§
impl Freeze for ContractMetadata
impl RefUnwindSafe for ContractMetadata
impl Send for ContractMetadata
impl Sync for ContractMetadata
impl Unpin for ContractMetadata
impl UnwindSafe for ContractMetadata
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more