Skip to content

Latest commit

 

History

History
119 lines (74 loc) · 2.8 KB

README.md

File metadata and controls

119 lines (74 loc) · 2.8 KB

Solidity JavaScript Ethereum

Confessions Dapp

A Decentralized application working on ethereum or other EVM based chains where any user can post anonymus confessions.
Find the current deployed version on etherscan: https://goerli.etherscan.io/address/0x66Fe86341089f188Cf6aF5773c235729C8787CB1#code

Author

Run Locally

Clone the project

  git clone https://github.com/aritroCoder/confessions-smart-contract

Go to the project directory

  cd confessions-smart-contract

Install dependencies

  yarn install

Make your changes in the contract file, then compile the contract using

  yarn hardhat compile

or,

  hh compile

To run the contract, you can use remix, or follow the deployment instructions

Environment Variables

To deploy this project, you will need to create and add the following environment variables to your .env file:

GOERLI_RPC_URL

PRIVATE_KEY

You can get a GOERLI_RPC_URL from free services like alchemy and infura by signing up. Use your test account's private key for PRIVATE_KEY. Don't run contracts on an account with real funds!

Additionally you might also add ETHERSCAN_API_KEY solely for verification purpose of the contract publically.

Deployment

Deploying on hardhat network

  yarn hardhat deploy

or

  hh deploy

Deploying on hardhat localhost (visible to your entire PC and you can connect other apps to this network like a actual blockchain)

If localhost blockchain is not running (this will deploy automatically)

  yarn hardhat node

If localhost is already running

  yarn hardhat deploy --network localhost

You can replace yarn hardhat with only hh in all commands.

Deploying on testnets

  yarn hardhat deploy --network goerli

For deploying in other testnets, add its RPC_URL in .env, then add its entry in hardhat.config.js file(in the networks object, similiar to goerli)

Deploying on mainnet

The process is similiar

  yarn hardhat deploy --network mainnet

NOTE: This command will cost real money. Use with caution

Learning Reference

Contributing

Contributions are always welcome!

You can start by opening an issue or creating a PR.