California's Foreign Miners' Tax was written to bleed one group, and it worked: collected almost entirely from Chinese miners, it supplied close to a quarter of the state's revenue across two decades. In 1854 People v. Hall barred Chinese testimony against white defendants, which in practice licensed robbery, assault and murder. The episode also handles a notorious idiom whose earliest known uses post-date the Gold Rush by decades.
The idiom 'a Chinaman's chance' is not attested until 1893 and 1904, so a Gold Rush coinage is a retrospective gloss rather than documented fact. The 'quarter of state revenue' figure is well supported but approximate.