The attorney shall be an attorney at law who shall have practices in the State of North Carolina for at least five years. He shall be the chief legal advisor of and attorney for the town and all departments and officers thereof in matters relating to their official powers and duties.