Any agreement for erecting walls which parties may make who own adjoining lots and desire to build party walls, shall be binding, whether in writing or not; and in case of the failure of either party to comply with his contract, the other may have an action for damages.