# 스마트 컨트랙트 문제 해결

이 섹션에서는 Substrate 기반 블록체인에서 스마트 컨트랙트를 작성하고 배포할 때 발생할 수 있는 일반적인 문제와 해결 방법에 대해 설명합니다.

### 예기치 않은 epoch 변경

터미널을 닫거나 컴퓨터가 슬립 모드로 전환되는 등 노드를 제대로 중지하지 않고 실행 중인 노드를 중단하면 다음과 같은 오류가 발생할 수 있습니다:

```bash
ClientImport("Unexpected epoch change")
```

이 오류가 발생하면 다음 명령을 사용하여 노드를 재시작하세요:

```bash
 substrate-contracts-node --log info,runtime::contracts=debug 2>&1
```

이 명령은 실행 중인 노드 상태를 모두 지웁니다. 노드를 재시작한 후에는 노드가 종료되기 전에 수행한 단계를 다시 수행하세요. 예를 들어, 이전에 업로드한 계약을 다시 배포하세요.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.infrablockchain.net/infrablockchain-docs/ko/infrablockchain/learn/substrate/tutorials/smart-contracts/troubleshoot-smart-contracts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
