Section 3. (a) Whoever knowingly, otherwise than as provided by law for the proper discharge of official duty, directly or indirectly, gives, offers or promises anything of substantial value to any present or former state, county or municipal employee or to any member of the judiciary, or to any person selected to be such an employee or member of the judiciary: (i) for or because of any official act performed or to be performed by such an employee or member of the judiciary or person selected to be such an employee or member of the judiciary; or (ii) to influence, or attempt to influence, an official action of the state, county or municipal employee or to any member of the judiciary; or
(b) Whoever knowingly, being a present or former state, county or municipal employee or member of the judiciary, or person selected to be such an employee or member of the judiciary, otherwise than as provided by law for the proper discharge of official duty, directly or indirectly, asks, demands, exacts, solicits, seeks, accepts, receives or agrees to receive anything of substantial value: (i) for himself for or because of any official act or act within his official responsibility performed or to be performed by him; or (ii) to influence, or attempt to influence, him in an official act taken; or
(c) Whoever knowingly, directly or indirectly, gives, offers or promises anything of substantial value to any person, for or because of testimony under oath or affirmation given or to be given by such person or any other person as a witness upon a trial, hearing or other proceeding, before any court, any committee of either house or both houses of the general court, or any agency, commission or officer authorized by the laws of the commonwealth to hear evidence or take testimony or for or because of his absence therefrom; or
(d) Whoever knowingly, directly or indirectly, asks, demands, exacts, solicits, seeks, accepts, receives or agrees to receive anything of substantial value for himself for or because of the testimony under oath or affirmation given or to be given by him or any other person as a witness upon any such trial, hearing or other proceeding, or for or because of his absence therefrom; shall be punished by a fine of not more than $50,000, or by imprisonment in the state prison for not more than 5 years, or in a jail or house of correction for not more than 2 1/2 years, or both.
(e) Clauses (c) and (d) shall not prohibit the payment or receipt of witness fees provided by law or the payment by the party upon whose behalf a witness is called and receipt by a witness of the reasonable cost of travel and subsistence incurred and the reasonable value of time lost in attendance at any such trial, hearing or proceeding, or, in the case of expert witnesses, involving a technical or professional opinion, a reasonable fee for time spent in the preparation of such opinion, in appearing or testifying.
(f) The state ethics commission shall adopt regulations: (i) defining ''substantial value,''; provided, however, that ''substantial value'' shall not be less than $50; (ii) establishing exclusions for ceremonial gifts; (iii) establishing exclusions for gifts given solely because of family or friendship; and (iv) establishing additional exclusions for other situations that do not present a genuine risk of a conflict or the appearance of a conflict of interest.