No action shall be maintained against a fire district upon or arising out of a contract entered into by the fire district, unless the same shall be commenced within eighteen months after the cause of action thereof shall have accrued, nor unless a written verified claim shall have been filed with the fire district secretary within six months after the cause of action shall have accrued, but no such action shall be brought upon any such claim until forty days have elapsed after the filing of the claim in the office of the fire district secretary.
N.Y. Town Law § 180