Crate alloy_sol_macro_input

Source
Expand description

§alloy-sol-macro-input

This crate contains inputs to the sol! macro. It sits in-between the sol-macro and syn-solidity crates, and contains an intermediate representation of Solidity items. These items are then expanded into Rust code by the alloy-sol-macro crate.

This crate is not meant to be used directly, but rather is a tool for writing macros that generate Rust code from Solidity code.

Structs§

SolAttrs
#[sol(...)] attributes.
SolInput
Parsed input for sol!-like macro expanders. This struct represents a list of expandable items parsed from either solidity code snippets, or from a JSON abi.

Enums§

CasingStyle
Defines the casing for the attributes long representation.
SolInputKind
Parsed input for sol!-like macro expanders. This enum represents a Sol file, a JSON ABI, or a Solidity type.

Traits§

ContainsSolAttrs
Trait for items that contain #[sol(...)] attributes among other attributes. This is usually a shortcut for SolAttrs::parse.
SolInputExpander
Expands a SolInput into a TokenStream.

Functions§

derives_mapped
Returns an iterator over all the rust :: paths in the #[derive(...)] attributes.
docs_str
Flattens all the #[doc = "..."] attributes into a single string.
mk_doc
Wraps the argument in a doc attribute.
parse_derives
Parses the #[derive(...)] attributes into a list of paths.
tokens_for_soljson
Returns sol! tokens.