This documentation aims to provide a quick reference for migrating existing EVM contracts.
For high-level designs of polyjuice please check known caveats of polyjuice. We recommend you read this first if you need to become more familiar with polyjuice.
- Please add polyjuice web3 provider to your project according to the web3 library you are using.
- Check the EVM compatible documentation.
- Since in the polyjuice environment, there are more than only Ethereum EOAs(Externally owned account), You must use
recover account
to replace the oldecrecover
precompiled contract. See polyjuice addition features for more details. - If you calculate create2 address on-chain, you need to call
eth_to_godwoken_addr
precompiled contract to convert it to a valid Godwoken address.
Some of these issues will be fixed soon. Docs are constantly being updated. So, make sure to check again.
from
parameter ineth_call
is optional, but due to a known issue, you should always set a validfrom
parameter when callingeth_call
.- calling a view function from a smart-contract does not need to pay fees on Ethereum. however, with Godwoken we should set enough gasLimit and
gasPrice = 0
. eth_getBlockByNumber
is currently only supportlatest
tag, other tags will not be recognised.