The Tax Foundation of Hawaii filed a class-action lawsuit Wednesday challenging the state’s practice of siphoning 10 percent of the money collected from the excise tax surcharge for the city’s rail project and depositing it into the state’s general treasury.