In the discretion of the local agency, any bonds issued under the provisions of this part may be secured by a trust agreement by and between the local agency and a corporate trustee or trustees, which may be any trust company or bank having the powers of a trust company within or without this state. The trust agreement or the resolution providing for the issuance of bonds may pledge or assign the revenues to be received or proceeds of any contract or contracts pledged, and may convey or mortgage any historical property, the rehabilitation of which is to be financed out of the proceeds of bonds. The trust agreement or resolution providing for the issuance of bonds may contain provisions for protecting and enforcing the rights and remedies of the bondholders which are reasonable and proper and not in violation of law, including any provisions which may be included in any resolution or resolutions of the local agency authorizing the issuance of bonds pursuant to Section 37642. Any bank or trust company doing business under the laws of this state which may act as depositary of the proceeds of bonds or of revenues or other moneys may furnish any indemnity bonds or pledge any securities which may be required by the local agency. Any trust agreement may set forth the rights and remedies of the bondholders and of the trustee or trustees, and may restrict the individual right of action by bondholders. In addition to the foregoing, any trust agreement or resolution may contain such other provisions which the local agency may deem reasonable and proper for the security of the bondholders. All expenses incurred in carrying out the provisions of the trust agreement or resolution may be treated as a part of the cost of historical rehabilitation.