# Tutorials

# Add Funds to zkSync with MetaMask

In this tutorial, we will be depositing into a zkSync wallet with MetaMask.

While the tutorial shows the MetaMask images for Rinkeby, you can follow the same steps for mainnet.

There is an account activation fee applied on the first transaction after depositing. Deposit an additional ~$20 to cover it during high gas fees. Learn more about the account activation fee in our FAQ.


To connect your wallet to the zkSync 1.0 Mainnet select the "Ethereum Mainnet" button at the top of MetaMask

Metamask Ethereum


  1. Go to https://wallet.zksync.io/ (opens new window) and connect your wallet
  • To connect to the zkSync 1.0 Mainnet:
    • Click on the Ethereum symbol at the bottom right
    • Select Mainnet

zkSync wallet homepage


Mainnet Selection


  1. Choose "+ Top up"

Top up


You can choose different methods for adding funds to your zkSync wallet including FIAT onramps, Exchanges, or Bridges (for this tutorial we will use the zkSync bridge)


Select zkSync Bridge


  1. Select your token, enter the amount, and click "Top up"

zkSync Bridge


  • If you can’t find your token:
    • Some tokens will be referred to by their internal id number on our Tokens page (opens new window) instead of their token symbol. (E.g. ERC20-23 = UNI)
    • Add new token to zkSync:
      1. Click "Can't find a token?"
      2. Use the link to access the Tokens page (opens new window)
      3. Click "Add New Token" at the top right corner and follow the directions

Choose token


If you add a token that requires approval, you need to pay a gas fee on Ethereum to authorize the deposit to zkSync. You will see the following messages before moving on to step 4
ERC20 approval.png

  1. Review the transaction information and confirm

Metamask confirm


This is an L1 transaction (as you deposit funds from L1 to L2), and therefore the time for it to appear in a block depends on the fee that you set

Your funds will appear on L2 only after your transaction is processed on L1 (If you have any difficulties, please check Etherscan (opens new window) to monitor the transaction)

Add Funds loading


Successful Deposit


  1. Your deposit is complete! The transaction has been initiated, and your funds will be visible in your zkSync wallet within ten confirmations of your L1 transaction
Committed Verified
A single yellow check mark next to your balance indicates the zkSync server has processed your transaction and your funds are ready for immediate use Two green check marks signal the proof for the block containing your transaction has been produced and submitted to the smart contract on Layer 1
Deposit committed Deposit verified


# Account Activation

Your first transaction after depositing or funding your account requires a separate action for account activation. For more information about account activation, see Account Activation FAQ.

  1. You will be prompted to "Authorize to Sign account activation" and need to sign the message first to generate your zkSync L2 private key

Account activation authorize


Signature request

  1. Then, you will be asked to sign the message for account activation (it is good practice to read the messages you sign)

Sign account activation


Metamask sign

The account activation fee can be seen below the transaction fee when completing your transaction

Activation fee



# Transfer Funds on zkSync

In this tutorial, we’ll review how to transfer funds to another zkSync account. Whether an Ethereum user has a zkSync account or not, you can send them funds on zkSync to the same address they have on Ethereum.

Keep in mind these funds will be on Layer 2 (L2), so if you want to use these funds on Layer 1 (L1), you will Send to Ethereum.

  1. Click on "Transfer"

Transfer


  1. Select "Transfer to zkSync"

zkSync-Ethereum


If this is your first transaction after depositing or funding your zkSync account, see the Account Activation section
If you refreshed the page or recently connected your wallet to zkSync, you will be asked to "Authorize to Send on zkSync"

Authorize to send on zkSync
- Signing the message will re-generate your zkSync Layer 2 (L2) private key (remember, it is good practice to read the messages you sign)

  1. Enter the address to send funds to, select the token to transfer, and enter the amount
  • Before transacting, you can change the fee token.
    Users can pay transaction fees in all popular tokens since zkSync supports "gasless meta-transactions"

Send on zkSync


  1. Signing this message submits the transaction to the zkSync network (remember, it is good practice to read the messages you sign)

Metamask sign


  1. The transfer should take no longer than a couple of seconds (If you have any difficulties, please check zkScan (opens new window) to monitor the transaction)

Successful transfer


  1. Your transfer is complete! The transaction has been initiated and the funds are ready for immediate use
Committed Verified
A single yellow check mark next to your balance indicates the zkSync server has processed your transaction and your funds are ready for immediate use Two green check marks signal the proof for the block containing your transaction has been produced and submitted to the smart contract on Layer 1
Transfer committed Transfer verified


# Transfer Funds to Ethereum

This tutorial will cover the process of withdrawing funds from zkSync back to the Ethereum main chain.

Moving funds to an exchange: If you want to move your funds from zkSync to an exchange, these steps follow the correct method. Alternatively, you can take a risk and enter the exchange address when you withdraw, but most exchanges do not observe smart contract transfers, which may require you to contact their customer support to see your funds on the exchange.

  1. Click on "Transfer"

Transfer


  1. Click on "Transfer to Ethereum"

Select Transfer to Ethereum


  1. Your address will auto-populate with your address
    If you enter a different address for withdrawal, please check that it accepts smart contract transfers

Send to Ethereum


If this is your first transaction after depositing or funding your zkSync account, see the Account Activation section
If you refreshed the page or recently connected your wallet to zkSync, you will be asked to "Authorize to Send on zkSync"

Authorize to send on zkSync
- Signing the message will re-generate your zkSync Layer 2 (L2) private key (remember, it is good practice to read the messages you sign)

  1. Select the token to send to Ethereum and enter the amount
  • Before transacting, you can change the fee token
    Users can pay transaction fees in all popular tokens since zkSync supports "gasless meta-transactions"

Send to Ethereum button


Read the popup carefully to prevent loss of funds

Send to Ethereum Popup


  1. Confirm the withdrawal amount, address, fee, and sign the message (remember, it is good practice to read the messages you sign)

Metamask sign

  1. Your withdrawal has been initiated. There will be an immediate change in your account balance in zkSync, but withdrawal times can take from 10 minutes to 7 hours before being available on L1
  • When network activity increases, blocks fill up faster, and withdrawal times decrease
Committed Verified
A single yellow check mark next to your balance indicates the zkSync server has processed your transaction and your funds are ready for immediate use Two green check marks signal the proof for the block containing your transaction has been produced and submitted to the smart contract on Layer 1
Send to Ethereum committed Send to Ethereum verified


# Mint an NFT

The following steps will cover using IPFS desktop to mint an NFT.

If you are new to minting an NFT, consider using one of the community-created frontends* like Open Sky (opens new window).

*The community-created frontends are not created by the zkSync team, and any issues with minting will need to be sent to the creators of these frontends

  1. Visit the IPFS.io (opens new window) and install IPFS Desktop

Download IPFS


  1. Go to "Files", select "+ Import", and choose your image

Import image


  1. Click on the three dots at the end of the row of your imported image and click on "Copy CID" (Content Identifier)

Copy CID


  1. Use the text below to create a metadata.json file or click the link to create your file online (opens new window)
{
  "name": "Your NFT name",
  "image": "https://ipfs.io/ipfs/CID of Image",
  "description": "Description of your NFT",
  "external_url": "Optional URL",
  "attributes": [
    {
      "trait_type": "Attribute 1",
      "value": "Value 1"
    },
    {
      "trait_type": "Attribute 2",
      "value": "Value 2"
    },
    {
      "trait_type": "Attribute 3",
      "value": "Value 3"
    }
  ]
}

  1. Enter the CID from step 3 at the end of the "image": "https://ipfs.io/ipfs/ section and fill out the rest of the values as needed

    Example metadata.json file:

{
  "name": "zkSync",
  "image": "https://ipfs.io/ipfs/QmX4kiKSy4bBB8PXqj8ZM8gNNmra3Xh1NshiaF5TRk5c2C",
  "description": "zkSync Logo",
  "external_url": "https://zksync.io/",
  "attributes": [
    {
      "trait_type": "Logo",
      "value": "Yes"
    },
    {
      "trait_type": "Color",
      "value": "Yes"
    }
  ]
}

  1. Save your .json file or download your .json file if you used the link from step 4

Download json


  1. Import your .json file to IPFS as in step 2 and copy the CID for your .json file

  2. On your zkSync wallet (opens new window), open the NFTs tab and select "+ Mint NFT"

Select Mint NFT


If this is your first transaction after depositing or funding your zkSync account, see the Account Activation section
If you refreshed the page or recently connected your wallet to zkSync, you will be asked to "Authorize to Mint NFT"

Authorize Mint NFT
- Signing the message will re-generate your zkSync Layer 2 (L2) private key (remember, it is good practice to read the messages you sign)

  1. Enter the copied CID of your .json file in "Content Address" and click "Mint NFT"
  • Before minting, you can change the fee token
    Users can pay transaction fees in all popular tokens since zkSync supports “gasless meta-transactions”

Mint NFT button


  1. Confirm the fee and sign the message (remember, it is good practice to read the messages you sign)

Metamask sign


  1. Minting your NFT has been initiated and will be available for transfer, or withdrawal to L1, once it has been verified, which takes between 10 minutes to 7 hours
  • When network activity increases, blocks fill up faster, and verification times decrease
Committed Verified
A single yellow check mark next to your balance indicates the zkSync server has processed your transaction Two green check marks signal the proof for the block containing your transaction has been produced and submitted to the smart contract on Layer 1
NFT committed NFT verified


# Alternative Withdrawal

The Alternative Withdrawal tool is used when funds have been sent to an account that cannot connect to the zkSync wallet (opens new window)

If you sent to a Centralized Exchange, please check with their customer support that they accept smart contract transactions to prevent loss of funds

  1. Check to see if your account qualifies to use the Alternative Withdrawal tool by entering your address on zkScan (opens new window)

  2. Check your account for the following information:

    1. The account is at least 24 hours old
    1. The account has never been activated (i.e., nonce is zero)

Nonce check


If your account meets the requirements for using the "Alternative Withdrawal" tool, proceed with the following steps

  1. Go to Alternative Withdrawal (opens new window)

zkTools


  1. Enter the zkSync address from steps 1 and 2

Alternative withdrawal


  1. Select the token you want to be withdrawn and the method for paying the fee

Token select


  1. Complete the fee payment process on your wallet

Metamask confirm


  1. The funds should be in your wallet within 24 hours and can be seen under "Internal Txns" on Etherscan (opens new window)
  • If you do not see your funds within 24 hours, please email us at withdraw@zksync.io with the following information:

      1. Your zkSync address from step 1
      1. The token and the amount
      1. The Ethereum transaction hash of the fee payment

Etherscan Internal Transactions