Section 4. (a) No state employee shall otherwise than as provided by law for the proper discharge of official duties, directly or indirectly receive or request compensation from anyone other than the commonwealth or a state agency, in relation to any particular matter in which the commonwealth or a state agency is a party or has a direct and substantial interest. (b) No person shall knowingly, oth