How To Deploy A Smart Contract To Polygon zkEVM Testnet using Remix

How To Deploy A Smart Contract To Polygon zkEVM Testnet using Remix

Learn how to deploy a simple contract to a zkEVM network using remix.

Prerequisites

Make sure you have some goerli testnet to bridge over to Polygon ZkEVM. Use this faucet to get some test eth.

We will be deploying a simple smart contract for the purpose of demonstration. You can use any smart contract code you have or follow along with this auction code I wrote a while back.

Copy and paste the code from the github to Remix

Add Polygon zkEVM testnet to Metamask

Network name: Polygon zkEVM Testnet

RPC: https://rpc.public.zkevm-test.net

ChainID: 1442

Currency symbol: ETH

Block Explorer URL: https://testnet-zkevm.polygonscan.com

Click on add network on your Metamask and fill the details from above.

You should get a confirmation like this

Bridge goerli testnet to polgon zkEVM test eth

Head over to https://wallet.polygon.technology/zkEVM/bridge

Connect your Metamask wallet and sign the 2 transactions.

Choose the amount of eth you want to bridge over. Remember to have some to cover gas fees. In this example, I am bridging 0.1eth

Click the 'bridge ETH' button and sign the transactions on your Metamask.
It took 14 minutes to bridge over for me. Note that it could take lesser or more time in your case, but generally it doesn't take long and works pretty fast.

Deploying our smart contract to Polygon zkEVM

Open Remix and paste your smart contract code.

Make sure you have Injected Provider selected, this would connect your wallet to remix.

Deploy your contract by clicking the Deploy button (parse in the wallet address and a duration period in minutes if you are following along with my contract) and signing the transactions.

Congratulations! You just deployed or learned how to deploy a smart contract to the Polygon zkEVM testnet!

If you aren't sure exactly what zkEVM is, then check out my previous article.

Thanks for reading.