neo-devpack-solidity 0.22.0

Production-focused Solidity-to-NeoVM compilation system
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
fn build_method_name_counts(metadata: &ContractMetadata) -> std::collections::HashMap<String, usize> {
    use std::collections::HashMap;

    // Track method names to detect conflicts with public state variable getters.
    let mut method_name_counts: HashMap<String, usize> = HashMap::new();
    for function in &metadata.methods {
        if matches!(function.kind, FunctionKind::Constructor) {
            continue;
        }
        *method_name_counts.entry(function.name.clone()).or_insert(0) += 1;
    }

    method_name_counts
}