In consideration of the salary stipulated to be paid to any officer named in § 8-22-118, such official shall do and perform all official services, acts, and duties as are imposed upon the officer by law, including all official acts, services, or duties, ex officio or otherwise, and the salary stipulated is expressly declared a full compensation to the officer for the performance thereof. Such official services, acts, and duties ex officio or otherwise, are declared public duties pertaining to the office, and to be performed by the officer for and in behalf of the state, as its agent and officer. All funds, fees, costs, emoluments, allowances, perquisites, and commissions pertaining to or arising from the performance of such official acts, services, and duties, shall be by the officer received, accepted, and accounted for as the agent and officer of the state, for and in behalf of the state, and as its property; and the performance of such shall be by the officer for and in behalf of the state, as the agent and officer thereof, in consideration of the allowance to the officer of the stipulated salary. It is expressly made a part of the duties of each of the aforementioned officers to demand, receive, and collect all fees, costs, emoluments, allowances, commissions, or perquisites that pertain to or are appendant to the office from whatever source, ex officio or otherwise, accruing, and pay the same over to the treasurer, as provided in § 8-22-118.