Deploy on Zircuit
A tutorial for deploying a smart contract on Zircuit
Overview
Deploying your first contract on Zircuit is easy! This tutorial will show you how.
If you already have an existing development environment for Ethereum, this will be fast and probably take only 10-15 minutes.
We have even provided you a boilerplate project to make this process even simpler!
Walkthrough
1. Set Up Hardhat
Create the folder for you new project and navigate within
Install Hardhat using
npm
(Node Package Manager):Install the hardhat toolbox for a later step
Initialize a new Hardhat project:
2. Write Your Smart Contract
We created a sample smart contract file which has everything you need for easy deployment. Place this file in contracts/Token.sol
inside of your hardhat project.
All you need to do now to customize your token is replace the following section of the Token.sol
file:
These values are just filler, so put in a fun name for your token, a ticker and adjust the supply as you see fit!
3. Set Up Your Network and Solidity Compiler Configuration
Edit the
hardhat.config.js
file to define network configurations. In this case, all you need to do is enter your Zircuit private key. A sample is shown below.
4. Compile Your Smart Contract
Use this Hardhat command to compile your contract:
5. Write A Deployment Script
In the
scripts
directory, create a deployment script, for instancedeploy.js
. This script will handle the deployment of your smart contract. A sample is below.
6. Deploy Your Smart Contract
Run the deployment script with Hardhat.
7. Verify and Interact with Your Contract
Once deployed, you can use Hardhat commands or the Hardhat console to interact with your contract.
Otherwise, you might want to verify your smart contract via our block explorer.
Conclusion
Congratulations! You've successfully launched your first contract on Zircuit.
Last updated