I'm going to take a guess and suggest that you wired the starter solenoid incorrectly, so that one of the big wires was connected to the battery positive terminal, and the other to the battery negative terminal. With the starter button pressed, this would put a dead short across the battery terminals, which would explain the battery meltdown.