Solhint

Solhint

Community Analyzer

Contract has some count states declarations but allowed no more than maxstates SOLHINT-W1006

Anti-pattern
Minor

Contract has some count states declarations but allowed no more than maxstates.

Bad Practice

  1. High number of states
    pragma solidity 0.4.4;
    
    
    contract A {
              uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
    }
    

Recommended

  1. Low number of states
    pragma solidity 0.4.4;
    
    
    contract A {
              uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private a;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
      uint private constant TEST = 1;
    }
    

Learn more

max-states-count on Solhint's documentation.