The addition of EVM compatibility opens up the Zilliqa network to wider adoption and accessibility by allowing the execution of smart contracts written in EVM-compatible languages such as Solidity.
MetaMask is a popular browser-based wallet for Ethereum and EVM-compatible blockchains that makes it easy to store and use tokens across several networks.
To learn how to set up MetaMask to connect to the Zilliqa EVM network, read our previous blog post on the topic.
In this post, we'll cover how to send ZIL from a Zilliqa wallet such as ZilPay to your MetaMask wallet address.
Address conversion and ZIL transfer
The first implementation of EVM compatibility currently live on the Zilliqa mainnet supports the transfer of native ZILs to EVM-compatible wallets such as MetaMask.
It is important to note, however, that users are currently unable to send Zilliqa NFTs or fungible tokens to EVM addresses or vice-versa, as they may lose their assets.
This functionality will be added in a further mainnet upgrade that expands the functionality of EVM compatibility to include interoperability between Scilla and Solidity token standards.
For more information on the functionality supported by this EVM implementation, read our FAQs.
As Zilliqa and EVM use different address formats, it is also necessary to convert “0x”-prefixed addresses to addresses with the “zil” prefix when sending from a Zilliqa wallet to MetaMask, and vice versa.
This process is outlined in the steps below.
Sending ZIL to MetaMask
Once you have set up your MetaMask wallet and connected it to the Zilliqa EVM network, you can transfer ZIL from your Zilliqa wallet to MetaMask. The first step in this process is to convert your MetaMask “0x”-formatted address to its corresponding “zil”-formatted address.
Copy your MetaMask wallet address from the wallet browser extension and navigate to one of the tools above to convert your address into a Zilliqa address format.
To do this using Devex, enter your “0x”-formatted address into the search field at the top of the page. From here, you can press the small “recycle” button next to the address to change between “zil” and “0x” address formats.
The process is similar for the Zilliqa IDE - simply click on Tools -> Address Converter via the top menu bar, enter your “0x”-formatted address into the Base16 address field and press enter to convert to a “zil”-formatted address.
Once you have the corresponding “zil”-formatted address for your MetaMask account, you can open the Zilliqa wallet of your choice and transfer ZILto your MetaMask wallet as you would with any other Zilliqa wallet.
Using ZilPay as an example, simply open the browser extension, click on send and enter your “zil”-formatted address into the Recipient field before completing the transaction as normal.
Ensure that you are using the “zil”-formatted address in the recipient field and are only sending native ZIL to MetaMask, or you may lose your funds.
Once the transaction has been processed and confirmed by the network, your ZIL should appear within your MetaMask wallet.
This process is outlined in the video below:
For more information on using MetaMask with Zilliqa, read the documentation on the Zilliqa developer portal.