Guiding LLM-based Smart Contract Generation with Finite State Machine