Skip to content

2dukes/PROJ_BlockchainDLTs_2223

Repository files navigation

DApp: Crowdfunding Reinvented

Documents

In the repository, we can find the project's report, a video demo, and a presentation of the DApp.

Setup

Install MetaMask on your browser and connect it to the Goerli test network. Create an .env file in the project's root folder with the following structure:

ALCHEMY_API_URL = "https://eth-goerli.g.alchemy.com/v2/OMigXz2SzOnoSvOvI1YXiyDPDYRq6sUr"
WALLET_PRIVATE_KEY = "..."
ETHERSCAN_API_KEY = "..."
CAMPAIGN_CONTRACT_ADDR = "..."
MONGO_DB_ATLAS_USERNAME = "admin"
MONGO_DB_ATLAS_PASSWORD = "UTJtbKxUzoxQ3arP"
PINATA_API_KEY = "..."
PINATA_SECRET_API_KEY = "..."
  • ALCHEMY_API_URL which is Alchemy's API HTTPS entrypoint combined with the corresponding API Key.
  • WALLET_PRIVATE_KEY which is your MetaMask's wallet private key.
  • ETHERSCAN_API_KEY which is the Etherscan API key.
  • CAMPAIGN_CONTRACT_ADDR which holds the address of the deployed campaign factory contract, as it will be seen in the next steps.
  • MONGO_DB_ATLAS_USERNAME is the MongoDB container MONGO_INITDB_ROOT_USERNAME variable, as shown in the docker-compose.yml.
  • MONGO_DB_ATLAS_PASSWORD is the MongoDB container MONGO_INITDB_ROOT_PASSWORD variable, as shown in the docker-compose.yml
  • PINATA_API_KEY is the Pinata API key.
  • PINATA_SECRET_API_KEY is the Pinata API key secret.

How to get Ether in your wallet?

Welcome the Goerli Faucet.

Deploy Contracts

  • Navigate to the solidity/ folder.
  • Run npm install.
  • Deploy:

According to Hardhat's configurations, the deployment already includes verifying the contracts in the Goerli Network, which is an Ethereum Testnet. This means that the code of the Smart Contract is visible to everyone in Etherscan.

Frontend Running instructions:

docker-compose up

Frontend Rebuild instructions:

docker-compose up --build

Architecture

Dependencies:

  • Material UI which is a library of React UI components that implements Google's Material Design.
  • Hardhat which is an Ethereum development environment for professionals. It facilitates performing frequent tasks, such as running tests, automatically checking code for mistakes, or interacting with a Smart Contract.
  • OpenZeppelin which provides security products to build, automate, and operate decentralized applications.
  • MetaMask which holds the crypto wallet.
  • Web3.js.
  • Pinata.
  • Mongoose.
  • Alchemy.
  • ReactJS.
  • NodeJS.
  • IPFS.

References:

Contract Documentation

To generate the Solidity contract's documentation, first install the Solidity Compiler, solc. Then run solc --pretty-json --devdoc /path/to/solidity/file. Beware that you may have to change the source slightly due to OpenZeppelin dependencies.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •