In any action brought to enforce a lien prescribed by this chapter, the party for whom judgment is rendered is entitled to recover a reasonable attorney's fee, to be fixed by the court, which must be taxed as costs in the action. No costs may be taxed against the owner when the owner has paid into court, at least ten days before trial, the maximum amount of the owner's liability as limited under section 35-24-07.
N.D.C.C. § 35-24-19