Delight 👑 Profile picture
Low Cap Gem Hunter || Tweets are not Financial Advice

May 19, 2023, 32 tweets

6714 Wallets have deployed contract on @zksync. That's 1% of the Total Active Wallet on the #zkSyncEra BlockChain.

Here is how to deploy a Contract with $1 as Gas Fee 🧵

I will be going straight to business because you are already familiar with the ecosystem. They promised 2/3 which is 66% of the token to the community.

By my assumptions: Airdrop hunters, DAOs(Mute, SyncSwap etc) and People that deployed contracts might benefit from the airdrop

Deploying a smart contract on the ZkSync Era on Windows

Disclaimer: To deploy a smart contract on the #zkSync network, you will need to provide ur private key to the MM wallet. I recommend you do not use ur main wallet, Create a New wallet and use it just to be on a safer side

In this guide, we will be deploying a smart contract on the #zksync_Era Mainnet.

Add the ZkSync Era networks to metamask: chainlist.org/?search=Zksync

Bridge into Zksync with Orbiter.finance

Download and install on PC:
a) Node.js - nodejs.org/en (I installed the version on the left, “recommended for everyone”. After installation,you need to restart your PC
b) Visual Studio Code -code.visualstudio.com/download

-Create a folder on the desktop HELLO-ZKSYNC

-Open Visual Studio and open the HELLO-ZKSYNC folder you created by clicking File - Open folder in the upper left corner

Click on the icon on the top right, as shown in the screenshot, you will open a panel with the Terminal (by default, the path to your HELLO-ZKSYNC folder will be selected)

In the Terminal, Copy and paste these commands individually and click enter:

Twitter won't allow be paste the codes so I entered in a google doc
docs.google.com/document/d/1Z5…

Next, create a file in folder HELLO-ZKSYNC by clicking on the button as in the screenshot and name it hardhat.config.ts

By clicking on it, a field will open where we paste the following text

Get the text in this doc:
docs.google.com/document/d/1By…

Close the file by clicking on the cross and save your changes!

In the left menu in the folder HELLO-ZKSYNC, create folders contracts and deploy by clicking on the button, as in the screenshot

In the folder contracts, create the file Greeter.sol

and paste the following code into it

Get the code here: docs.google.com/document/d/1DA…

Then Close the file by clicking on the cross and save!

Next, in the Terminal type the command below and press Enter:

npx hardhat compile

If you did everything correctly, you will see the following message:

Select folder deploy we created before, create the deploy.ts file into it

and paste the code into it:

Get the code here: docs.google.com/document/d/1Pt…

Close the file and save!

Create a file in folder HELLO-ZKSYNC, let's call it .secret
Paste private key here (USE A NEW WALLET PLEASE)

Close the file and save!

Type the last command to deploy the contract:

npx hardhat deploy-zksync

If you did everything right, the next notifications will appear

After that, go to explorer.zksync.io and enter our contract address and see that it has been created. You can also enter the address of your metamask and see two transactions, because after the deployment command, there is also an interaction with the contract.

Congratulations, you have deployed a smart contract on the ZKSync Era Mainnet!!!

You can also verify your contract. But after that, it will be available to everyone, which increases the risk of hacking and theft of your private key. As I wrote at the beginning, do all operations only on a test wallet

For this:

Go to explorer.zksync.io
Enter the address of your smart contract

Next, click on the Contract tab
-Click on the Verify Smart Contract button
-Fill in all the fields as shown in the picture:

In the Enter the Solidy Contract Code field.

Get the code you will paste here:
docs.google.com/document/d/1Rg…

In the Constructor Arguments field, insert the data that appeared after the deployment of the contract

If someone did not have it, it is the same for everyone, you can enter

0x000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000094869207468657265210000000000000000000000000000000000000000000000

After you have filled in all the fields, click the Verify Smart Contract button

Congratulations, you have verified your smart contract!

Spent $0.6 for all this

Don't forget to Like and RT for Awareness.

Follow me for more of this post too

Share this Scrolly Tale with your friends.

A Scrolly Tale is a new way to read Twitter threads with a more visually immersive experience.
Discover more beautiful Scrolly Tales like this.

Keep scrolling