Construction of molecular logic gates using heavy metal ions as inputs based on catalytic hairpin assembly and CRISPR-Cas12a.