Performance by a subcontractor in accordance with the provisions of its contract shall entitle it to payment from the party with whom it contracts. Payment by the owner to a contractor is not a condition precedent for payment to a subcontractor and payment by a contractor to a subcontractor is not a condition precedent for payment to any other subcontractor, and an agreement to the contrary is unenforceable.
N.C. Gen. Stat. § 22C-2