1, 2: Enter the cave.
3-9: Clear the lower passage from the sticks to the wooden wall.
10: Break no. 10 from below and move immediately to the area around no. 11 to avoid getting trapped on the wrong side of the waterfall. This will create a water trough from the water button next to the spindly tree to no. 11; it will also activate the water button for the lower room (button 1 opens gate B).
11: Break no. 11 from below. Move immediately to the area around no. 12 to avoid getting trapped on the wrong side of the waterfall. This will activate the water button for the upper room (button 2 opens gate A).
12, 13: Get the silver key.
14: Break the wooden wall holding the red boulder to block the water flow and removing the waterfall that keeps you from going to the left side of the cave via the lower passage.
15, 16: Get the gold key. If you can, run away from the Evil Eye.
17: The red boulder is now next to the upper water button. Destroy it to let the water reach the lower water button again. Now you have opened the door to the upper room again.
18, 19. Open the treasure chest!
You can continue clearing the cave to 100% with a sponge, busting the water spring. Take care to clear all the blocks in the room behind gate A, since water button 2 will deactivate when you break the water spring.
Note: Buttons 3 and 4 destroy the L-shaped group of 3 stone blocks at 10 and 11, respectively.