Porting Ethereum Contract
In most cases, you can use Ethereum contracts on Klaytn without any modification. However, be aware of the following two issues.
Solidity Support
Klaytn is currently compatible with Constantinople Ethereum Virtual Machine (EVM) version. Backward compatibility is not guaranteed with other EVM versions on Klaytn. Thus, it is highly recommended to compile Solidity code with the Constantinople target option. Please refer to how to set the EVM version of solc.
An example command is shown below:
Decoupled Key Pairs
Klaytn decouples key pairs from addresses. If user updates account, the private key for a specific account is replaced with another one. Most cases this will not affect your business logic. However if your business logic includes ecrecover, you should consider using validateSender. For more details, refer to here.
Last updated