> For the complete documentation index, see [llms.txt](https://archive-vn.docs.klaytn.foundation/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://archive-vn.docs.klaytn.foundation/content/smart-contract/porting-ethereum-contract.md).

# Di chuyển hợp đồng Ethereum

Trong hầu hết các trường hợp, bạn có thể dùng hợp đồng Ethereum trên Klaytn mà không cần sửa đổi. Tuy nhiên, bạn cần lưu ý hai vấn đề sau.

## Hỗ trợ Solidity <a href="#solidity-support" id="solidity-support"></a>

* Mạng lưới Baobab hiện tương thích với Máy ảo Ethereum (EVM) phiên bản **London**.
* Mạng lưới Cypress hiện tương thích với Máy ảo Ethereum (EVM) phiên bản **London**.

{% hint style="success" %}
Nâng cấp giao thức v1.7.0 - thay đổi không tương thích bao gồm các mục liên quan đến hard fork **Istanbul** và các mục riêng của Klaytn. Nó đã được kích hoạt từ số khối `#75,373,312` đối với mạng lưới Baobab và `#86,816,005` đối với mạng lưới Cypress.

Nâng cấp giao thức v1.7.3 - thay đổi không tương thích bao gồm Base Fee từ lần hard fork **London**. Nó đã được kích hoạt từ số khối `#80,295,291` đối với mạng lưới Baobab và `#86,816,005` đối với mạng lưới Cypress.

Nâng cấp giao thức v1.8.0 - thay đổi không tương thích bao gồm Base Fee từ lần hard fork **London**. Nó đã được kích hoạt từ số khối `#86,513,895` đối với mạng lưới Baobab và `#86,816,005` đối với mạng lưới Cypress.
{% endhint %}

Không đảm bảo tính tương thích ngược với các phiên bản EVM khác trên Klaytn. Do đó, chúng tôi đặc biệt khuyến nghị biên dịch mã Solidity với tùy chọn mục tiêu chính xác theo trạng thái nâng cấp giao thức.

* Baobab: --evm-version london
* Cypress: --evm-version london
* Khác (chuỗi riêng/dịch vụ): được xác định theo trạng thái nâng cấp giao thức

Vui lòng tham khảo [cách thiết lập phiên bản EVM của solc](https://solidity.readthedocs.io/en/latest/using-the-compiler.html#setting-the-evm-version-to-target).

Dưới đây là một lệnh ví dụ:

```
$ solc --evm-version london contract.sol
```

## Cặp khóa tách rời <a href="#decoupled-key-pairs" id="decoupled-key-pairs"></a>

Klaytn \[tách riêng cặp khóa khỏi địa chỉ]\(../klaytn/design/tài khoảns.md#decoupling-key-pairs-from-addresses). Nếu người dùng \[cập nhật tài khoản]\(../klaytn/design/transactions/basic.md#txtypetài khoảnupdate), khóa riêng tư cho tài khoản cụ thể sẽ được thay thế bằng một khóa khác. Trong hầu hết các trường hợp, điều này sẽ không ảnh hưởng đến logic kinh doanh của bạn. Tuy nhiên, nếu logic kinh doanh của bạn bao gồm ecrecover, bạn nên cân nhắc sử dụng validateSender. Để biết thêm chi tiết, hãy tham khảo [tại đây](/content/smart-contract/precompiled-contracts.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://archive-vn.docs.klaytn.foundation/content/smart-contract/porting-ethereum-contract.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
