Skip to content

Commit

Permalink
docs(sol-macro): document visibility and state mutability (#846)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Jan 4, 2025
1 parent 4a8a53a commit 148b1a9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions crates/sol-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ use syn::parse_macro_input;
/// [sol-types]: https://docs.soliditylang.org/en/latest/types.html
/// [ast]: https://docs.rs/syn-solidity/latest/syn_solidity
///
/// ### Visibility
///
/// Visibility modifiers (`private`, `internal`, `public`, `external`) are supported in all items
/// that Solidity supports them in. However, they are only taken into consideration when deciding
/// whether to generate a getter for a state variable or not. They are ignored in all other places.
///
/// ### State mutability
///
/// State mutability modifiers (`pure`, `view`, `payable`, `nonpayable`) are parsed, but ignored for
/// the purposes of this macro.
///
/// ### Attributes
///
/// Inner attributes (`#![...]`) are parsed at the top of the input, just like a
Expand Down

0 comments on commit 148b1a9

Please sign in to comment.