Lawmakers on Wednesday passed legislation they said would regulate coal-ash pits and clean up decades of toxic waste generated by coal-burning electricity plants. The action came six months after a spill at a Duke Energy power plant near Eden coated 70 miles of the Dan River in toxic sludge and ignited debate about the safety of 32 other coal ash dumps across the state. Gov. Pat McCrory, a Republican, has not said whether he will sign the legislation, which some environmentalists and Democrats said did not go far enough. Others called it a starting point. Lawmakers say North Carolina is the first state to pass a sweeping coal ash bill. Duke can seek regulatory permission to charge consumers for cleanup costs projected as high as $10 billion. The legislation tries to solve a testy issue: allowing so-called low-risk ash dumps to be capped with plastic sheeting and dirt. Environmentalists want all the ash dug up and moved to lined landfills away from rivers and lakes. The legislation directs Duke to move low-lying dumps if there is a significant risk of groundwater contamination. Duke will get up to 15 years to remove the ash at four of its 14 coal-fired plants considered to be at the highest risk. It would then be up to a newly created commission to determine what the company would be required to do with its remaining dumps.