Skip to content

[Feature] Document impact of Solidity item visibility #254

Closed
@DaniPopes

Description

Component

sol! macro

Describe the feature you would like

Currently this is ignored, except for state variables:

fn visit_items(items: &mut Vec<Item>) {
// add a getter function for each public variable
let mut functions = Vec::new();
for (i, item) in items.iter().enumerate() {
match item {
Item::Variable(var) => {
if matches!(
var.attributes.visibility(),
Some(ast::Visibility::Public(_) | ast::Visibility::External(_))
) {
functions.push((i + 1, ItemFunction::from_variable_definition(var)));
}
}
_ => {}
}
}

Additional context

  • Should we ignore it always?
  • Should we also take it into account for functions and other items?
    cc @prestwich

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or requestinvalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions