If any sheriff is held liable to pay any damages by reason of the wrongful execution of any writ of attachment issued under sections 641.2 through 641.4 and if a judgment is rendered for those damages, the amount of the judgment, when paid by such sheriff, shall become a claim against the state in the sheriff’s favor, and a warrant for that amount shall be drawn by the director of the department of administrative services upon proper proof.