
251 S.W.3d 55 (2008)
MEDICAL CITY DALLAS, LTD., Petitioner,
v.
CARLISLE CORPORATION d/b/a Carlisle Syntec Systems, Respondent.
No. 06-0660.
Supreme Court of Texas.
Argued October 17, 2007.
Decided April 11, 2008.
*57 Robert B. Gilbreath, Hawkins, Parnell & Thackston, LLP, Dallas, Melissa M. Davis, Brandy M. Wingate, Attorney At Law, Vernon Childs Howerton, Jr., Jenkens & Gilchrist, Houston, TX, for Petitioner.
Michael L. Knapek, William David Ellerman, Jackson Walker, L.L.P., Dallas, TX, for Respondent.
Chief Justice JEFFERSON delivered the opinion of the Court.
Texas law permits recovery of attorney's fees for a claim based on an oral or written contract. See TEX. CIV. PRAC. & REM.CODE § 38.001(8). We must determine whether an action for breach of express warranty is such a claim. Because we conclude that it is, we reverse in part the court of appeals' judgment.

I

Facts and Procedural History
In 1991, Medical City Dallas contracted with Charley Company of Texas to re-roof one of completed, Carlisle issued express warranties to Medical City, one of which a Twenty Year Membrane Material Warrantypromised that the roof membrane would not deteriorate prematurely. Each express warranty identified Medical City as the building's owner.
Within months of the installation, Medical City encountered a leak in the building's roof and Charley Co. repaired it. By 1995, leaks became more frequent, and Charley Co. made more repairs. By 1999, the leaks were "continuous," and complaints from Medical City's tenants prompted a meeting in October 2000 with representatives from Charley Co., Medical City, and Carlisle. In November 2000, Medical City retained LRW Consultants, Inc. to evaluate the roof. LRW found "[o]pen lap seams," "pinholes," "material defects in the roof membrane," and "premature aging of the material." LRW concluded that the roof was "in extremely poor condition" and recommended that Medical City contact the manufacturer to discuss warranty issues. After failed attempts to resolve the dispute, Medical City sued Charley Co. and Carlisle, alleging breach of the express warranties, breach of implied warranties, and negligence. It sought direct costs incurred in replacing the roof in October 2002, attorney's fees, and costs. The trial court granted Carlisle summary judgment on the negligence claim.
A jury returned a verdict in favor of Medical City, finding that Carlisle breached its Twenty Year Membrane Warranty, and awarded Medical City $110,449.59 in damages and $121,277.04 in attorney's fees.[1] Carlisle moved for judgment notwithstanding the verdict, but the trial court denied the motion and signed a judgment for Medical City. Carlisle appealed.
*58 On the attorney's fees issue, the court of appeals held that Texas Civil Practice and Remedies Code section 38.001(8), which allows fees for claims based on oral or written contracts, did not encompass breach of warranty claims. 196 S.W.3d 855, 868-72. It noted that Medical City did not plead or try a breach of contract cause of action and did not recover on that theory. Id. at 870. As a result, the court of appeals rendered a take-nothing judgment for Carlisle on the attorney's fees claim and affirmed Medical City's judgment in all other respects. Id. at 872. Medical City petitioned this court for review on the sole issue of attorney's fees. We granted the petition to decide whether a party who prevails in a breach of express warranty action is entitled to attorney's fees. 50 Tex. Sup.Ct. J. 712 (May 4, 2007).

II

Discussion
A party who prevails in a lawsuit is entitled to recover attorney's fees only if permitted by statute or by contract. Tony Gullo Motors I, L.P. v. Chapa, 212 S.W.3d 299, 310 (Tex.2006). Here, while there was no separate contract between Medical City and Carlisle, Carlisle issued Medical City several express warranties. Medical City contends that an express warranty is like a contract, and that attorney's fees are therefore authorized by section 38.001 of the Civil Practice and Remedies Code. We must determine if a claim based on an express warranty is, in essence, a contract action. Because we conclude that it is, Medical City was entitled to attorney's fees when it prevailed.

A

Historical Background
Nearly 100 years ago, the Texas Legislature created a statutory right to attorney's fees for judgments in select claims. See Act of March 13, 1909, 31st Leg., R.S., ch. 47, § 1, 1909 Tex. Gen. Laws 93, 94 (creating a right to a "reasonable amount" of attorney's fees, limited to twenty dollars, for persons obtaining judgment for the full amount of their claim in actions for "personal services rendered or for labor done, or for material furnished, or for overcharges on freight or express, or for any claim for lost or damaged freight, or for stock killed or injured"). Over time, the statute has been modified to expand the types of claims eligible for an award of fees. It was amended in 1923 to allow fees for loss of or damage to express shipments. See Act of March 26, 1923, 38th Leg., R.S., ch. 144, § 1, 1923 Tex. Gen. Laws 312, 312. In 1949, it was amended to allow attorney's fees upon a judgment "for any amount" recovered. See Act of June 29, 1949, 51st Leg., R.S., ch. 494, § 1, 1949 Tex. Gen. Laws 915, 915. Four years later, the Legislature extended article 2226 to "suits founded upon a sworn account or account." See Act of April 21, 1953, 53d Leg., R.S., ch. 67, § 1, 1953 Tex. Gen. Laws 101, 101. As the statute evolved, so did Texas jurisprudence.
In 1958, we held that a contract for the drilling of an oil well was not an action on a sworn account and thus disallowed attorney's fees under article 2226. Meaders v. Biskamp, 159 Tex. 79, 316 S.W.2d 75, 78 (1958). A 1973 court of appeals decision declared that attorney's fees were generally unavailable in contract actions at that time. M.C. Winters, Inc. v. Cope, 498 S.W.2d 484, 491 (Tex.Civ.App.-Texarkana 1973, no pet.). And we strictly construed those claims allowing fees. See, e.g., Tenneco Oil Co. v. Padre Drilling Co., 453 S.W.2d 814, 820-21 (Tex.1970) (interpreting article 2226's "labor done" and "personal services" provisions); Van Zandt v. Fort Worth Press, 359 S.W.2d 893, 896 *59 (Tex.1962) (construing "personal services" rendered under article 2226).
The modern era began in 1977, when the Legislature added "suits founded on oral or written contracts" to the claims for which recovery of attorney's fees was authorized. See Act of April 25, 1977, 65th Leg., R.S., ch. 76, § 1, 1977 Tex. Gen. Laws 153, 153-54. This modification brought the statute in line with the Legislature's decision, four years earlier, to make fees recoverable by consumers who successfully pursued similar actions under Texas' Deceptive Trade Practices Act ("DTPA"). See Act of May 21, 1973, 63d Leg., R.S., ch. 143, § 1, sec. 17.50, 1973 Tex. Gen. Laws 322, 326-27 (creating the remedy of attorney's fees for the first time for consumers prevailing in an action on an "express or implied warranty") (current version at TEX. BUS. & COM.CODE § 17.50(d) ("Each consumer who prevails shall be awarded court costs and reasonable and necessary attorney's fees.")). Two years after authorizing attorney's fees for suits founded on contract, the Legislature instructed courts to construe the statute liberally "to promote its underlying purposes." See Act of June 6, 1979, 66th Leg., R.S., ch. 314, § 1, 1979 Tex. Gen. Laws 718, 718.
Finally and most recently, the statute was recodified in a "topic-by-topic revision of the state's general and permanent statute law without substantive change." See Act of 1985, 69th Leg., R.S., ch. 959, § 1, secs. 1.001, 38.001, 38.005, 1985 Tex. Gen. Laws 3242, 3244, 3278, 3279 (current version at TEX. CIV. PRAC. & REM.CODE §§ 1.001, 38.001, and 38.005).[2] Thus, section 38.001 now provides:
A person may recover reasonable attorney's fees from an individual or corporation, in addition to the amount of a valid claim and costs, if the claim is for:
(1) rendered services;
(2) performed labor;
(3) furnished material;
(4) freight or express overcharges;
(5) lost or damaged freight or express;
(6) killed or injured stock;
(7) a sworn account; or
(8) an oral or written contract.
TEX. CIV. PRAC. & REM.CODE § 38.001.

B

Breach of Express Warranty Actions
The Uniform Commercial Code (UCC) governs Medical City's express warranty claim.[3]See TEX. BUS. & COM.CODE § 2.313. However, the UCC sections and comments dealing with remedies for breach of warranty, adopted verbatim in Texas, are silent on the issue of attorney's fees. See, e.g., TEX. BUS. & COM.CODE §§ 2.714-.715 and cmt. (providing for consequential damages to a buyer in a breach of warranty action but failing to indicate in the comment whether attorney's fees are *60 considered either consequential or incidental damages). At least one court has held that attorney's fees may be recovered under the UCC as consequential damages. See Kelynack v. Yamaha Motor Corp., 152 Mich.App. 105, 394 N.W.2d 17, 21 (1986) (allowing attorney's fees as consequential damages). But see Webco Indus., Inc. v. Thermatool Corp., 278 F.3d 1120, 1132 (10th Cir.2002) (rejecting Kelynack in part by concluding that the Michigan Supreme Court would not agree with awarding attorney's fees as an element of consequential damages). Leading commentators conclude, however, that attorney's fees are "generally not recoverable as consequential damages" on the theory that if the UCC intended to authorize recovery of attorney's fees, it would have done so expressly. See, e.g., 24 RICHARD A. LORD, WILLISTON ON CONTRACTS § 66.67 (4th ed.2001). Although attorney's fees may not qualify as UCC consequential damages, fees may nonetheless be recoverable if authorized by another statute. Thus, as one commentator has noted, if a state has a "special statute[ ] that allows recovery of attorney fees in an action based upon a contract relating to the sale of goods [i]t would be appropriate for a court to award attorney fees to a winning warranty plaintiff under such a statute." BARKLEY CLARK & CHRISTOPHER SMITH, THE LAW OF PRODUCT WARRANTIES ¶ 7.07[3][e] (1984) (noting that an Oklahoma statute providing for the recovery of attorney's fees in transactions involving a sale of goods applied to UCC Article 2 transactions).
Section 38.001 of the Civil Practice and Remedies Code is such a statute, and because Texas' UCC provisions and the parties' warranties are silent on the issue, section 38.001 provides the only basis for an award of attorney's fees here. We thus examine the nature of the claim to determine whether an express warranty claim is a suit based on an oral or written contract.
Carlisle correctly asserts that breach of warranty and breach of contract are distinct causes of action with separate remedies. See, e.g., TEX. BUS. & COM.CODE §§ 2.711, 2.714 (providing remedies for breach of contract and breach of warranty respectively).[4] We held as much in Southwestern Bell Telephone Co. v. FDP Corp., 811 S.W.2d 572, 576 (Tex.1991), when we stated that "[t]he UCC recognizes that breach of contract and breach of warranty are not the same cause of action." But while an express warranty is a distinct claim, it is nonetheless a part of the basis of a bargain and is contractual in nature. See TEX. BUS. & COM.CODE § 2.313(a) ("Any affirmation of fact or promise made by the seller to the buyer which relates to the goods and becomes part of the basis of the bargain creates an express warranty that the goods shall conform to the affirmation or promise."); see also 3 LARY LAWRENCE, ANDERSON ON THE UNIFORM COMMERCIAL CODE § 2-313:34 (3d ed.2002) (noting that "express warranties are part of the basis of contracting"). An express warranty is the result of a negotiated exchange, see, e.g., U.S. Pipe & Foundry Co. v. City of Waco, 130 Tex. 126, 108 S.W.2d 432, 434 (1937), and is a "creature of contract," 18 *61 WILLISTON ON CONTRACTS § 52:45. Accord Cipollone v. Liggett Group, Inc. 505 U.S. 504, 524 n. 23, 112 S.Ct. 2608, 120 L.Ed.2d 407 (1992) (plurality opinion) (noting that "express warranty claims are said to sound in contract rather than in tort" and comparing legal definitions of tort and contract).[5] When we ascertain the parties' intentions in a warranty, we look to well-established rules for interpretation and construction of contracts. See Rodriguez v. W.O.W. Life Ins. Soc., 136 Tex. 43, 145 S.W.2d 1077, 1080 (1941). And a breach of express warranty claim, like one for breach of contract, involves a party seeking damages based on an opponent's failure to uphold its end of the bargain. See City of Waco, 108 S.W.2d at 434 (holding a manufacturer liable to the City, despite the absence of a contract between them, because a manufacturer securing the benefit of a sale to a third party and inducing purchase through representations as to its fitness and quality should not then be able to avoid the burdens of the transaction).
Moreover, the damages recoverable here support our conclusion that the claim is based in contract. Under the economic loss rule, the nature of the injury helps determine which duty or duties are breached and, ultimately, which damages are appropriate: "When the injury is only the economic loss to the subject of a contract itself, the action sounds in contract." Am. Nat. Petroleum Co. v. Transcon. Gas Pipe Line Corp., 798 S.W.2d 274, 282 (Tex. 1990) (quoting Jim Walter Homes, Inc. v. Reed, 711 S.W.2d 617, 618 (Tex.1986)). Here, Carlisle itself invoked the economic loss doctrine when it successfully moved for summary judgment on Medical City's negligence claim. Carlisle's motion asserted: "[t]he Warranty is a contract which limits Carlisle's obligations regarding the Roof, and limits Plaintiff's remedies or means of recovery." Medical City's damages were economic injuries based on the defective roof, further demonstrating that its recovery is contract-based. Recognizing that breach of an express warranty is founded on contract thus comports with a party's expectations under the economic loss rule. See Mid Continent Aircraft Corp. v. Curry County Spraying Serv., *62 Inc., 572 S.W.2d 308, 313 (Tex. 1978) (noting that "parties may rely on sales and contract law for compensation of economic loss to the product itself.").
It is not surprising, then, that we have previously suggested that attorney's fees are recoverable when an express warranty is breached. See PPG Indus., Inc. v. JMB/Houston Ctrs. Partners L.P., 146 S.W.3d 79, 92 (Tex.2004). In PPG, we held that a jury's answers to two express warranty questions would support recovery of actual damages and attorney's fees despite the fact that the warranty claims did not fall under the DTPA. Id. Here, the court of appeals focused on our statement in PPG that "attorney's fees . . . were recoverable in contract and warranty long before the DTPA was passed," id. at 89, but concluded that, because PPG involved "the assignability of DTPA claims, . . . [the] statement regarding attorney's fees [was] dictum," 196 S.W.3d at 871.[6] We disagree. Although we held that one warranty claim was barred by limitations, we remanded the second for trial and noted that "the jury's answers to two warranty questions would support JMB's recovery of actual damages and attorney's fees." PPG, 146 S.W.3d at 92.
The only cases to hold that breach of express warranty is not founded on contract for the purposes of an award of attorney's fees are unpersuasive. See JHC Ventures, L.P. v. Fast Trucking, Inc., 94 S.W.3d 762, 769 (Tex.App.-San Antonio 2002, no pet.) (holding that section 38.001(8) does not encompass breach of warranty claims); Harris Packaging Corp. v. Baker Concrete Const. Co., 982 S.W.2d 62, 69 (Tex.App.-Houston [1 Dist.] 1998, pet. denied) (same). In Harris Packaging, the court held that the DTPA's allowance of attorney's fees for express warranty claims demonstrated the Legislature's intent to disallow attorney's fees for an express warranty claim under 38.001. Harris Packaging, 982 S.W.2d at 69. The court reasoned that the DTPA provision would be meaningless if attorney's fees were recoverable without it. Id. But when the DTPA was enacted in 1973, attorney's fees, while recoverable for certain types of contract claims, were not yet broadly authorized for any actions founded on written or oral contracts. Moreover, the DTPA authorized attorney's fees for a broad range of claims, not just warranty actions, characterized as deceptive practices. See TEX. BUS. & COM.CODE §§ 17.50(a),(d). Thus, the inclusion of attorney's fees for warranty claims in the DTPA says nothing about the Legislature's intent to include or exclude express warranties under the 1977 amendment to article 2226. Similarly, both JHC Ventures and the court of appeals below merely noted that the UCC provides distinct remedies for breach of contract and breach of warranty and follow Harris Packaging. 196 S.W.3d at 869; JHC Ventures, 94 S.W.3d at 769. But as noted above, the remedies for these distinct actions can at times be identical. To the extent these cases are inconsistent with our holding today, they are disapproved.


*63 IV

Conclusion
Because Texas Civil Practice and Remedies Code section 38.001(8) permits an award of attorney's fees for a suit based on a written or oral contract, and because we conclude that breach of an express warranty is such a claim, the court of appeals erred in reversing Medical City's attorney's fees award in connection with its successful claim for breach of an express warranty. Accordingly, we reverse in part the court of appeals' judgment and reinstate the trial court's judgment. See TEX. R.APP. P. 60.2(c).
Justice HECHT did not participate in the decision.
NOTES
[1]  The jury awarded Medical City attorney's fees for preparation and trial of Medical City's breach of warranty claims but did not award any amount for attorney's fees on appeal.
[2]  According to section 1.001(b), the purpose of the statutory revision was:

to make the law encompassed by this code more accessible and understandable, by:
(1) rearranging the statutes into a more logical order;
(2) employing a format and numbering system designed to facilitate citation of the law and to accommodate future expansion of the law;
(3) eliminating repealed, duplicative, unconstitutional, expired, executed, and other ineffective provisions; and
(4) restating the law in modern American English to the greatest extent possible.
TEX. CIV. PRAC. & REM.CODE § 1.001.
[3]  Because the transaction here involved a sale of goods, the Uniform Commercial Code ("UCC"), as adopted in Texas' Business and Commerce Code, applies. See TEX. BUS. & COM.CODE §§ 2.101-.725.
[4]  But see also Jones v. George, 61 Tex. 345, 350 (Tex. 1884) (noting that the remedy for a breach of contract and breach of warranty will be the same in some circumstances: "While the rights of parties who buy under an express or implied warranty as to quality of thing sold, and of those persons who contract for one thing and another is delivered to them, in reference to remedy in some respects may differ, yet, when rescission has become impracticable, when the thing delivered has been consumed in testing it, it would seem, whether the action be on a warranty or breach of contract, the relief would be the same.").
[5]  See also Ex parte Miller, 693 So.2d 1372, 1376 (Ala.1997) (holding that "[e]xpress warranties should be treated like any other type of contract and interpreted according to general contract principles."); Fairbanks N. Star Borough v. Kandik Constr., Inc. and Assocs., 823 P.2d 632, 633 (Alaska 1991) (holding that breach of warranty sounds in contract); Chaurasia v. Gen. Motors Corp., 212 Ariz. 18, 126 P.3d 165, 174 (App.2006) (noting that express warranties "arise out of contract" for the purposes of Arizona's statute awarding attorney's fees for actions arising out of contract); Atlanta Tallow Co. v. John W. Eshelman & Sons, Inc., 110 Ga.App. 737, 140 S.E.2d 118, 127 (1964) (holding that "[a]n express warranty is a contract"); Lewis v. CEDU Ed. Servs., Inc., 135 Idaho 139, 15 P.3d 1147, 1153 (2000) (holding breach of express warranty sounds in contract); Collins Co., Ltd. v. Carboline Co., 125 Ill.2d 498, 127 Ill. Dec. 5, 532 N.E.2d 834, 838 (1988) (finding an action for breach of warranty to be "ex contractu"); Anthony's Pier Four, Inc. v. Crandall Dry Dock Eng'rs, Inc., 396 Mass. 818, 489 N.E.2d 172, 175 (1986) (noting that an express warranty claim "is an action of contract"); Collins v. Li, 176 Md.App. 502, 933 A.2d 528, 578 (2007) (holding that an express warranty sounds in contract); Camino Real Mobile Home Park P'ship v. Wolfe, 119 N.M. 436, 891 P.2d 1190, 1196 (1995) (same); CBS, Inc. v. Ziff-Davis Publ'g Co., 75 N.Y.2d 496, 554 N.Y.S.2d 449, 553 N.E.2d 997, 1001 (1990) (same); Jorritsma v. Farmers' Feed & Supply Co., Inc., 272 Or. 499, 538 P.2d 61, 65 (1975) (holding that "[a]n express warranty is . . . part of the contract of sale"); Red Wing Mfg. Co. v. Moe, 62 Wis. 240, 22 N.W. 414, 415 (1885) (holding express warranty is a contract); but see Garcia v. Tex. Instruments, Inc., 610 S.W.2d 456, 463 (Tex. 1980) (acknowledging previous statements by this Court that "an implied warranty arising from sales sounds in tort and not in contract.").
[6]  Attorney's fees were not generally available for contract and warranty actions before the DTPA. Still, attorney's fees were authorized for those contracts covering the types of claims listed in the attorney's fees statute since 1909-claims for personal services rendered, labor done, material furnished, lost or damaged freight, or stock killed or injured. See Tenneco Oil Co., 453 S.W.2d at 820; G.R.A.V.I.T.Y. Enters., Inc. v. Reece Supply Co., 177 S.W.3d 537, 547 n. 3 (Tex.App.-Dallas 2005, no pet.); W.G. Tufts and Son v. Herider Farms, Inc., 485 S.W.2d 300, 303 (Tex.Civ.App.-Tyler 1972, writ ref'd n.r.e.) (suggesting that attorney's fees could be awarded for breach of an express warranty on a claim for "stock killed or injured," if timely presented).
