Electoral laws pass federal parliament