0glabs / 0g-contract-example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

0g-contract-example

This repo is to demonstrate a simple example to deploy a contract on 0G chain.

In order to run, execute the following to install dependencies

npm install --save-dev hardhat
npm install

Then run the following code to compile the contract

npx hardhat compile

Before deploying, setup the environment variable with your own private key by creating a .env file and put

PRIVATE_KEY=<your_private_key>

Finally, run the deploy script to deploy the contract

npx run scripts/deploy.js --network zg

About


Languages

Language:JavaScript 62.6%Language:Solidity 37.4%