EVM on Zilliqa mainnet - Frequently Asked Questions

Learn more about the EVM deployment on Zilliqa in our Frequently Asked Questions.

EVM on Zilliqa mainnet - Frequently Asked Questions

Last updated - May 3, 2023

The first implementation of Ethereum Virtual Machine (EVM) compatibility was deployed on the Zilliqa mainnet on Tuesday, April 25 at 08:00 UTC.

To help users and developers understand more about this deployment and the functionality that is available in this first native implementation of EVM compatibility, we have listed a number of Frequently Asked Questions (FAQs) below.


What is Ethereum Virtual Machine (EVM) compatibility?

EVM (Ethereum Virtual Machine) is the software platform used to build applications on Ethereum and other protocols that have implemented EVM compatibility. Bringing EVM to Zilliqa opens our ecosystem to the wider blockchain developer community and allows users to use popular wallets such as MetaMask with the Zilliqa ecosystem.

What is the relationship between EVM ZIL and Zilliqa ZIL?

They are the same, though EVM ZIL are scaled to accommodate the differing precisions of EVM and Zilliqa ZIL (18 vs 12 decimal places).

Can I use the same address for EVM and ZIL APIs (eg. for MetaMask and ZilPay/Torch)?

No. Zilliqa and Ethereum have different ways of deriving public keys from private keys, so the Zilliqa address derived from a given private key is different from the Ethereum address for that key.

If you wanted a single address for both EVM and ZIL, you would need to know the Ethereum private key for the ZIL address you had just worked out. This would involve deriving the private key from a public ZIL address, which cannot practically be done, and so you cannot have the same address for EVM and ZIL APIs.

If there is enough interest, it might be possible to work around this by allowing EVM transactions to have Schnorr signatures (so that you could submit them via the ZIL API) and vice versa, but this would need explicit support in dApps, and the extra complexity probably is not worth it for now.

Will I be able to restore a Zilliqa account in MetaMask using my private key or seed phrase?

No. You can only restore Zilliqa accounts in a Zilliqa wallet (eg. ZilPay or Torch) or EVM accounts in an EVM wallet (like MetaMask).

Will I be able to store ZRC-2 fungible tokens in MetaMask?

Not directly. You will be able to store them via our ERC-20-to-ZRC-2 gateway contract, which will let you see your ZRC-2 tokens as though they were ERC-20 tokens.

The source code will be available in https://github.com/zilliqa/zilliqa-developer shortly after launch and we will publish a directory of deployed contracts.

Will I be able to store ZRC non-fungible tokens in MetaMask?

Not initially. We hope to be able to provide this in a future release, although you could also write a gateway contract (similar to our ZRC-2/ERC-20 gateway) yourself.

Will I be able to use my ZIL on DEXs like Uniswap, Sushiswap to trade?

Yes, if and when those DEXs deploy to Zilliqa.

Will developers be able to deploy Uniswap/Sushiswap/1inch on Zilliqa?

Developers should be able to deploy their contracts to EVM on Zilliqa just like they would with any other EVM-compatible chain.

Will I be able to sell my NFTs on an NFT marketplace like Opensea/Blur?

Not until they add support for the Zilliqa blockchain and even then, you will either need an ERC-721 gateway in place or to have EVM NFTs on Zilliqa.

Will I be able to buy an NFT using ZIL on Opensea/Blur?

Not until these platforms add support for Zilliqa.

Will I be able to use Zillion with MetaMask and stake my ZIL?

Not directly. Please let us know if this is functionality you would like to be implemented, or you can write a gateway contract yourself, of course.

For now, you will need to transfer your ZIL to a Zilliqa wallet and stake them from there.

Will I be able to connect Metamask with ZilSwap and buy tokens listed on ZilSwap with native ZIL?

Not until ZilSwap adds support for EVM wallets.

Which DEX can I use to connect with MetaMask and use my native ZIL to trade?

This is a new release, so there aren't currently any EVM DEXs that we know of. We'll update this answer when some have been tested and deployed.

Will NFTs created under ZRC-1 have EVM interoperability or will this apply only to ZRC-6?

This is not yet decided, but we would hope to support both standards. Please get in touch if you have a particular need for ZRC-1 support. Again, it should be possible to write this yourself using our interoperability facilities if you really need this functionality.

What happens if I send ZIL via Torch or ZilPay to my EVM address, or via MetaMask to my ZIL address?

These transfers should execute normally, and your ZIL will arrive safely in the "other" wallet.

What happens if I send ZIL to a random address via MetaMask?

They will be lost, just as they are with any blockchain network. In fact, they will turn up just fine at the address you sent them to, but since no-one has the private key for that address, it will not be possible to access them once they get there.

What about ZRC-2, ERC-20, and other contract-wrapped tokens?

This is trickier. Suppose you send some ZRC-2 tokens (such as XCAD or ZWAP) to your EVM address. They will arrive just fine, but you will now want to send them elsewhere.

In order to do so, you will need to call the ZRC-2 contract with “_sender” equal to your EVM address. But, in order to make that call you need to submit a Zilliqa API transaction from your EVM address, which you are unable to do. So your funds will be stuck.

This is not optimal, and you resolve the problem using ../zilevm/protocol/protocol-interwork.md. Create a Solidity contract which calls the Scilla contract using the call Scilla contract with _sender unchanged precompile. You can now send a Scilla call from an EVM transaction, and there is a contract available in the https://github.com/zilliqa/zilliqa-developer repository which does this by building an ERC-20 facade for ZRC-2 assets.

We will deploy this against the common ZRC-2s and publish a list once EVM is live on mainnet.

This will recover your funds, but might be quite tricky to operate for arbitrary contracts; our roadmap contains a more generic mechanism for arbitrary contracts (though you will still need to know what transition/call data you need to call).

If you did not understand the above, please contact the dApp maintainer, or your developers, who will hopefully be able to help you.

What about transferring Zilliqa NFTs to EVM addresses?

Please don't transfer your Zilliqa NFTs to EVM addresses for now!

They will probably be rescuable using the interwork protocol right now, and we will address this in our next release, but it is best not to test that.

What about transferring ERC-20s and other tokens to ZIL API address?

Please do not do this either! Rescuing trapped tokens in EVM contracts is significantly harder than for Scilla contracts, because Scilla contracts have self-describing storage encoding and source is always available.

Whilst the interoperability mechanism can be used to transfer these back to EVM addresses, it is substantially harder to write the code to do so, and probably impossible unless you have the source code (or at least the interface) of the contract in question.

Again, the maintainers of the dApp may be able to help, or if you have the appropriate knowledge you may be able to do this yourself.

We will try to provide assistance with the most common cases as they arise, but the Zilliqa infrastructure team does not have the resources to support every case.

I have encountered issues with the Zilliqa API following the mainnet upgrade. Are you working on a fix for these?

Thank you for all of your support while we upgraded the network last week. This was the first mainnet update in quite some time and as a result we have logged some issues that we are now investigating:

  • ZIL-5214: The API occasionally returns HTTP 503 errors. This is the most urgent issue, and it appears as though this is due to a locking bug in the API server combined with a very high volume of GetSmartContractState calls. We are working hard to resolve this and will redeploy our seedpubs when we have a fix ready, which should resolve the issue.
  • ZIL-5218: Subscriptions don’t work in the Ethereum API on mainnet (but they do work on testnet). We are looking into this and a fix will likely be deployed when we update and redeploy the seedpubs.
  • ZIL-5217: “Access-Control: allow-origin” was omitted from error responses in the API. The fix for this is fairly trivial and will roll out with our other seedpub fixes.

Are there any issues you have logged that will require another network upgrade to fix?

There are two issues related to smart contracts which will require a network upgrade to fix:

  • ZIL-5219: About 24 smart contracts were impacted by a (two-year-old) change in Scilla that forced brackets around map types. Sadly, three of them are still in use. We have a fix, but to roll it out will require another network upgrade.
  • ZIL-5216: This issue occurs when a contract issues a delegatecall to another contract, which issues a delegatecall to a third contract that looks up a map. We have worked out a fix for this issue, but this will require a network upgrade to implement.

We will need to roll out another network upgrade in the coming weeks to deploy a fix for these issues. We will give as much notice as possible - at least one week - ahead of deployment.

We will also add tests for these issues to our internal test suites to make sure they don’t happen again.

Please bear with us as we work through these issues. We appreciate the support from the community and ecosystem, as well as the bug reports filed. If you encounter any other issues, please let us know.

Developers can find further information on the Zilliqa EVM implementation in the ZilEVM public repository on GitHub.