The appellants presented to the court a complaint containing two causes of action; they alleged that they were stockholders in the defendant corporation, and that they brought the suit for the benefit of themselves, as stockholders, and all other stockholders of the company. The first cause of action seeks the appointment of a receiver; the second cause of action alleges that the defendant corporation has a capitalization of 2,500,000 shares of stock, of the par value of one dollar per share; that the corporation entered into certain dealings with the defendants, Tjosevig, which resulted in the corporation purchasing from them a number of quartz miniug claims in Alaska, and paying for the property by issuing to the Tjosevigs 2,499,995 shares of the capital stock, and that the Tjosevigs accepted the stock and in exchange therefor deeded to the corporation the mining claims, and that ever since such date the corporation has been, and now is, the owner thereof; that thereafter, the Tjosevigs entered into a contract with the corporation by which the corporation was given the right to sell any portion of the stock held by the Tjosevigs, except 135,000 shares, at different prices, with the agreement that all receipts by the corporation above such prices should belong to the corporation.
It further alleged that the agreement between the Tjosevigs and the corporation was that in case of the sale of a part of the stock of the former, and a failure to make the balance of the payments to the Tjosevigs, the corporation would forfeit its right to sell the bal*225anee of the stock, and that the Tjosevigs would then remain the owners of whatever number of shares of stock might remain unsold. It is then alleged that the corporation sold 500,000 shares of stock, and that the defendant trustees of the corporation wrongfully purchased from the Tjosevigs all the remaining shares of stock and paid Tjosevigs $141,000 in cash therefor from funds in the treasury of the corporation. Further, that these acts were contrary to § 3697, Rem. Code, which provides that it shall be unlawful for trustees to in any way pay to stockholders of a corporation any part of the capital stock of the company, or reduce the capital except in the manner provided; also, that the acts were in violation of § 3704, Rem. Code, which provides that the capital stock of a corporation may be lawfully increased or diminished only in certain specified ways. The complaint then alleges that the appellants have demanded that the defendant trustees take steps to secure the return of the money paid to the Tjosevigs for the purchase of their stock to the treasury of the company, but that this request has been denied, and that appellants are therefore prosecuting this action for. the benefit of themselves and all other stockholders of the company. The prayer of the complaint is that the trustees of the company be held personally liable for the''sum paid to the Tjosevigs.
The defendant corporation demurred to each cause of action on the ground that it did not state facts sufficient to constitute a cause of action; likewise the defendant trustees and the Tjosevigs demurred. The court sustained the demurrer of the corporation and the trustees to the second cause of action, and sustained the Tjosevigs’ demurrer to the entire complaint. From this disposition of the demurrers the appellants bring the record here.
*226Attached to and made a part of the complaint are various exhibits, comprising the agreements between the Tjosevigs and the defendant corporation in relation to the purchase of the mining claipis and the organization of the company. An- examination of 'these exhibits refutes the legal effect of them plead by the appellants. The rule is that where a cause of action is plead as being founded upon certain contracts which are set out, the pleadings must give way to contrary provisions of the contract. Lawson v. Sprague, 51 Wash. 286, 98 Pac. 737; Clark v. Cross, 51 Wash. 231, 98 Pac. 607; Jordan v. Coulter, 30 Wash. 116, 70 Pac. 257. From the contracts it appears that the Tjosevigs were the owners of mining claims in Alaska and that a mining promoter, who had an option for the purchase of the mines, interested the defendants named as trustees in the subsequently organized corporation in their purchase. It also appears that these men organized a corporation and followed the procedure allowed by Pern. Code, § 2347, and that they purchased the Tjosevigs’ claims by agreeing to pay for them $175,000 in money and 135,000 shares of the capital stock. In order that the company might be allowed to sell the stock to raise the money necessary to pay the cash portion of the purchase price, and at the same time protect the Tjosevigs, it was agreed that the Tjosevigs would make a deed to the property under a contract providing that the entire capital stock of the company, less the five shares necessary to qualify the trustees, should be held in pledge by a bank, and that this stock should be released in certain blocks and sold, and that out of the proceeds of such sale certain fixed sums should be paid to the Tjosevigs to be applied on the purchase price. The contracts then provide that, in the event of failure of the corporation to meet the purchase price, the company should forfeit all of its rights to have the shares *227of stock in the hands of the trustees yet unsold returned to it, hut that the unsold stock should become the property of the Tjosevigs.
Although this is not the ordinary method of acquiring mining claims by a corporation organized for the purpose of purchasing claims owned by someone else, it was a perfectly lawful and businesslike arrangement. It offered protection to the purchaser and seller alike. What the appellants complain of is the performance of this contract by the corporation. The claims were sold in consideration of the money and stock to be delivered. All that has been done is that the company has procured the money from the sale of the stock, which it had a perfect right to do, and has paid all of the purchase price to the Tjosevigs and has delivered the stock to them and taken title to the property. We cannot see how this is in any way a diminution of the capital stock or of assets of the company. Nothing was taken out of the assets by the trustees to pay for the stock; no stock has been issued which has not been paid for, and the case does not fall within the decision in Kom v. Cody Detective Agency, 76 Wash. 540, 136 Pac. 1155, which was a case involving the right of a corporation to purchase and retire its own stock with capital funds. Here each share of stock, sold or unsold, is represented by money or assets of the company; if unsold, by the stock itself; if sold, by money or other assets. All that has been done is to pledge the capital stock to pay the purchase price of these claims.
Nor can the appellants find solace in the argument that the Tjosevigs became the owners of the entire capital stock when it was pledged with them to secure the performance of the contract. They were mere pledgees and not stockholders. Burgess v. Seligman, 107 U. S. 20.
*228We find nothing in the complaint as read in the light of the contracts themselves which was sufficient to withstand the demurrers, and the judgement is therefore affirmed.
Parker, C. J., Bridges, Fullerton, and Holcomb, JJ., concur.