You can use something like this for esp on and off to turn the red squares (of where the enemy is) on and off.
bind i { esp.active toggle; esp_onoff }
But for the actual wall hack, you can do the same but last I tried, it was buggy on a toggle. It basically wouldn't turn back off. You turn on/off wallhack like this (if the code isn't still bugged):
bind z { vis.wallhack toggle; wall_onoff }